Geek asks and answers

HTML5 video does not play on mobile device

I am using HTML5 Video with this code:

<div id="lightBox1" class="lightBox">
    <video id="video" controls preload="metadata">
        <source width="100%" height="470" src="/ImageworkzAsia/video/iworkzvid.mp4" type="video/mp4">
        <source width="100%" height="470" src="/ImageworkzAsia/video/iworkzvid.ogv" type="video/ogg">
        <source width="100%" height="470" src="/ImageworkzAsia/video/iworkzvid.m4v" type="video/m4v">
        <p style="text-align:center;">Your browser does not support HTML5 Video.</p><br />
    </video>
</div>

The problem is that it does not play in Mobile Safari, but it plays on the Safari desktop. He also plays chrome, firefox, as expected. I have not tested this on an Android device yet. Any ideas?

+3
javascript jquery html html5 video
Aj naidas May 24 '12 at 6:40
source share
2 answers

A few things to try:

  • Use absolute URLs in the Video src attribute

  • Some devices may take a little extra time to download videos.

  • Change your device and try (as you said)

Hope this helps.

+3
Indrajithp May 24 '12 at 6:45
source share

Your mobile phone browser may not support HTML5.

-3
qwerty May 24 '12 at 7:52
source share

More articles:

  • Index query exception exception - ravendb
  • mprotect returns ENOMEM for the address space in solib, any workarounds? - c
  • jQuery: the correct way to bind (); and unbind (); with mouse, mouse and click - jquery
  • How to parse xml and extract xslt element from it in javascript - javascript
  • sort sub-dicts into dict by subdict value - python
  • django pisa - pagenumber for only two or more pages - show the total number of pages - django
  • Convert std :: string to raise :: posix_time :: ptime - c ++
  • The difference between two similar 3Sum algorithms? - java
  • chrome speed dial with hotkey - google-chrome
  • How to pass a variable to a call to system () in ruby? - command-line

All Articles

Geek-Ask | 2020