⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 288413 in webkit


Ignore:
Timestamp:
Jan 22, 2022, 7:38:09 PM (5 years ago)
Author:
Peng Liu
Message:

REGRESSION (Safari 15?): Blob videos slow to pause, affects CBS and CNN
​https://bugs.webkit.org/show_bug.cgi?id=234066

Reviewed by Jer Noble.

MediaPlayerPrivateMediaSourceAVFObjC::playInternal() calls [m_synchronizer setRate:],
which will make the return value of MediaPlayerPrivateMediaSourceAVFObjC::paused() change
from true to false. But it won't push the new paused value back to the Web process.

RemoteMediaPlayerProxy::play() does call sendCachedState() after calling
m_player->play(), but because MediaPlayerPrivateMediaSourceAVFObjC::playInternal() is not
called in the same run loop, sendCachedState() won't send back the updated paused value either.

In most cases, this is not an issue, because other member functions of RemoteMediaPlayerProxy
will call sendCachedState() to push the updated paused value back to the Web process later.
However, we did find some videos need the paused value to be pushed back the Web process
in a timely manner.

No new tests, manually tested.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r288412 r288413  
     12022-01-22  Peng Liu  <peng.liu6@apple.com>
     2
     3        REGRESSION (Safari 15?): Blob videos slow to pause, affects CBS and CNN
     4        https://bugs.webkit.org/show_bug.cgi?id=234066
     5
     6        Reviewed by Jer Noble.
     7
     8        `MediaPlayerPrivateMediaSourceAVFObjC::playInternal()` calls `[m_synchronizer setRate:]`,
     9        which will make the return value of `MediaPlayerPrivateMediaSourceAVFObjC::paused()` change
     10        from true to false. But it won't push the new `paused` value back to the Web process.
     11
     12        `RemoteMediaPlayerProxy::play()` does call `sendCachedState()` after calling
     13        `m_player->play()`, but because `MediaPlayerPrivateMediaSourceAVFObjC::playInternal()` is not
     14        called in the same run loop, `sendCachedState()` won't send back the updated `paused` value either.
     15
     16        In most cases, this is not an issue, because other member functions of `RemoteMediaPlayerProxy`
     17        will call `sendCachedState()` to push the updated `paused` value back to the Web process later.
     18        However, we did find some videos need the `paused` value to be pushed back the Web process
     19        in a timely manner.
     20
     21        No new tests, manually tested.
     22
     23        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
     24        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
     25
    1262022-01-22  Said Abou-Hallawa  <said@apple.com>
    227
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm

    r288315 r288413  
    351351    [m_synchronizer setRate:m_rate];
    352352#endif
     353
     354    m_player->playbackStateChanged();
    353355}
    354356
    … …  
    381383    [m_synchronizer setRate:0];
    382384#endif
     385
     386    m_player->playbackStateChanged();
    383387}
    384388
Note: See TracChangeset for help on using the changeset viewer.