mirror of
https://github.com/p-stream/p-stream.git
synced 2026-04-21 03:22:33 +00:00
update error exclusions to list format
This commit is contained in:
parent
81944eac2d
commit
97c7bcbc2e
1 changed files with 8 additions and 3 deletions
|
|
@ -149,6 +149,9 @@ export function makeVideoElementDisplayInterface(): DisplayInterface {
|
||||||
throw new Error("HLS not supported. Update your browser. 🤦♂️");
|
throw new Error("HLS not supported. Update your browser. 🤦♂️");
|
||||||
if (!hls) {
|
if (!hls) {
|
||||||
hls = new Hls({
|
hls = new Hls({
|
||||||
|
lowLatencyMode: true,
|
||||||
|
backBufferLength: 120,
|
||||||
|
autoStartLoad: true,
|
||||||
maxBufferSize: 500 * 1000 * 1000, // 500 mb of buffering, should load more fragments at once
|
maxBufferSize: 500 * 1000 * 1000, // 500 mb of buffering, should load more fragments at once
|
||||||
fragLoadPolicy: {
|
fragLoadPolicy: {
|
||||||
default: {
|
default: {
|
||||||
|
|
@ -168,13 +171,15 @@ export function makeVideoElementDisplayInterface(): DisplayInterface {
|
||||||
},
|
},
|
||||||
renderTextTracksNatively: false,
|
renderTextTracksNatively: false,
|
||||||
});
|
});
|
||||||
hls.on(Hls.Events.ERROR, (event, data) => {
|
const exceptions = [
|
||||||
|
"Failed to execute 'appendBuffer' on 'SourceBuffer': This SourceBuffer has been removed from the parent media source.",
|
||||||
|
];
|
||||||
|
hls?.on(Hls.Events.ERROR, (event, data) => {
|
||||||
console.error("HLS error", data);
|
console.error("HLS error", data);
|
||||||
if (
|
if (
|
||||||
data.fatal &&
|
data.fatal &&
|
||||||
src?.url === data.frag?.baseurl &&
|
src?.url === data.frag?.baseurl &&
|
||||||
data.error.message !==
|
!exceptions.includes(data.error.message)
|
||||||
"Failed to execute 'appendBuffer' on 'SourceBuffer': This SourceBuffer has been removed from the parent media source."
|
|
||||||
) {
|
) {
|
||||||
emit("error", {
|
emit("error", {
|
||||||
message: data.error.message,
|
message: data.error.message,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue