Ordep-20
Active Coder
Hello again, I'm migrating old project to babelJss since we face a lot of leg of pure js , its very simple we have a videojs we set the source by channel example
channels
{
anime
discovery
news
etc
}
it goes to a endpoint server it return the cdnj url of the channel,
but here comes the problems, most videos isn't live streaming, but all video came with a JSON bundle of chapter markers, and again if the channel seted is anime the makers will be an anime like icon.
I transcript most part of code to BabelJS 6
But I have this code with gives error for no recognized the JQuery(element by class), please I really need help
channels
{
anime
discovery
news
etc
}
it goes to a endpoint server it return the cdnj url of the channel,
but here comes the problems, most videos isn't live streaming, but all video came with a JSON bundle of chapter markers, and again if the channel seted is anime the makers will be an anime like icon.
I transcript most part of code to BabelJS 6
But I have this code with gives error for no recognized the JQuery(element by class), please I really need help
JavaScript:
// const video = videojs
video.on("loadedmetadata",function(){
var total = video.duration();
var p = jQuery(video.controlBar.progressControl.children_[0].el_);
for(var i=0;i<markers.length;i++)
{
var left =( markers[i].time/ total * 100)+'%';
var time = markers[i].time;
var el = jQuery('<div class="vjs-marker" style="left:'+left+'" data-time="'+time+'"><span>'+markers[i].label+'</span></div>');
el.click(function(){
video.currentTime($(this).data('time'));
});
p.append(el);
}
});