One time fee € 11.00
Buy nowOverview
The Offline plugin allows to display custom offline image with retry countdown when the live stream goes offline. Offline image is initialized when stream playlist is not accessible (errors 404, 403, etc.), when fatal network and media error occurs, when streaming network disconnected while playing, or internet connection goes down.The plugin attempts to reconnect the stream automatically in user-defined intervals (default each 30 seconds).
The offline plugin features 3 easy to understand options.
- offlineImage - URL of the offline Image
- offlineTimeout (default 30) - timeout value (seconds) for offlineImage to retry live stream
- offlineCountdown (default true) - set false to hide visible countdown
Important: You need to set preload="none" video attribute to have the offline plugin working correctly.
Minimum setup is:Code snippet
<script src="//domain.com/videojs/videojs.min.js"></script><script src="//domain.com/videojs/plugins/videojs.offline.js"></script>
<script>var player = videojs('myplayer');player.offline({offlineImage: "//domain.com/path-to-video-image.jpg"});</script>
Code snippet
player.offline({offlineImage:"//domain.com/path-to-video-image.jpg",offlineTimeout:20,offlineCountdown:false,label:"Neustart"});</script>
For the moment we added new functionality to the latest version of the Offline plugin, in case when using VHS and a playlist is not in a valid format. The user can define a timeout value for the media load event. If media not loaded, offline plugin is activated.
The default value for loadTimeout option is 0 and this means that timeout function will not be used. Set any other value in milliseconds to use load timeout function.
Code snippet
player.offline({
offlineImage:"//domain.com/path-to-video-image.jpg",
offlineTimeout:20,
offlineCountdown:false,
loadTimeout: 5000});</script>