@nikelroot/video-player 0.2.10 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -80,3 +80,25 @@ Build before publishing:
80
80
  ```bash
81
81
  npm run build
82
82
  ```
83
+
84
+ ## Separate audio and video recordings
85
+
86
+ Provide the HLS master as `videoSrc`, the video media playlist as `videoOnlySrc`,
87
+ and available audio intervals in seconds on the same recording timeline:
88
+
89
+ ```tsx
90
+ <VideoPlayer
91
+ videoSrc="https://cdn.example.com/record/master.m3u8"
92
+ videoOnlySrc="https://cdn.example.com/record/video.m3u8"
93
+ audioRanges={[{ start: 0, end: 120 }, { start: 135, end: 240 }]}
94
+ onAudioFallbackChange={(videoOnly) => console.log({ videoOnly })}
95
+ />
96
+ ```
97
+
98
+ Missing audio switches playback to the video playlist while retaining position,
99
+ playing or paused state, speed, volume, and mute. Playback returns to the master
100
+ when the current position has at least four seconds of available audio. Audio
101
+ request failures impose a 15-second retry cooldown. Update `audioRanges` as a
102
+ live recording grows; callbacks and metadata updates do not reload the source.
103
+ The player displays a nonblocking status while playing without audio.
104
+ Both media playlists and their fragment timestamps must use the same timeline.