-
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
Revert 4.12.9 and fix the Html5 tech with sourceHandlers that use MSE #2271
Conversation
…ceHandler is using media source extensions
…urrentSrc when they contain blob uri's
@@ -314,10 +314,20 @@ vjs.Html5.prototype.exitFullScreen = function(){ | |||
this.el_.webkitExitFullScreen(); | |||
}; | |||
|
|||
vjs.Html5.prototype.returnFakeIfBlobURI_ = function (realValue, fakeValue) { |
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.
Can you explain this with a comment?
@videojs/core-committers we spent awhile discussing this issue offline. No one likes this solution but we think it's the minimal change that can be made that will allow MSE-based source handlers to appear native-ish in 4.x. We need to figure out the right way to accomplish this for 5.0, though. Ideas we came up with:
|
With the caveat about 5.0 above, LGTM |
var blobURIRegExp = /^blob\:/i; | ||
|
||
if (realValue && blobURIRegExp.test(realValue)) { | ||
return fakeValue; |
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.
should there be null checking here?
Here's my opinion.
Does that address all the issues or am I missing anything? |
4.12.9 introduced many small problems ranging from incompatibility with old techs to subtly breaking
videojs-contrib-ads
. Too many things depend on the existing behavior to change it without a major release so this PR reverts those changes.On top of that, the PR fixes the issue we were having with blob urls in the
src
andcurrentSrc
functions when using MSE. It does this in the simplest and least-likely-to-affect-anything-else-way possible. For that reason, all changes are confined to the Html5 tech instead of Media so that the changes do not alter the behavior for any other techs.