{"id":1382,"date":"2021-01-14T15:54:52","date_gmt":"2021-01-14T07:54:52","guid":{"rendered":"http:\/\/123.57.164.21\/?p=1382"},"modified":"2021-01-14T15:54:52","modified_gmt":"2021-01-14T07:54:52","slug":"html5%e8%a7%86%e9%a2%91%e6%a0%87%e7%ad%be%e5%ae%9e%e7%8e%b0%e6%8c%87%e5%ae%9a%e6%97%b6%e9%97%b4%e7%82%b9%e7%9a%84%e6%92%ad%e6%94%be%e4%b8%8e%e6%9a%82%e5%81%9c","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=1382","title":{"rendered":"html5\u89c6\u9891\u6807\u7b7e\u5b9e\u73b0\u6307\u5b9a\u65f6\u95f4\u70b9\u7684\u64ad\u653e\u4e0e\u6682\u505c"},"content":{"rendered":"\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\"> \n&lt;html> \n  &lt;head> \n    &lt;title>video&lt;\/title> \n    &lt;meta http-equiv=\"pragma\" content=\"no-cache\"> \n    &lt;meta http-equiv=\"cache-control\" content=\"no-cache\"> \n    &lt;meta charset=\"utf-8\"> \n  &lt;\/head> \n \n&lt;body> \n    &lt;div class=\"container\"> \n        &lt;input type=\"button\" value='50-80' onclick=\"playMedia(50,80)\">\u7b2c50\u79d2\u5f00\u59cb-80\u79d2\u65f6\u6682\u505c \n        &lt;br > \n        &lt;br > \n        &lt;button onclick=\"playMedia(30,null)\" type=\"button\">\u4ece\u7b2c30\u79d2\u5f00\u59cb\u64ad\u653e\u5230\u7ed3\u675f&lt;\/button> \n        &lt;input type=\"text\" id=\"showTime\"\/> \n        &lt;br > \n        &lt;br > \n        &lt;video id=\"video1\"  controls=true src='https:\/\/stafo.s3.au-syd.cloud-object-storage.appdomain.cloud\/JR.mp4'> \n        &lt;\/video> \n    &lt;\/div> \n \n&lt;\/body> \n \n&lt;script> \n \n    var myVid=document.getElementById(\"video1\"); \n    myVid.addEventListener(\"timeupdate\",timeupdate); \n \n    var _endTime; \n \n    \/\/\u89c6\u9891\u64ad\u653e \n    function playMedia(startTime,endTime){ \n        \/\/\u8bbe\u7f6e\u7ed3\u675f\u65f6\u95f4 \n        _endTime = endTime; \n        myVid.currentTime=startTime; \n          myVid.play(); \n    } \n     \n    function timeupdate(){ \n        \/\/\u56e0\u4e3a\u5f53\u524d\u7684\u683c\u5f0f\u662f\u5e26\u6beb\u79d2\u7684float\u7c7b\u578b\u7684\u5982\uff1a12.231233\uff0c\u6240\u4ee5\u628a\u4ed6\u8f6c\u6210String\u4e86\u4fbf\u4e8e\u540e\u9762\u5206\u5272\u53d6\u79d2 \n        var time = myVid.currentTime+\"\"; \n        document.getElementById(\"showTime\").value=time; \n        var ts = time.substring(0,time.indexOf(\".\")); \n        if(ts==_endTime){ \n            myVid.pause(); \n        } \n         \n    } \n \n&lt;\/script> \n&lt;\/html><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/1382"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1382"}],"version-history":[{"count":1,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/1382\/revisions"}],"predecessor-version":[{"id":1383,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/1382\/revisions\/1383"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}