-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Reset seekable function when no source handler in tech #2401
Conversation
…ue with setting source twice in Flash
Should we set the original seekable back to |
Good catch. Actually, I don't think we need to be resetting seekable when a source handler is disposed. After a second look at that code, In let originalSeekable = _Tech.prototype.seekable;
// when a source handler is registered, prefer its implementation of
// seekable when present.
_Tech.prototype.seekable = function() {
if (this.sourceHandler_ && this.sourceHandler_.seekable) {
return this.sourceHandler_.seekable();
}
return originalSeekable.call(this);
}; @dmlap see any reason why we shouldn't do that? |
I did have to fiddle around with the location of that setter a bit but can't think of a reason it wouldn't work in |
Should I update this PR to put the code in |
It'll get merged in faster if you can do it, but otherwise another contributor will get to it at some point. |
Ok I'll change it tomorrow. Will probably be a new PR as I accidentally did this one on my own master branch which is not really handy |
OK this should be the fix then :) |
LGTM! @dmlap confirm? Sent from mobile |
Yep. Thanks @nickygerritsen! |
The
seekable
function was only reset back to its original implementation when a source handler was set.However, the seekable function is overwritten even if no source handler is set in
setSource
.This resulted in a bug in the Flash tech when calling
player.src()
more than once during the lifetime of the player.This should fix this issue.