Hi. I use this project in ws-scrcpy to display smartphone screen in a web browser.
For a long session it is possible to use all available memory, so I need to be able to remove data from SourceBuffer.
const converter = new VideoConverter(tag, fps, fpf);
// later, when we know we have too much data buffered
if (!converter.sourceBuffer.updating) {
converter.sourceBuffer.remove(start, end);
}
When device is rotated, I receive SPS frame with new dementions. To handle changes I need:
2.1. Parse each SPS & PPS
2.2. Create initSegment's for each IDR frame
Also in Safari video rendering will stop, if you remove last initSegment, i.e. we can't remove segments from SourceBuffer in Safari in the current version (because VideoConverter creates only one initSegment).
Hi. I use this project in ws-scrcpy to display smartphone screen in a web browser.
SourceBuffer
.SPS
frame with new dementions. To handle changes I need: 2.1. Parse eachSPS
&PPS
2.2. CreateinitSegment
's for each IDR frameAlso in Safari video rendering will stop, if you remove last
initSegment
, i.e. we can't remove segments fromSourceBuffer
in Safari in the current version (becauseVideoConverter
creates only oneinitSegment
).refs https://github.com/NetrisTV/ws-scrcpy/issues/111