[webkit-changes] [WebKit/WebKit] 252b97: ManagedMediaSource emits stream start and end even...

Jean-Yves Avenard noreply at github.com
Thu May 11 14:49:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 252b97f1b34ba4e266b7419669db49631b7fae96
      https://github.com/WebKit/WebKit/commit/252b97f1b34ba4e266b7419669db49631b7fae96
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2023-05-11 (Thu, 11 May 2023)

  Changed paths:
    A LayoutTests/media/media-source/media-managedmse-streaming-atend-expected.txt
    A LayoutTests/media/media-source/media-managedmse-streaming-atend.html
    M LayoutTests/media/media-source/media-managedmse-streaming.html
    M Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp
    M Source/WebCore/Modules/mediasource/MediaSource.cpp

  Log Message:
  -----------
  ManagedMediaSource emits stream start and end events during live playback with short forward buffer
https://bugs.webkit.org/show_bug.cgi?id=256639
rdar://108914679

Reviewed by Youenn Fablet.

Do not emit `endstreaming` event when we have buffered up-to media source's
duration unless the source is ended.
Per the MSE's specs; the duration of a media element can be extended
whenever new content is appended to the source buffer past the duration.
So having the video buffered all the way to the element's duration doesn't
indicate that no more data is to be fetched; only a call to `endOfStream`
should.

* LayoutTests/media/media-source/media-managedmse-streaming-atend-expected.txt: Added.
* LayoutTests/media/media-source/media-managedmse-streaming-atend.html: Copied from LayoutTests/media/media-source/media-managedmse-streaming.html.
* LayoutTests/media/media-source/media-managedmse-streaming.html: Remove unused variables.
* Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp:
(WebCore::ManagedMediaSource::monitorSourceBuffers):
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::onReadyStateChange): Force re-check when the mediasource ready state change.

Canonical link: https://commits.webkit.org/263984@main




More information about the webkit-changes mailing list