Changeset 262169 in webkit


Ignore:
Timestamp:
May 26, 2020 5:21:59 PM (2 years ago)
Author:
jer.noble@apple.com
Message:

Can't scrub video on https://www.judiciary.senate.gov
https://bugs.webkit.org/show_bug.cgi?id=212270
<rdar://problem/57922919>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time-expected.txt:

Source/WebCore:

Test: media/video-duration-seekable.html

www.judiciary.senate.gov uses the Akamai Media Player, which doesn't query HTMLMediaElement.duration
directly. Rather, when it receives a "durationchange" event, it calculates the duration by using the
HTMLMediaElement.seekable ranges to determine the effective media duration. But no event is fired when
the seekable ranges change, and when they first query HTMLMediaElement.seekable, AVFoundation hasn't
yet updated seekable ranges, so we report an empty set of seekable ranges.

The HTML specification suggests that UAs "should adopt a very liberal and optimistic view of what is
seekable." With that advice in mind, when we are asked by the page for our seekable ranges, and we do
not yet have the official ranges from AVPlayerItem, lets just respond with [0, duration).

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable const):

LayoutTests:

  • media/video-duration-seekable-expected.txt: Added.
  • media/video-duration-seekable.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r262164 r262169  
     12020-05-26  Jer Noble  <jer.noble@apple.com>
     2
     3        Can't scrub video on https://www.judiciary.senate.gov
     4        https://bugs.webkit.org/show_bug.cgi?id=212270
     5        <rdar://problem/57922919>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * media/video-duration-seekable-expected.txt: Added.
     10        * media/video-duration-seekable.html: Added.
     11
    1122020-05-26  Jason Lawrence  <lawrence.j@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r262154 r262169  
     12020-05-26  Jer Noble  <jer.noble@apple.com>
     2
     3        Can't scrub video on https://www.judiciary.senate.gov
     4        https://bugs.webkit.org/show_bug.cgi?id=212270
     5        <rdar://problem/57922919>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time-expected.txt:
     10
    1112020-05-26  Antoine Quint  <graouts@apple.com>
    212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time-expected.txt

    r242595 r262169  
    11
    2 FAIL seek to negative time The index is not in the allowed range.
     2FAIL seek to negative time assert_equals: currentTime after setting expected 0 but got -1
    33
  • trunk/Source/WebCore/ChangeLog

    r262155 r262169  
     12020-05-26  Jer Noble  <jer.noble@apple.com>
     2
     3        Can't scrub video on https://www.judiciary.senate.gov
     4        https://bugs.webkit.org/show_bug.cgi?id=212270
     5        <rdar://problem/57922919>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Test: media/video-duration-seekable.html
     10
     11        www.judiciary.senate.gov uses the Akamai Media Player, which doesn't query HTMLMediaElement.duration
     12        directly. Rather, when it receives a "durationchange" event, it calculates the duration by using the
     13        HTMLMediaElement.seekable ranges to determine the effective media duration. But no event is fired when
     14        the seekable ranges change, and when they first query HTMLMediaElement.seekable, AVFoundation hasn't
     15        yet updated seekable ranges, so we report an empty set of seekable ranges.
     16
     17        The HTML specification suggests that UAs "should adopt a very liberal and optimistic view of what is
     18        seekable." With that advice in mind, when we are asked by the page for our seekable ranges, and we do
     19        not yet have the official ranges from AVPlayerItem, lets just respond with [0, duration).
     20
     21        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     22        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable const):
     23
    1242020-05-25  Darin Adler  <darin@apple.com>
    225
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r261460 r262169  
    13921392        m_cachedSeekableRanges = [m_avPlayerItem seekableTimeRanges];
    13931393
     1394    if (![m_cachedSeekableRanges count])
     1395        return platformDuration();
     1396
    13941397    MediaTime maxTimeSeekable;
    13951398    for (NSValue *thisRangeValue in m_cachedSeekableRanges.get()) {
Note: See TracChangeset for help on using the changeset viewer.