phoboslab / jsmpeg

MPEG1 Video Decoder in JavaScript
MIT License
6.35k stars 1.43k forks source link

Can jsmpeg be played in full screen? #352

Closed webrtcccccc closed 1 year ago

webrtcccccc commented 4 years ago

Can jsmpeg be played in full screen? Like the html5 video tag, have an full screen button.

max246 commented 4 years ago

You can make the canvas in fullscreen like this:


var can = document.getElementById("my-canvas");

can.style.width = window.innerWidth + "px";
can.style.height = window.innerHeight + "px";

It is not an issue of jsmpeg, just you need to learn more about html.

bestHAI commented 3 years ago

You can also try like this:

var element = document.getElementById("player-canvas");

element.requestFullscreen();
TY-LIU commented 2 years ago

You can also try like this:

var element = document.getElementById("player-canvas");

element.requestFullscreen();

nice job, thx

webrtcccccc commented 1 year ago

Thanks

eoco2017 commented 2 months ago

Not supported on mobile,even try webkitRequestFullScreen,cannot work