跳至侧栏

HTML5-Audio_Video-方法

1.通用函数
load(): Loads the media file and prepares it for playback. Normally does not need to be called unless the element itself is dynamically created. Useful for loading in advance of actual playback.
play(): Loads (if necessary) and plays the media file. Plays fromthe beginning unless the media is already paused at another position.
pause(): Pauses playback if currently active.
canPlayType(type): Tests to see whether the video element can play a hypothetical file of the given MIME type.
canPlayType(type)可以检测浏览器对媒体文件格式的支持性,如:
var supportsFooVideo = !!(document.createElement('video').canPlayType(‘ fooType’));

 

posted @ 2012-12-21 16:34  JiayangShen  阅读(372)  评论(0编辑  收藏  举报
Top
推荐
收藏
关注
评论