-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
adding a currentType method to get current source type if known #1320
Conversation
Unsetting |
@@ -1172,6 +1178,10 @@ vjs.Player.prototype.currentSrc = function(){ | |||
return this.techGet('currentSrc') || this.cache_.src || ''; | |||
}; | |||
|
|||
vjs.Player.prototype.currentType = function(){ | |||
return this.srcType_ || ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use currentType_
instead of srcType_
for the private property. That's how other properties are set up.
Great stuff, thanks Matt! Still working on a few more inline comments. |
@@ -1144,16 +1156,10 @@ vjs.Player.prototype.src = function(source){ | |||
|
|||
if (!this.isReady_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this ready check will need to happen before anytime we set source. Could probably move it into setSource?
@gkatsev passing no argument results in |
Thanks @heff - have pushed some more changes based on your comments. |
if (this.options_['autoplay']) { | ||
this.play(); | ||
} | ||
}).bind(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ie8 unfortunately doesn't support bind. There's a vjs.bind method in lib.js though.
This is looking good. I'll be able to get it pulled in next week. |
Made a PR against this branch here: https://github.com/guardian/video.js/pull/1 |
Guardian source type
Alternative solution for the problem posed in #1313. See that PR for discussion.