- Newest
- Most votes
- Most comments
The Amazon IVS player doesn't natively support seamless switching between live streams and VOD assets for rewinding during a live stream. The standard IVS live streaming setup you're using (Standard channel with Low latency and TS container format) doesn't provide built-in DVR-like functionality for seeking backward during a live stream.
For implementing rewind functionality in your application, you have a few options:
-
Separate VOD and Live Players: You could implement two separate player instances - one for the live stream and another for VOD playback. When a user wants to rewind, you would switch to the VOD player using the recording URL that's being generated by your recording configuration. This would require your application to manage the transition between the two players.
-
Single Player with URL Switching: You can use a single IVS player instance and switch the source URL between live and VOD. This approach would involve:
- Using
player.load(liveStreamUrl)for live playback - Switching to
player.load(vodUrl)when the user wants to rewind - Managing the user experience for transitioning back to live
The implementation would look something like:
const ivsPlayer = IVSPlayer.create(); ivsPlayer.attachHTMLVideoElement(document.getElementById('video-player')); // For live playback ivsPlayer.load(liveStreamUrl); // When user wants to rewind function switchToVOD() { ivsPlayer.load(vodUrl); } // When user wants to return to live function switchToLive() { ivsPlayer.load(liveStreamUrl); }
Keep in mind that there will be a delay between the live stream and when the VOD asset becomes available, so there will be a gap between what's currently live and what's available for rewind. You'll need to handle this in your user experience design.
For a more seamless experience, you might consider using a different streaming technology that natively supports DVR functionality, but this would require changes to your current IVS setup.
Sources
Community | Build a UGC Live Streaming App with Amazon IVS: Video On Demand (VOD) Playback (Lesson 6.2)
IVS Composite Recording | Real-Time Streaming - Amazon IVS
Getting Started with the IVS Web Player SDK - Amazon IVS
Please check this resource:
Relevant content
- asked 4 years ago
- asked 2 years ago
- asked 4 years ago
- AWS OFFICIALUpdated 2 years ago
