Implement WebCodecsPlayer for video/audio decoding and rendering

This commit is contained in:
seydx
2026-03-17 14:05:28 +01:00
committed by Sergey Krashevich
parent 5efcfb741b
commit 0b6ac18043
3 changed files with 371 additions and 255 deletions
+10 -1
View File
@@ -77,9 +77,10 @@ class VideoStream extends VideoRTC {
case 'hls':
case 'mp4':
case 'mjpeg':
case 'webcodecs':
this.divMode = msg.type.toUpperCase();
break;
case 'webcodecs':
break;
}
};
@@ -99,6 +100,14 @@ class VideoStream extends VideoRTC {
this.divMode = 'RTC';
}
}
onwebcodecsready() {
this.divMode = 'WEBCODECS';
}
onwebcodecserror(error) {
this.divError = error;
}
}
customElements.define('video-stream', VideoStream);