DVR-like time shifting in live stream
Live time-shifting, also known as DVR (Digital Video Recorder) mode, allows viewers to interact dynamically with live streams by enabling features like pausing, rewinding, and fast-forwarding. This functionality is similar to traditional DVR systems and is especially useful for scenarios where viewers may want to revisit specific moments or catch up after interruptions.
FastPix’s live time-shifting feature ensures a seamless viewing experience while offering broadcasters flexibility to enable or disable these capabilities based on the type of content being streamed.
Why implement live time-shifting?
Live time-shifting elevates the user experience, giving viewers more control over live content.
Here’s why it’s worth enabling:
Benefits to viewers
- Pause and resume: Viewers can step away from the stream without missing anything.
- Rewind moments: Replay specific sections to catch missed details or relive important highlights.
- Fast-forward: Skip ahead after pausing or rewinding to rejoin the current live broadcast.
Ideal use cases
- Live sports: Replay pivotal moments like goals, touchdowns, or critical plays.
- Webinars and conferences: Allow participants to revisit sections for better understanding.
- Breaking news: Ensure no key updates or critical segments are missed.
Modes of operation
FastPix supports two operational modes for time-shifting. These modes are configurable based on the nature of the live stream and the level of interactivity desired:
DVR mode (enableDvrMode: true
)
enableDvrMode: true
)- Time-shifting controls are enabled: Viewers can pause, rewind, and fast-forward live streams.
- Use case: Ideal for interactive streams like sports events, educational sessions, and news broadcasts where viewer control enhances engagement.
Non-DVR mode (enableDvrMode: false
)
enableDvrMode: false
)- Time-shifting controls are disabled: The stream runs in real-time, and viewers cannot pause, rewind, or fast-forward.
- Use case: Best suited for live scenarios where immediacy is critical, such as live auctions or interactive gaming streams.
How to enable live time-shifting in FastPix
Enabling live time-shifting in FastPix is straightforward and requires specifying input settings in your livestream creation request.
Include DVR mode in the payload
When creating a livestream, configure the enableDvrMode
parameter in the request payload. If set to true
, DVR functionality is enabled. If omitted, the default value is false
.
Example payload for creating a livestream:
{
"playbackSettings": {
"accessPolicy": "public"
},
"inputMediaSettings": {
"maxResolution": "1080p",
"reconnectWindow": 60,
"mediaPolicy": "public",
"enableDvrMode": true,
"metadata": {
"livestream_name": "fastpix_livestream"
}
}
}
What happens after enabling time-shifting?
System validation
- FastPix validates the
enableDvrMode
parameter in the request. - If set to
true
, DVR controls are enabled. If set tofalse
, only real-time playback is available.
Stream playback behavior
- DVR mode: The live player displays a seek bar, allowing viewers to pause, rewind, and fast-forward the stream.
- Non-DVR mode: The player operates in real-time, and no seek bar is shown.
Sample response
Here’s an example of the response you’ll receive upon successfully creating a livestream with DVR mode enabled:
{
"success": true,
"data": {
"streamId": "9d29c6d13d9e96133536dd217bfaf635",
"streamKey": "*********",
"srtSecret": "**********",
"trial": true,
"status": "idle",
"maxResolution": "1080p",
"maxDuration": 43200,
"lowLatency": false,
"createdAt": "2024-09-20T11:55:19.472529Z",
"reconnectWindow": 60,
"enableRecording": true,
"mediaPolicy": "public",
"metadata": {
"livestream_name": "fastpix_livestream"
},
"enableDvrMode": true,
"playbackIds": [
{
"id": "e37e66a3-090a-4ac6-83ef-b45c03d7a39c",
"accessPolicy": "public"
}
],
"srtPlaybackResponse": {
"srtPlaybackStreamId": "play9d29c6d13d9e96133536dd217bfaf635",
"srtPlaybackSecret": "***********"
}
}
}
Updated 2 days ago