Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(text track display): update on playerresize and orientationchange #5447

Merged
merged 2 commits into from
Sep 25, 2018

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Sep 25, 2018

On mobile devices, when changing orientation, or if the player gets resized, the captions won't update to reflect the new orientation or player size. However, they do get updated the next time they are redrawn. Instead, we should redraw the captions whenever orientationchange and playerresize get triggered.

player.on('playerresize', updateDisplayHandler);

window.addEventListener('orientationchange', updateDisplayHandler);
player.on('dipose', () => window.removeEventListener('orientationchange', updateDisplayHandler));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo dipose

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's even a typo of depose, ugh

@gkatsev
Copy link
Member Author

gkatsev commented Sep 25, 2018

@apadhye
Copy link

apadhye commented Sep 25, 2018

QA LGTM

Copy link
Contributor

@brandonocasey brandonocasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified using demo and android 8, could be good to have some more info in the description about what this fixes, for history purposes.

@gkatsev gkatsev merged commit e69842c into master Sep 25, 2018
@gkatsev gkatsev deleted the orientation-change branch September 25, 2018 18:43
gkatsev added a commit that referenced this pull request Oct 31, 2018
…#5447)

On mobile devices, when changing orientation, or if the player gets resized, the captions won't update to reflect the new orientation or player size. However, they do get updated the next time they are redrawn. Instead, we should redraw the captions whenever `orientationchange` and `playerresize` get triggered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants