-
Notifications
You must be signed in to change notification settings - Fork 14
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(FEC-8448): after 'learn more' is clicked, fullscreen button is not responding #261
Conversation
…he full screen mode
@@ -42,6 +43,7 @@ class FullscreenControl extends BaseComponent { | |||
*/ | |||
constructor(obj: Object) { | |||
super({name: 'Fullscreen', player: obj.player}); | |||
this._prevFullscreenState = false; |
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.
better to take it from the state
this._prevFullscreenState = obj.fullscreen
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.
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.
no
should be in componentWillUpdate
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.
@odedhutzler
No need to save local full screen state since its manage in the store.
add the componentWillUpdate() lifecycle hook and just check if nextProps.fullscreen is different from the the current return value of _isFullscreen.
In that case just call fullscreenEnterHandler
calling change handler in the component will mount function.
Description of the Changes
when you click on 'learn more' in IMA (when on full screen) it resize to the regular size. because IMA is an iframe, we cannot listen to fullscreen change event in it's document.
on each render of the full screen component, I am checking if it is different from the previous state , and renders accordingly.
CheckLists