player.on('enterfullscreen', async () => {
const video = player.media;
try {
if (video.requestFullscreen) {
await video.requestFullscreen();
}
if (screen.orientation && screen.orientation.lock) {
await screen.orientation.lock('landscape');
}
} catch (e) {}
});