videojs / videojs-errors

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

feat: Add option to disable timeout errors while document is in the background #197

Closed alex-barstow closed 3 years ago

alex-barstow commented 3 years ago

Description

Background throttling can cause playback delays that will recover once the document becomes visible again, so it makes sense to disable timeouts (which are in a sense "artificial" errors) if the document visibilityState is 'hidden', and then re-enable timeouts when it becomes 'visible'.

This adds an option for such a feature that defaults to true.