iOS JavaScript Video - webkitCancelFullScreen(); does not wo
iOS JavaScript Video - webkitCancelFullScreen(); does not work
我试图通过使用JavaScript的html页面的web视图在Xcode模拟器中播放视频后退出全屏,但它不起作用。
我使用下面的代码
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function finishVideo() {
var myVideo = document.getElementsByTagName('video')[0];
myVideo.webkitCancelFullScreen();
}
// add listener function to ended event -->
function myAddListener(){
var myVideo = document.getElementsByTagName('video')[0];
myVideo.addEventListener('ended',finishVideo,false);
}
</script>
</head>
<body onLoad="myAddListener()">
<video controls
src="http://homepage.mac.com/qt4web/A-chord.m4v">
</video>
</body>
</html>
try:
document.webkitCancelFullScreen();
代替:
myVideo.webkitCancelFullScreen();
相关文章:
- Javascript - element.childNodes does not see an append.newch
- AngularJS ng-init does not work
- jsPDF fromHTML() does not show HTML
- nodejs does not read JSON
- Json does not accept {}?
- JQuery .load() does not load html
- deployJava.js does not support IE11
- Yield does not resolve Promise node.js
- Javascript and Css: Height does not change
- Windows Phone 8 WebBrowser does not run javascript
- Twitter Bootstrap Modal does not appear
- JQuery Ajax does not response to Node JS
- jQuery datetimepicker does not update minDate
- Knockout + Typescript + NodeJS issue HTMLElement does not ex
- ExtJS does not identify IE11
- webdriverio does not support elementToBeClickable
- html does not equal document.childNode[0]
- fbs appID cookies does not exists
- element.style.fontSize does not return size
- Nunjucks nl2br does not exist?