Product:
WebViewer Video
Product Version:
4.35.7
Please give a brief summary of your issue:
(Think of this as an email subject)
Want to Play my online videos in WebViewer Video library and alos wants to give support to play it offline mode.
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
How can I play my Video in offline mode in WebViewer Video Player?
Is there any way to play video offline ?
Please provide a link to a minimal sample where the issue is reproducible:
Hello, Iām AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
To play videos both online and offline using WebViewer Video, youāll need to manage the video files differently for each scenario. WebViewer Video supports video playback and annotation capabilities, but handling offline playback requires additional steps beyond the standard online streaming approach.
Some things you can try:
For online playback, ensure your video files are hosted on a server and accessible via URL. You can use adaptive streaming with DASH files for a better experience on various network conditions.
For offline playback, you need to download the video files to the userās device beforehand. Store these files locally, and then configure WebViewer Video to load these local files instead of streaming from a URL.
Implement a mechanism to check for network availability and switch between online and offline modes accordingly.
Here are some resources that might help you:
WebViewer Video Documentation - This page provides an overview of the video features and capabilities, including offline playback considerations.
Adaptive Streaming Guide - Learn how to use adaptive streaming for online video playback, which is beneficial in varying network conditions.
Video Annotation Features - Explore how to annotate videos, which can be useful for both online and offline scenarios.
Hopefully, this helps you solve your problem while you wait for a human to get back to you.
WebViewer Video does support offline play, provided the file is on the local device. This can be done by loading a local file into the loadVideo() API while offline.
To make the video player switch between online and offline when the network comes and goes, you can Ńheck if there is a network available, and if there is, enable online mode, otherwise enable offline mode. To do this, use the WebViewer Video API.
if (navigator.onLine) {
// Code to initialize online mode
WebViewer(..., { url: 'online-video-url' });
} else {
// Code for offline mode initialization
WebViewer(..., { file: 'path/to/local/video'
});
}
This is just an example. You need to adapt it to your needs and consider what will happen if something goes wrong.