Plyr: Youtube Video Landscape on Android not work

Created on 27 Apr 2019  路  8Comments  路  Source: sampotts/plyr

Expected behaviour

I have a last version of Plyr and i have observed that landscape mode does not work on android.

Actual behaviour

When I'm in portrait mode the video disappears but the sound is still there. I think it's an iframe problem that must shift at the bottom of the screen. Only on Youtube videos.

Steps to reproduce
Go to landscape mode on any website with Plyr player.

Environment

Browser: Chrome, Edge, Opera
Version: Last Version
Operating System: Android
Version: 9

Console errors (if any)

None

Most helpful comment

Hi @Thomasfds ,
I had the same error, updated today to _v3.5.6_ and I think it's fixed 馃憤 just in case you want to try.

All 8 comments

+1 me too.

Hi @Thomasfds ,
I had the same error, updated today to _v3.5.6_ and I think it's fixed 馃憤 just in case you want to try.

This is still happening for me on v3.5.6 unfortunately...

EDIT:
I was able to make it work by adding;
on.call(player, window, 'orientationchange', resized);

above (for example)
on.call(player, elements.container, 'enterfullscreen exitfullscreen', function (event) {

This is still happening for me on v3.5.6 unfortunately...

EDIT:
I was able to make it work by adding;
on.call(player, window, 'orientationchange', resized);

above (for example)
on.call(player, elements.container, 'enterfullscreen exitfullscreen', function (event) {

Can you elaborate on what your 'resized' function does to fix the problem on enterfullscreen and exitfullscreen?
Thanks

@EricSSartorius
It's not a function I added or wrote.
You can find the function here.

What I'm essentially doing, is catching a reorientation event and then call the _resized_ function. This function ends up recalculating and setting the video width and height. Without doing this, there appears to be an issue with these dimensions not changing (e.g. remaining in portrait mode) when the video changes from portrait to landscape.

Ah gotcha. That makes sense, thank you. Is this something that will be added as a PR soon?

Got the same problem, everything works fine when using a mp4 video file, but when using a video from youtube the videos is missalinged

Screenshot_20200226-144829

Code I'm using:
componentDidMount(){ this.player = new Plyr('#player'); this.player.on('enterfullscreen', event => window.screen.orientation.lock('landscape')); this.player.on('exitfullscreen', event => window.screen.orientation.lock('portrait')); }

Tried adding this.player.on.call(this.player, window, 'orientationchange', resized); but React is unhappy with resized not being defined. Any way to fix this

Is there any fix for this? None of the above seem to work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frumbert picture frumbert  路  3Comments

Lycanthrope picture Lycanthrope  路  4Comments

Generalomosco picture Generalomosco  路  3Comments

ahmadshc picture ahmadshc  路  3Comments

osamay picture osamay  路  4Comments