代码之家  ›  专栏  ›  技术社区  ›  dar

html5视频在android NexusOne和android版本2.1上工作吗?

  •  0
  • dar  · 技术社区  · 15 年前

    现在有没有可能在android 2.1浏览器中使用html5视频?我的演示页面适用于iphone和ipad。

    mp4视频:avc1,29.97 fps,380 kbps,480 x 370 音频:mp4a,44 kHz,64 kbps

    以下是页面的编写方式:

    <!DOCTYPE html>
    <html><head><title>html5 test</title></head><body>
    <video id="movie" width="480" height="370" poster="http://example.com/still.jpg" controls>
    <source src="http://example.com/video.mp4" type="video/mp4">
    Your browser does not support html5 video.
    </video>
    </body></html>
    
    2 回复  |  直到 14 年前
        1
  •  2
  •   dar    14 年前

    更新:使用android2.1,我可以通过添加一个 onclick="this.play(); 对于视频标签,如下所示:

    <!DOCTYPE html>
    <html><head><title>html5 test</title></head><body>
    <video id="movie" width="480" height="370" poster="http://example.com/still.jpg" controls onclick="this.play();">
    <source src="http://example.com/video.mp4" type="video/mp4">
    Your browser does not support html5 video.
    </video>
    </body></html>
    

        2
  •  0
  •   YaW    15 年前

    不,Android浏览器目前不支持HTML5。