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’));
作者:
JiayangShen
水平有限,文中错误不妥在所难免,欢迎批评指正建议评论。文章将不定期修改完善斧正。转载请注明出处,谢谢!