Jump to content

Apple iOS 14 iPhone / iPad HTML Video Tag - will not play inline


andyhill

Recommended Posts

Desktop works fine.

<video id="video-tag-1" width="395" height="471" controls muted playsinline autoplay loop>
  <source src="images/blood.mp4" type="video/mp4"></source>
  Your browser does not support the video tag.
</video>

iPhone iOS 14 fails to play perhaps due to the new power management changes. I have read the video tag must be "muted" which it is, also must have "playsinline" which it does.

There is also some chatter about Safari/iOS now uses HTTP byte-ranges for requesting audio and video files.

Can someone please advise how to use html "video" tag with UniGUI/Indy byte-ranges for iOS ?

Playing around "<source src="images/blood.mp4" type="video/mp4"> Range:bytes=0-100000</source>" fictional byte range does not make any difference, also where do I place it.

This is very important for UniGUI to address as Apple (iOS = 4% of all web traffic) and Mobile in general (= 12% of all web traffic) increasing daily.

The video must be played inline within other rendered html content. 

Please advise - thanks in advance


 

 

 

Link to comment
Share on other sites

My quick and nasty work around sacrifices image quality and excludes audio.

I would love to have the original image quality and accompanying audio so still need help.

        '    <script>'+
        '      function fallback(video)'+
        '      {'+
        '        var img = video.querySelector(''img'');'+
        '        if (img) video.parentNode.replaceChild(img, video);'+
        '      }'+
        '    </script>'+
 

        '    <video autoplay loop muted playsinline>'+
        '      <source src="images/waves.mp4">'+
        '      <source src="images/waves.webm" onerror="fallback(parentNode)">'+
        '      <img src="images/waves.gif">'+
        '    </video>';
 

You can see the results by looking at our experimental website (testing different HTML concepts [non traditional])

https://axfite.com.au

Check out Blood and Waves using both Desktop and then iPhone/iPad.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...