javascript - Embedded HTML5 player refuses fullscreen requests -
this whole page
<html> <head> <script type="text/javascript" src="//bitmovin-a.akamaihd.net/bitdash/latest/bitdash.min.js"></script> </head> <body> <div id="player"></div> <script type="text/javascript"> var conf = { key: "xxxxxxx", playback: { autoplay: true }, source: { dash: 'http://xxxxxx', poster: 'https://i.ytimg.com/vi/y5qyusmznhg/maxresdefault.jpg' } }; var player = bitdash('player'); if (player.requestfullscreen) { player.requestfullscreen(); } player.setup(conf).then(function(value) { // success console.log('successfully created bitdash player instance'); }, function(reason) { // error! console.log('error while creating bitdash player instance'); }); </script> </body> </html>
and use simple iframe embed code , add allowfullscreen whenever attempt full screen in browser returns error
"request full-screen denied because @ least 1 of document's containing iframes not have "allowfullscreen" attribute."
i not versed in js or html me being stupid. added if statement did not fix lost here.
Comments
Post a Comment