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

Make sure that setSource is directly on prototype #1746

Closed
wants to merge 1 commit into from

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Dec 16, 2014

This is to make the new source handlers backwards compatible and so it
wont break techs that extend existing techs that were converted to use
source handlers.

This is to make the new source handlers backwards compatible and so it
wont break techs that extend existing techs that were converted to use
source handlers.
@dmlap
Copy link
Member

dmlap commented Dec 16, 2014

Looks good to me.

@@ -1175,7 +1175,7 @@ vjs.Player.prototype.src = function(source){

// The setSource tech method was added with source handlers
// so older techs won't support it
if (this.tech['setSource']) {
if (window['videojs'][this.techName].prototype.hasOwnProperty('setSource')) {
Copy link
Member

Choose a reason for hiding this comment

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

You could also use this.tech.constructor.prototype to avoid the window ref, but not a requirement.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was following suit on line 1165 above.

@gkatsev gkatsev closed this in d7f2924 Dec 18, 2014
@gkatsev gkatsev deleted the hasOwnProperty branch December 19, 2014 16:29
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