Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug with unneeded rangeRemoval
MediaSource::setDurationInternal previously was supposed to remove buffer ranges if the new duration is less than old duration. It has been changed to remove all ranges that more that new duration. It caused RC and MediaElementEvents test failed. Due to 1. SourceBuffer::rangeRemoval sets m_updating = true; and starts a timer (SourceBuffer::removeTimerFired() where m_updating = false) 2. (When ms.duration = 1 is called from JavaScript) MediaSource::setDuration is called and checks for (auto& sourceBuffer : *m_sourceBuffers) { if (sourceBuffer->updating()){ return Exception { INVALID_STATE_ERR }; } } And an expection is thrown. Because SourceBuffer::removeTimerFired() is not emitted yet. So needs to remove ranges only if new duration is less than current.
- Loading branch information