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(FEC-7368): no spinner between ads and spinner doesn't stop on autoplay on native adapter #156

Merged
merged 8 commits into from
Jan 21, 2018

Conversation

odedhutzler
Copy link
Contributor

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

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

OrenMe
OrenMe previously approved these changes Dec 21, 2017
@@ -89,6 +90,9 @@ class Loading extends BaseComponent {
}

this.player.addEventListener(this.player.Event.PLAYER_STATE_CHANGED, e => {
if (!this.state.afterPlayingEvent) {
Copy link
Contributor

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.

@dan-ziv dan-ziv merged commit 2df9ca0 into master Jan 21, 2018
@dan-ziv dan-ziv deleted the FEC-7368-1 branch January 21, 2018 10:56
dan-ziv pushed a commit that referenced this pull request Feb 26, 2018
…ground (#183)

Hide loading spinner when autoplay failed event is triggered.
Also, get rid of the mobileAutoplay flags since its redundant and doesn't exists in the player.

caused by #156
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants