fix attach decoder

This commit is contained in:
SrGooglo 2023-08-20 03:08:40 +00:00
parent 81312b0781
commit 1a8120fefb

View File

@ -213,13 +213,13 @@ export default class StreamViewer extends React.Component {
} }
// load the flv decoder (by default) // load the flv decoder (by default)
if (this.state.stream) { if (stream) {
if (!this.state.stream.sources) { if (!stream.sources) {
console.error("Stream sources not found") console.error("Stream sources not found")
return return
} }
await this.loadDecoder("flv", this.state.stream.sources.flv) await this.loadDecoder("flv", stream.sources.flv)
} }
// TODO: Watch ws to get livestream:started event and load the decoder if it's not loaded // TODO: Watch ws to get livestream:started event and load the decoder if it's not loaded