preload a second video while other is playing with videoJS - javascript

I am testing videoJS in a web app in chrome and measurement first buffering time (to start to play) and delay is ok but when I test in a different device, like a tv the delay increases to ~7s.
I am testing only HLS videos and I noticed that fragments are loaded much time early the video finish to play then I am asking if it's possible to start to buffer the second video once the current video is 100% downloaded and then the client does not notice that time delay to playback.

Related

Best way to sync video playback on multiple devices using NodeJS and websockets

I am trying to sync video playback across a set number of devices. Each device will play one section of the video, creating one large video playback made up of individual devices. As shown here:
Currently, I have this working fairly well using nodeJS with socket.io. My solution was to set the top left device as the master client device. From the master, I am sending the currentTime of the video to the server where it is broadcasted to the rest of the devices. On the remaining three devices, I am using the master video currentTime to slow or speed up it's video to match the master device video. This works, however, you can sometimes notice that the master video is slightly ahead of the other videos. With this solution, it takes a lot of fine-tuning to get it right.
I am wondering if there's a better way to do this. Would it be more efficient to stream each video from the server to the corresponding device? The app will eventually work with any set grid dimension so streaming-only 4 videos as shown here will not always be the case.

Videogular - video stops playing often - how to preload and indicate loading status

I have 86mb 1920x1080 video that I am playing online using videogular.
The video freezes often, taking 5-10 seconds to continue playing.
Is there a way to preload video completely and then play?
Is there a way to indicate how much has been loaded (as it's done on youtube?)
I've already tried preload:"auto",preload:"none" and preload:"preload".

Get duration of embedded youtube video

I have embedded a youtube player in an iframe. I want to know the duration of video before it starts playing or want to get notified when duration is updated from 0 to actual duration. How can this be done?
Thanks.
According to the Google YouTube api...
Retrieving video information
player.getDuration():Number
Returns the duration in seconds of the currently playing video. Note that getDuration() will return 0 until the video's metadata is loaded, which normally happens just after the video starts playing.
If the currently playing video is a live event, the getDuration() function will return the elapsed time since the live video stream began. Specifically, this is the amount of time that the video has streamed without being reset or interrupted. In addition, this duration is commonly longer than the actual event time since streaming may begin before the event's start time.

Video Networkstate InternetExplorer

I'm trying to create a video with slides next to it using HTML5 and Javascript.
The problem with InternetExplorer is that it's video networkstate stays on 2 for a while. As long as it is downloading the video, it won't be downloading my slides next to the video.
As a fix I tried pausing the video if the preloaded image isn't loaded on the time it has to pick over the slides' spot. But however the video stays downloading (Taking about 300 seconds according to the network state) And once it's done the slides will load directly. (Taking 260 seconds according to the same thing, but as soon as the video is loaded they ARE loaded)
When ever I try to use myVideo.networkState in the console I get state 2(loading) when it's not working, and state 1 when it does. So it has something to do with the video.
So the question:
Is there a way to either give priority to the slides, so they WILL load
Or a way to let IE download both slides and video on the same time.
Or giving the video a limited speed, if this has to do with a speed problem.
Answer: Delete Internet Explorer, Download Google Chrome.

How to play multiple sounds in ipad

I am developing a game for iPad using java script.
I have to play 4 sounds in which one is background sound and others will play based on some events.
As iPad doesn't allow us to play multiple sound simultaneously,I am playing continuously background sound when any event occurs I am stopping background sound and playing other sound after completion of this sound resuming background sound.
But while loading sound is taking so much time, any ideas?
Have you tried creating a buffer of an HTML5 sound. I mean, you create and load the src files at the start, and then you play them and reuse them.

Categories