-
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-7368): no spinner between ads and spinner doesn't stop on autoplay on native adapter #156
Conversation
@@ -89,6 +90,9 @@ class Loading extends BaseComponent { | |||
} | |||
|
|||
this.player.addEventListener(this.player.Event.PLAYER_STATE_CHANGED, e => { | |||
if (!this.state.afterPlayingEvent) { |
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.
I think we are starting to have duplicate logic here, and maybe it's better to consider moving to playback events based state only and not state change event.
You already see that we both register to playing event a few line below and do the same action there and also in here in state change to playing.
Description of the Changes
Added a state (afterPlayingEvent) the checks if the entry started playing, it listens to the PLAYING event.
PLAYER_STATE_CHANGED events are ignored until 'afterPlayingEvent' state is set to true.
@dan-ziv, i checked with/without autoplay and with/without ads. It seems to work, but I remember you have some notes about this fix.
CheckLists