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-7476): error handling #36

Merged
merged 17 commits into from
Dec 6, 2017
Merged

Conversation

odedhutzler
Copy link
Contributor

@odedhutzler odedhutzler commented Nov 15, 2017

Description of the Changes

Firing an error from the dash adapter, ignoring video element errors.

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

@@ -217,7 +218,7 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
*/
_removeBindings(): void {
this._shaka.removeEventListener('adaptation', this._onAdaptation);
this._shaka.removeEventListener('error', this._onError);
this._shaka.removeEventListener('error', this._onError.bind(this));
Copy link
Contributor

Choose a reason for hiding this comment

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

use arrow function () => this._onError

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@OrenMe - so i will change all of the bindings...

@@ -3,6 +3,7 @@ import shaka from 'shaka-player';
import {BaseMediaSourceAdapter} from 'playkit-js'
import {Track, VideoTrack, AudioTrack, TextTrack} from 'playkit-js'
import {Utils} from 'playkit-js'
import {Error, Severity} from 'playkit-js'
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need separate class for Severity?
As I see it, it should be a static prop on the Error class.
Error.Severity.CRITICAL

reject(error);
this._onError(error);
reject(new Error(
error.everity.CRITICAL,
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

@odedhutzler odedhutzler changed the title fix(FEC-7476): dash error handling fix(FEC-7476): error handling Dec 6, 2017
@odedhutzler odedhutzler merged commit 499914f into master Dec 6, 2017
@odedhutzler odedhutzler deleted the error_handling_refactor branch December 6, 2017 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants