Abhi
Abhi

Reputation: 1574

Handle missing/out of order packets in mediasource extension

I'm trying to play live video using mpegts.js. When there are missing packets or out of order packets, I see

Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null

and the video stops

I'm getting the stream using a websocket connection. There's a destroyPlayer method on the player and when I call it, it closes websocket connection and I've added retry logic to create a new player and this opens a new websocket connection and this works.

But this causes few seconds of video to be missed and also, I don't want to create a new websocket connection. Also, I see this error in the console:

code: 3
message: "PIPELINE_ERROR_DECODE: Error Domain=NSOSStatusErrorDomain Code=-12909 \"(null)\" (-12909): VTDecompressionOutputCallback"

How do I handle this without creating a new websocket connection.

Upvotes: 1

Views: 90

Answers (0)

Related Questions