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

handle error getter on flash tech better #2515

Closed
wants to merge 3 commits into from

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Aug 25, 2015

The swf doesn't have an error getter and seems like all the info we have about the error is available in the onError method. So, instead of trying to call vjs_getProperty to the swf (which will never work or return a valid value), we'll store the error that we got there and return it in the error getter.

One thing I'm not certain off is when to clear out our reference to the error. Seems like when the error getter gets called is a good place to do so because it gets called from the player and player stores its own reference to the error which it clears out as necessary.

@@ -297,7 +307,7 @@ class Flash extends Tech {
// Create setters and getters for attributes
const _api = Flash.prototype;
const _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(',');
const _readOnly = 'error,networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(',');
const _readOnly = 'networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(',');
Copy link
Member Author

Choose a reason for hiding this comment

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

remove error.

@pam
Copy link

pam commented Aug 25, 2015

Tests passed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED

Commit: ff85e12
Build details: https://travis-ci.org/pam/video.js/builds/77196947

(Please note that this is a fully automated comment.)


// errors we haven't categorized into the media errors
} else {
tech.trigger('error', msg);
tech.trigger('error', errorObj);
Copy link
Member

Choose a reason for hiding this comment

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

tech.trigger('error', errorObj); is now the same in both places, so it could be moved outside the conditional.

@heff
Copy link
Member

heff commented Aug 25, 2015

A few notes but otherwise lgtm.

If we can figure out why the player and tech were continuing to operate after the tests, with little more effort, it might save us some pains down the road. My best guess is something isn't being disposed properly in the tests.

@pam
Copy link

pam commented Aug 25, 2015

Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: d663dbf
Build details: https://travis-ci.org/pam/video.js/builds/77204288

(Please note that this is a fully automated comment.)

@heff
Copy link
Member

heff commented Aug 26, 2015

Does #2517 replace this one?

@gkatsev
Copy link
Member Author

gkatsev commented Aug 26, 2015

Assuming we like #2517, yes.

@gkatsev
Copy link
Member Author

gkatsev commented Sep 1, 2015

#2517 got merged. Closing.

@gkatsev gkatsev closed this Sep 1, 2015
@gkatsev gkatsev deleted the flash-error-getproperty branch March 8, 2016 20:39
@gkatsev gkatsev restored the flash-error-getproperty branch March 8, 2016 20:39
@gkatsev gkatsev deleted the flash-error-getproperty branch March 8, 2016 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants