videojs / videojs-errors

A video.js plugin that displays error messages to video viewers.
Other
87 stars 29 forks source link

feat: trigger ended when stalling near end of video #105

Closed forbesjo closed 7 years ago

forbesjo commented 7 years ago

Description

Sometimes a player may stall near the end of a video due to some kind of MSE related issue (gap in content for example). This change sets the player into an ended state if we're very near the end of the video and have stalled.

Specific Changes proposed

This change exposes a new option durationTolerance which is the amount of seconds near the end of the video to trigger ended. If the player is within that tolerance and it has started to stall then ended will trigger.

Requirements Checklist

forbesjo commented 7 years ago

Closing, instead going to do this in the source handler since player.trigger('ended') does not do as much as tech.trigger('ended')