My goal is to enable two video player components of a NextJS application, to access and play videos when being run on a local machine via npm run dev when there is no internet connection.
At the present moment, these two components..
<HoverVideoPlayer videoSrc={item.videolink} pausedOverlay={ <img src={item.thumb} alt="Lorem Ipusm" />
and
<ReactPlayer playing={true} controls={true} muted={true} loop={true} width="100" height="100"
{...props} url={videoLink} poster="images/330163_C2B_Clean.png">
</ReactPlayer>
...are populated through an array with online links such as:
videolink: "https://cdn.jwplayer.com/videos/D44SzAxa-1AR7TaNs.mp4",
I want to extend the array with a local fallback link, in case the application is run locally without internet access such as:
videoLinkOffline: "../../videos/general/31930117_LF.mp4",
How can I set both components to draw from an additional, local link source when the external online links are unavailable?