chore: add player config
This commit is contained in:
@ -23,7 +23,11 @@ export function LiveVideoPlayer(props: VideoPlayerProps) {
|
|||||||
if (streamCached && video.current) {
|
if (streamCached && video.current) {
|
||||||
if (Hls.isSupported()) {
|
if (Hls.isSupported()) {
|
||||||
try {
|
try {
|
||||||
const hls = new Hls();
|
const hls = new Hls({
|
||||||
|
enableWorker: true,
|
||||||
|
lowLatencyMode: true,
|
||||||
|
backBufferLength: 90
|
||||||
|
});
|
||||||
hls.loadSource(streamCached);
|
hls.loadSource(streamCached);
|
||||||
hls.attachMedia(video.current);
|
hls.attachMedia(video.current);
|
||||||
hls.on(Hls.Events.ERROR, (event, data) => {
|
hls.on(Hls.Events.ERROR, (event, data) => {
|
||||||
|
Reference in New Issue
Block a user