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-9603): timing issue after reinitialise the flash api #25

Merged
merged 2 commits into from
Jan 8, 2020

Conversation

Yuvalke
Copy link
Contributor

@Yuvalke Yuvalke commented Jan 8, 2020

Description of the Changes

Issue: load occur on attach, need to wait until api is ready.
Solution: reset the promises that indicate when api is ready and initialise on attach.

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

Issue: load occur on attach, need to wait until api is ready.
Solution: reset the promise that indicate when api is ready
@Yuvalke Yuvalke requested review from OrenMe and yairans January 8, 2020 10:49
@Yuvalke Yuvalke self-assigned this Jan 8, 2020
_apiLoadPromise: Promise<*>;
_apiLoadResolve: any;
_apiLoadPromise: ?Promise<*>;
_apiLoadResolve: ?any;
Copy link
Contributor

Choose a reason for hiding this comment

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

any is nullable no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No

@@ -138,7 +140,7 @@ class FlashHLSAdapter extends FakeEventTarget {
if (this._api && this._config.debug) {
this._api.playerSetLogDebug2(true);
}
this._apiLoadResolve();
if (this._apiLoadResolve) this._apiLoadResolve();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (this._apiLoadResolve) this._apiLoadResolve();
if (this._apiLoadResolve) {
this._apiLoadResolve();
}

@Yuvalke Yuvalke merged commit 7c8e586 into master Jan 8, 2020
@Yuvalke Yuvalke deleted the FEC-9603 branch January 8, 2020 12:20
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.

2 participants