0

How can I determine how many html5 video elements a browser window can concurrently support?

On some chromebooks I have noticed no more than one video can play at the same time.

Would like to dynamically detect the number of video elements a browser can concurrently support.

jedierikb
  • 12,752
  • 22
  • 95
  • 166

1 Answers1

0

This is tricky as its going to depend on the device capabilities and the load on the device.

Many mobile devices for example will have HW solutions to decode and play video, especially important for HD and more complex codecs.

Once you go beyond one, or a small number at best, video you will likely start having to do the decoding in SW which will be much slower and will put a heavy load on the available processing power. If the device does other heavy processing during the playback this will impact the videos also.

If you need to display a grid of videos for example then sometimes it is easier to actually merge the videos on the server side and then send it to the device as a single video.

Mick
  • 24,231
  • 1
  • 54
  • 120
  • agreed on the downside of playing multiple videos concurrently. But I would like to detect if I am able to queue multiple videos. – jedierikb Jul 28 '16 at 13:59
  • Can you explain what you mean by 'queue' - most videos will be streamed so only a little bit of the video will be downloaded at a time. If all you need is to to have the videos showing a thumbnail and ready to play, but not actually all playing at the same time, then this should actually be quite straightforward. – Mick Jul 28 '16 at 14:36
  • for example: if building a video editor and wanted to have multiple clips queued up to preview what could be inserted next. can build this functionality differently if I know I've support for multiple streams. – jedierikb Jul 28 '16 at 16:25
  • You should have no problem with that use case as I think you won't want to play the videos all at the same time. You won't actually be streaming the videos until you click play on that particular one. – Mick Jul 28 '16 at 17:37