-
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
Switching src from flv to mp4 doesn't dispose properly? #1561
Comments
I guess technically it loads as html5 without a video, then switches to Flash when you load the Flash video, then back to html5 when you load that video. |
@mmcc yep, we were just chatting about this in IRC moments ago. The issue is here: https://github.com/videojs/video.js/blob/master/src/js/media/html5.js#L89. As in player init, we need to remove the controls attribute from the video element before inserting it into the DOM. Working on a fix. |
Fix for videojs#1561. If the HTML tech is being constructed without a video element to work off of, make sure that the controls attribute is only added under the same circumstances it would be at player init. Before this fix, if you loaded the Flash tech and then switched to the HTML tech, you would see the native controls underneath the video.js controls.
Were you able to fix it? I am having the same issue. |
@yadavharsh, this is just waiting on @dmlap's #1564 pull request. You could build a copy of the library using his branch and see if that works for you. |
Fix for videojs#1561. If the HTML tech is being constructed without a video element to work off of, make sure that the controls attribute is only added under the same circumstances it would be at player init. Before this fix, if you loaded the Flash tech and then switched to the HTML tech, you would see the native controls underneath the video.js controls.
In my particular instance, we have a playlist setup that dynamically loads videos. If a video requiring Flash is played (in this case, an flv), and then is followed by an mp4 (or some other HTML5 tech), there seems to be a mis-loading of the new player, or something similar. Behind the controls you can see another set of controls loaded.
Switching the other way: from HTML5 to Flash works fine. The expected result should be, I would imagine, the reserve functions the same.
A test case is here (http://jsbin.com/mozawupuceke/1/edit), but the JS Bin doesn't load the FLV properly. Nonetheless, you can still click the Flash button, then click the HTML5 button to see the results. Included below is some test code if you want to see a version with a working FLV.
The text was updated successfully, but these errors were encountered: