You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello , I'm migrating old project to babelJs since we face a lot of leg of Vanilla 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 set 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
`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);
}
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello , I'm migrating old project to babelJs since we face a lot of leg of Vanilla 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 set 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
`video.on("loadedmetadata",function()
{
var total = video.duration();
`
Beta Was this translation helpful? Give feedback.
All reactions