How to create a embedded HTML video with a fallback video URL?

316 Views Asked by At

I am very new in the space of frontend development.

I have 2 embedded videos links:

  1. Primary video link to an unlisted public YouTube video - which might not be available when it is set for premiere. (Typically YouTube videos once set for premiere are not available for viewing, even if users have access to video URL).

  2. Secondary video link to another unlisted public YouTube video - which is always available. I want to use this as a backup.

I am trying to use those embedded video link in my website where viewers will be watching it. Users will be watching from the primary link as long as it is available. Only constraint is that if the primarily link is not available for streaming, then the website should dynamically fallback to the secondary link.

My question is that is it possible to achieve that? Any ideas, how to get this done? I searched online and didn't find any solution to it.

0

There are 0 best solutions below