HomeiOS Developmentjavascript - Sourcebuffer.appendBuffer throws InvalidState exception on iOS

javascript – Sourcebuffer.appendBuffer throws InvalidState exception on iOS


I’m attempting to visualise in an HTML5 video component a stream of frames I obtain from a server. I’ve carried out it utilizing a sourceBuffer in response to this

The streaming works completely on Desktop (Edge, Chrome, Firefox) and on Android however on iOS the system throws an “InvalidState exception – Object just isn’t in a legitimate state” every time I attempt to append a brand new body to the buffer.

I’ve learn round this could be a mimetype codec drawback however even attempting lots of them it nonetheless doesn’t work

I’ve tried utilizing completely different codecs in response to this

mimeCodec="video/mp4; codecs="avc1.64001F"

I’ve additionally checked the system assist the used codec by including this checkbut it alsways return true:

if (!("MediaSource' in window && MediaSource.isTypeSupported(mimeCodec))) {
   reject('Unsupported MIME sort or codec: ' + mimeCodec);
}

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments