{"id":1469,"date":"2017-12-14T13:14:02","date_gmt":"2017-12-14T05:14:02","guid":{"rendered":"http:\/\/www.baishitou.cn\/?p=1469"},"modified":"2022-10-24T00:09:36","modified_gmt":"2022-10-23T16:09:36","slug":"html5-video%e8%a7%86%e9%a2%91%e6%92%ad%e6%94%be%e6%a0%87%e7%ad%be","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/1469.html","title":{"rendered":"HTML5 video\u89c6\u9891\u64ad\u653e\u6807\u7b7e"},"content":{"rendered":"

\u65b9\u6cd5\u5f88\u7b80\u5355\uff0c\u53ea\u8981\u8c03\u7528\u4e00\u6bb5js\uff0c\u5c31\u53ef\u4ee5\u8ba9\u4e3b\u6d41\u6d4f\u89c8\u5668\u5b9e\u73b0video\u6807\u7b7e\u7684\u89c6\u9891\u64ad\u653e\u3002\u4e0d\u8fc7\u8fd9\u79cd\u591a\u6d4f\u89c8\u5668\u652f\u6301\u65b9\u6cd5\u6240\u652f\u6301\u7684\u89c6\u9891\u683c\u5f0f\u6709\u9650\uff0c\u4e3amp4\u548cogv\u683c\u5f0f\uff0c\u5426\u5219\u89c6\u9891\u53ef\u80fd\u4e0d\u4f1a\u64ad\u653e\u3002\u4e0b\u9762\u94fe\u63a5\u662f\u89c6\u9891\u64ad\u653e\u7528\u5230\u7684JS\u3002\u70b9\u51fb\u4e0b\u8f7d\u5373\u53ef\uff0c<\/p>\n

html5media.min<\/a><\/p>\n

\u8c03\u7528\u4ee3\u7801\uff1a<\/p>\n

<script src=\"html5media.min.js\"><\/script>\r\n<video src=\"1.mp4\" width=\"352\" height=\"264\" controls autobuffer><\/video><\/code><\/pre>\n

\u6548\u679c\u5982\u4e0b\uff1a\"1\"<\/a><\/p>\n

 <\/p>\n

\u5c5e\u6027\u53c2\u6570\u8bbe\u7f6e\uff1a<\/p>\n

controls<\/strong>\u00a0\u6307\u5b9a\u540e\uff0c\u5219\u5411\u7528\u6237\u663e\u793a\u63a7\u4ef6\uff0c\u6bd4\u5982\u64ad\u653e\u6309\u94ae\u3002<\/p>\n

autoplay<\/strong> \u5e03\u5c14\u5c5e\u6027\uff1b\u6307\u5b9a\u540e\uff0c\u89c6\u9891\u4f1a\u9a6c\u4e0a\u81ea\u52a8\u5f00\u59cb\u64ad\u653e\uff0c\u4e0d\u4f1a\u505c\u4e0b\u6765\u7b49\u7740\u6570\u636e\u8f7d\u5165\u7ed3\u675f\u3002<\/p>\n

autobuffer<\/strong>\u00a0\u5e03\u5c14\u5c5e\u6027\uff1b\u6307\u5b9a\u540e\uff0c\u89c6\u9891\u4f1a\u81ea\u52a8\u5f00\u59cb\u7f13\u5b58\uff0c\u5373\u4f7f\u6ca1\u6709\u8bbe\u7f6e\u81ea\u52a8\u64ad\u653e\u3002\u8be5\u5c5e\u6027\u9002\u7528\u4e8e\u89c6\u9891\u88ab\u8ba4\u4e3a\u53ef\u80fd\u4f1a\u64ad\u653e\uff08\u6bd4\u5982\uff0c\u7528\u6237\u5bfc\u822a\u5230\u4e13\u95e8\u64ad\u653e\u89c6\u9891\u7684\u9875\u9762\uff0c\u800c\u4e0d\u662f\u90a3\u79cd\u5d4c\u5165\u89c6\u9891\u8fd8\u6709\u5176\u5b83\u5185\u5bb9\u7684\u9875\u9762\uff09\u3002\u89c6\u9891\u4f1a\u4e00\u76f4\u7f13\u5b58\u5230\u5a92\u4f53\u7f13\u5b58\u6ee1\u3002<\/p>\n

\u5176\u4e2d\u5e94\u6709autobuffer\u5c5e\u6027\u53ef\u4ee5\u62d6\u52a8audio\u5feb\u8fdb\u5012\u9000\uff0cautoplay\u5219\u4e0d\u53ef\u4ee5\u62d6\u52a8\u3002<\/p>\n

 <\/p>\n

\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898<\/strong><\/span>
\n\u60a8\u53ef\u80fd\u4f1a\u9047\u5230\u8fd9\u6837\u7684\u95ee\u9898\uff1a\u6211\u660e\u660e\u94fe\u63a5\u7684\u662fmp4\u683c\u5f0f\u7684\u6587\u4ef6\u554a\uff0c\u4e3a\u4ec0\u4e48\u5728IE\u53caFirefox\u4e0b\u6709\u95ee\u9898\u3002\u5982\u679c\u60a8\u9047\u5230\u7684\u95ee\u9898\u662f\u5728\u8fd9\u4e24\u4e2a\u6d4f\u89c8\u5668\u4e0b\u89c6\u9891\u4e0d\u64ad\u653e\uff0c\u6216\u662f\u64ad\u653e\u65f6\u53ea\u6709\u58f0\u97f3\u800c\u6ca1\u6709\u56fe\u50cf\uff0c\u800c\u5728chrome\u6d4f\u89c8\u5668\u6216\u662fSafari\u4e0b\u826f\u597d\uff0c\u5219\u60a8\u53ef\u80fd\u8981\u4ed4\u7ec6\u60a8mp4\u6587\u4ef6\u7684\u7f16\u7801\u683c\u5f0f\u4e86\u3002\u7279\u522b\u63a8\u8350MP4\u8f6c\u7801\u5de5\u5177MediaCoder x64<\/p>\n","protected":false},"excerpt":{"rendered":"

\u65b9\u6cd5\u5f88\u7b80\u5355\uff0c\u53ea\u8981\u8c03\u7528\u4e00\u6bb5js\uff0c\u5c31\u53ef\u4ee5\u8ba9\u4e3b\u6d41\u6d4f\u89c8\u5668\u5b9e\u73b0video\u6807\u7b7e\u7684\u89c6\u9891\u64ad\u653e\u3002\u4e0d\u8fc7\u8fd9\u79cd\u591a\u6d4f\u89c8\u5668\u652f\u6301\u65b9\u6cd5\u6240\u652f\u6301\u7684 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1698,1699,1697,459],"class_list":{"0":"post-1469","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-web","7":"tag-html5","9":"tag-video","10":"tag-459"},"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=1469"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1469\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=1469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=1469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=1469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}