In a live stream setup, I have 2 cameras and each one sends RTMP stream to one different application which is on my Nginx-RTMP server. On the browser I am using Videojs Hls plugin.
Now my question is how can I load these two streams one after another in the same hlsplayer player instance. For example, I want to load the first 15 seconds in my first source and the next 15 seconds from my second source in the same player. Since the .ts files are named incrementally and if I have 5sec chunks of .ts files in each .m3u8 file, I want to load the first 3 .ts files to be loaded from the first source(.m3u8 file) and the next 3 from another source(.m3u8 file). How can I achieve that?
Can I generate some kind of master M3U8 file which has the list of these other .M3U8 files or can I develop a plugin in videojs to load the appropriate ts files directly?
I want to load 1.ts from source1.m3u8 and 2.ts from source2.m3u8 but with no delay or lag.