-
Notifications
You must be signed in to change notification settings - Fork 16
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
Video Progress Bar Missing on HLS / m3u8 videos #12
Comments
Hi, progress bars are disabled on hls on purpose - HLS is usually used with live streams, and there is no way to know the duration of a live stream. There is no config option currently available to reenable the progress bar. That said, here's a patch. Place it after the Bivrost.HLSMedia.prototype._setTime=function(val) { this.video.currentTime=val; };
Bivrost.HLSMedia.prototype._getDuration=function() { return this.video.duration || 1; }; Be warned: using this with a stream, or otherwise undefined length HLS will cause a jumping progress bar. Please write a comment if it worked, but don't close the ticket. I'll try to add an option in the next release. |
This worked perfectly. Also I am attempting to create buttons page that when click jump to a timestamp in a video. I've attempted to simulate this here: setTimeout(function(){ },8000) Any suggestions would help. Happy to close out this ticket. |
Simply use To get the player object, use var player;
addEventListener("load", function() {
player=document.getElementsByTagName("bivrost-player")[0].bivrost;
}); |
This is coming back as undefined, perhaps because it is being converted to canvas? |
What is undefined, The But |
Thanks for the prompt response, the player is coming back undefined. Here is a link: https://www.luxvrs.com/e/vr/lux50263.php |
Just checked your page and you have a list of issues:
Anyway, replace var jumpTime = 10;
addEventListener("load", function() {
var player = document.querySelector("bivrost-player, [data-bivrost-player]").bivrost;
if(player.media) {
player.media.time = jumpTime;
}
else {
var oldSetMedia = player.setMedia;
player.setMedia = function(m) {
oldSetMedia(m);
m.time = jumpTime;
}
}
}); |
Are you sure? It works for me. Note that you used a 8 second timeout for the action. https___www.luxvrs.com_e_vr_lux50263.php.-.Google.Chrome.2022-01-27.17-30-44.mp4. |
I got it to work thank you! |
Is there a way to include the progress bar?
The text was updated successfully, but these errors were encountered: