-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Conversation
src/js/tracks/text-track-display.js
Outdated
player.on('playerresize', updateDisplayHandler); | ||
|
||
window.addEventListener('orientationchange', updateDisplayHandler); | ||
player.on('dipose', () => window.removeEventListener('orientationchange', updateDisplayHandler)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo dipose
There was a problem hiding this comment.
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
Can be verified here: https://deploy-preview-5447--videojs-docs.netlify.com/test-example/ |
QA LGTM |
There was a problem hiding this 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.
…#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.
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
andplayerresize
get triggered.