Canvas fullscreen on mobile devices causes power down

60 views Asked by At

How can i make a Canvas Element fullscreen and bypass the power saving feature of the mobile device. My canvas is playing a video but the mobile phone go's into power saving mode after a few seconds. Is there some setting somewhere?

this is my fullscreen function

let openFullscreen = (elem) => {

if (elem.requestFullscreen) {
    elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) { /* Firefox */
    elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) { /* Chrome, Safari & Opera */
    elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE/Edge */
    elem.msRequestFullscreen();
}

}

1

There are 1 answers

0
David Clews On

A possible reason why this could be happening is because the video is muted