Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Feb 11, 2025
1 parent 11cb227 commit 62fa0bc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions plugin/PlayerSkins/events/playerReady.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
player.ready(function () {
console.log('player.ready');
player.on('error', () => { AvideoJSError(player.error().code); });

player.on('timeupdate', function() {
if (player.liveTracker && player.liveTracker.atLiveEdge()) {
if (player.playbackRate() !== 1) {
player.playbackRate(1);
}
}
});
try {
var err = this.error();
if (err && err.code) {
Expand All @@ -14,9 +22,9 @@ player.ready(function () {
$('.vjs-menu-item').on('click', function() {
// Remove vjs-selected class from all chapter menu items
$(this).parent().find('.vjs-menu-item').removeClass('vjs-selected');

// Add vjs-selected class back to the clicked chapter
$(this).addClass('vjs-selected');
});
}, 2000);
});
});

0 comments on commit 62fa0bc

Please sign in to comment.