title: jQuery / JavaScript - pick video from gallery into video src in iOS web browser
body: <p>I'm picking a video from gallery and then show it a preview:</p>
  <pre><code>$(&quot;#filePhoto&quot;).change(function() {
          
          var input = this;
      
          if(input.files &amp;&amp; input.files[0]) {
              
              upload_file = input.files[0];
      
              var type = upload_file.type;
              var size = upload_file.size;
          
              
              if(type == 'video/mp4' || type == 'video/webm'){
      
                  alert(size); // video size alerted and correct
          
                  var meme = &quot;&quot;;
                  meme +=     '&lt;div class=&quot;videoWrapper&quot; onclick=&quot;clickVideo(this);&quot; style=&quot;max-width: calc(100% - 2px);&quot;&gt;';
                  meme +=         '&lt;video loop class=&quot;video videopreview&quot;&gt;';
                  meme +=             '&lt;source src=&quot;&quot; type=&quot;video/webm&quot; /&gt;';
                  meme +=         '&lt;/video&gt;';                 
                  meme +=     '&lt;/div&gt;';       
                  
                  $('#previewholder_area').html(meme);
                  $('.videopreview source').attr('src', URL.createObjectURL(upload_file));
  </code></pre>
  <p>It works on PC and Android but not on iOS browsers, why could that be?</p>
  <p>EDIT:</p>
  <p>I just made that test:</p>
  <pre><code>$('.videopreview source').attr('src', 'https://file-examples.com/storage/fe783a5cbb6323602a28c66/2017/04/file_example_MP4_480_1_5MG.mp4');
  </code></pre>
  <p>and it still doesn't work on ios but PC/Android</p>