Changeset 206146 in webkit
- Timestamp:
- Sep 20, 2016 8:26:19 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206133 r206146 1 2016-09-20 Jer Noble <jer.noble@apple.com> 2 3 [media-source] Support MediaSource.setLiveSeekableRanges() 4 https://bugs.webkit.org/show_bug.cgi?id=162252 5 6 Reviewed by Sam Weinig. 7 8 * platform/mac/TestExpectations: 9 * platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt: 10 * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: 11 * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt: 12 * platform/mac/js/dom/global-constructors-attributes-expected.txt: 13 1 14 2016-09-19 Devin Rousso <dcrousso+webkit@gmail.com> 2 15 -
trunk/LayoutTests/imported/w3c/ChangeLog
r206140 r206146 1 2016-09-20 Jer Noble <jer.noble@apple.com> 2 3 [media-source] Support MediaSource.setLiveSeekableRanges() 4 https://bugs.webkit.org/show_bug.cgi?id=162252 5 6 Reviewed by Sam Weinig. 7 8 * web-platform-tests/media-source/interfaces-expected.txt: 9 1 10 2016-09-19 Chris Dumez <cdumez@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt
r205777 r206146 1 1 2 2 PASS URL interface: operation createObjectURL(MediaSource) 3 PASS HTMLVideoElement interface: operation getVideoPlaybackQuality()4 3 PASS AudioTrack interface: attribute sourceBuffer 5 4 PASS VideoTrack interface: attribute sourceBuffer … … 68 67 PASS SourceBuffer interface: attribute onerror 69 68 PASS SourceBuffer interface: attribute onabort 70 PASS SourceBuffer interface: operation appendBuffer(ArrayBuffer) 71 PASS SourceBuffer interface: operation appendBuffer(ArrayBufferView) 72 PASS SourceBuffer interface: operation appendStream(ReadableStream,unsigned long long) 69 PASS SourceBuffer interface: operation appendBuffer(BufferSource) 73 70 PASS SourceBuffer interface: operation abort() 74 71 PASS SourceBuffer interface: operation remove(double,unrestricted double) 75 PASS SourceBuffer interface: attribute trackDefaults76 72 PASS SourceBuffer must be primary interface of sourceBuffer 77 73 PASS Stringification of sourceBuffer … … 91 87 PASS SourceBuffer interface: sourceBuffer must inherit property "onabort" with the proper type (13) 92 88 PASS SourceBuffer interface: sourceBuffer must inherit property "appendBuffer" with the proper type (14) 93 PASS SourceBuffer interface: calling appendBuffer(ArrayBuffer) on sourceBuffer with too few arguments must throw TypeError 94 PASS SourceBuffer interface: sourceBuffer must inherit property "appendBuffer" with the proper type (15) 95 PASS SourceBuffer interface: calling appendBuffer(ArrayBufferView) on sourceBuffer with too few arguments must throw TypeError 96 PASS SourceBuffer interface: sourceBuffer must inherit property "appendStream" with the proper type (16) 97 PASS SourceBuffer interface: calling appendStream(ReadableStream,unsigned long long) on sourceBuffer with too few arguments must throw TypeError 98 PASS SourceBuffer interface: sourceBuffer must inherit property "abort" with the proper type (17) 99 PASS SourceBuffer interface: sourceBuffer must inherit property "remove" with the proper type (18) 89 PASS SourceBuffer interface: calling appendBuffer(BufferSource) on sourceBuffer with too few arguments must throw TypeError 90 PASS SourceBuffer interface: sourceBuffer must inherit property "abort" with the proper type (15) 91 PASS SourceBuffer interface: sourceBuffer must inherit property "remove" with the proper type (16) 100 92 PASS SourceBuffer interface: calling remove(double,unrestricted double) on sourceBuffer with too few arguments must throw TypeError 101 PASS SourceBuffer interface: sourceBuffer must inherit property "trackDefaults" with the proper type (19)102 93 PASS EventTarget interface: sourceBuffer must inherit property "addEventListener" with the proper type (0) 103 94 PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on sourceBuffer with too few arguments must throw TypeError … … 125 116 PASS EventTarget interface: mediaSource.sourceBuffers must inherit property "dispatchEvent" with the proper type (2) 126 117 PASS EventTarget interface: calling dispatchEvent(Event) on mediaSource.sourceBuffers with too few arguments must throw TypeError 127 PASS VideoPlaybackQuality interface: existence and properties of interface object128 PASS VideoPlaybackQuality interface object length129 PASS VideoPlaybackQuality interface object name130 PASS VideoPlaybackQuality interface: existence and properties of interface prototype object131 PASS VideoPlaybackQuality interface: existence and properties of interface prototype object's "constructor" property132 PASS VideoPlaybackQuality interface: attribute creationTime133 PASS VideoPlaybackQuality interface: attribute totalVideoFrames134 PASS VideoPlaybackQuality interface: attribute droppedVideoFrames135 PASS VideoPlaybackQuality interface: attribute corruptedVideoFrames136 PASS VideoPlaybackQuality interface: attribute totalFrameDelay137 PASS VideoPlaybackQuality must be primary interface of video.getVideoPlaybackQuality()138 PASS Stringification of video.getVideoPlaybackQuality()139 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "creationTime" with the proper type (0)140 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "totalVideoFrames" with the proper type (1)141 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "droppedVideoFrames" with the proper type (2)142 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "corruptedVideoFrames" with the proper type (3)143 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "totalFrameDelay" with the proper type (4)144 PASS TrackDefault interface: existence and properties of interface object145 PASS TrackDefault interface object length146 PASS TrackDefault interface object name147 PASS TrackDefault interface: existence and properties of interface prototype object148 PASS TrackDefault interface: existence and properties of interface prototype object's "constructor" property149 PASS TrackDefault interface: attribute type150 PASS TrackDefault interface: attribute byteStreamTrackID151 PASS TrackDefault interface: attribute language152 PASS TrackDefault interface: attribute label153 PASS TrackDefault interface: operation getKinds()154 PASS TrackDefaultList interface: existence and properties of interface object155 PASS TrackDefaultList interface object length156 PASS TrackDefaultList interface object name157 PASS TrackDefaultList interface: existence and properties of interface prototype object158 PASS TrackDefaultList interface: existence and properties of interface prototype object's "constructor" property159 PASS TrackDefaultList interface: attribute length160 PASS TrackDefaultList must be primary interface of sourceBuffer.trackDefaults161 PASS Stringification of sourceBuffer.trackDefaults162 PASS TrackDefaultList interface: sourceBuffer.trackDefaults must inherit property "length" with the proper type (0)163 118 -
trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt
r205893 r206146 1984 1984 PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').enumerable is false 1985 1985 PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').configurable is true 1986 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').value is SourceBuffer 1987 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('get') is false 1988 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('set') is false 1989 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').enumerable is false 1990 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').configurable is true 1991 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').value is SourceBufferList 1992 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('get') is false 1993 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('set') is false 1994 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').enumerable is false 1995 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').configurable is true 1986 1996 PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').value is SpeechSynthesisEvent 1987 1997 PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
r205896 r206146 1999 1999 PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').enumerable is false 2000 2000 PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').configurable is true 2001 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').value is SourceBuffer 2002 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('get') is false 2003 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('set') is false 2004 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').enumerable is false 2005 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').configurable is true 2006 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').value is SourceBufferList 2007 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('get') is false 2008 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('set') is false 2009 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').enumerable is false 2010 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').configurable is true 2001 2011 PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').value is SpeechSynthesisEvent 2002 2012 PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/mac/TestExpectations
r206127 r206146 1059 1059 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-endofstream-invaliderror.html [ Pass ] 1060 1060 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality.html [ Pass ] 1061 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-liveseekable.html [ Pass ] 1061 1062 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-multiple-attach.html [ Pass ] 1062 1063 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-play-then-seek-back.html [ Pass ] … … 1066 1067 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-sourcebufferlist.html [ Pass ] 1067 1068 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-timestamp-offset.html [ Pass ] 1069 1070 # Passes, but will need rebaselining once <https://github.com/w3c/web-platform-tests/pull/3758> is merged 1071 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/interfaces.html [ Pass ] 1068 1072 1069 1073 # Newly failing Media Source tests -
trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt
r206145 r206146 1 1 2 2 PASS URL interface: operation createObjectURL(MediaSource) 3 PASS HTMLVideoElement interface: operation getVideoPlaybackQuality()4 3 PASS AudioTrack interface: attribute sourceBuffer 5 4 PASS VideoTrack interface: attribute sourceBuffer … … 29 28 PASS MediaSource interface: mediaSource must inherit property "readyState" with the proper type (2) 30 29 PASS MediaSource interface: mediaSource must inherit property "duration" with the proper type (3) 31 PASS MediaSource interface: mediaSource must inherit property "onsourceopen" with the proper type (4) 32 PASS MediaSource interface: mediaSource must inherit property "onsourceended" with the proper type (5) 33 PASS MediaSource interface: mediaSource must inherit property "onsourceclose" with the proper type (6) 30 FAIL MediaSource interface: mediaSource must inherit property "onsourceopen" with the proper type (4) Unrecognized type EventHandler 31 FAIL MediaSource interface: mediaSource must inherit property "onsourceended" with the proper type (5) Unrecognized type EventHandler 32 FAIL MediaSource interface: mediaSource must inherit property "onsourceclose" with the proper type (6) Unrecognized type EventHandler 34 33 PASS MediaSource interface: mediaSource must inherit property "addSourceBuffer" with the proper type (7) 35 34 PASS MediaSource interface: calling addSourceBuffer(DOMString) on mediaSource with too few arguments must throw TypeError … … 68 67 PASS SourceBuffer interface: attribute onerror 69 68 PASS SourceBuffer interface: attribute onabort 70 PASS SourceBuffer interface: operation appendBuffer(ArrayBuffer) 71 PASS SourceBuffer interface: operation appendBuffer(ArrayBufferView) 72 PASS SourceBuffer interface: operation appendStream(ReadableStream,unsigned long long) 69 PASS SourceBuffer interface: operation appendBuffer(BufferSource) 73 70 PASS SourceBuffer interface: operation abort() 74 71 PASS SourceBuffer interface: operation remove(double,unrestricted double) 75 PASS SourceBuffer interface: attribute trackDefaults76 72 PASS SourceBuffer must be primary interface of sourceBuffer 77 73 PASS Stringification of sourceBuffer … … 85 81 PASS SourceBuffer interface: sourceBuffer must inherit property "appendWindowStart" with the proper type (7) 86 82 PASS SourceBuffer interface: sourceBuffer must inherit property "appendWindowEnd" with the proper type (8) 87 PASS SourceBuffer interface: sourceBuffer must inherit property "onupdatestart" with the proper type (9) 88 PASS SourceBuffer interface: sourceBuffer must inherit property "onupdate" with the proper type (10) 89 PASS SourceBuffer interface: sourceBuffer must inherit property "onupdateend" with the proper type (11) 90 PASS SourceBuffer interface: sourceBuffer must inherit property "onerror" with the proper type (12) 91 PASS SourceBuffer interface: sourceBuffer must inherit property "onabort" with the proper type (13) 83 FAIL SourceBuffer interface: sourceBuffer must inherit property "onupdatestart" with the proper type (9) Unrecognized type EventHandler 84 FAIL SourceBuffer interface: sourceBuffer must inherit property "onupdate" with the proper type (10) Unrecognized type EventHandler 85 FAIL SourceBuffer interface: sourceBuffer must inherit property "onupdateend" with the proper type (11) Unrecognized type EventHandler 86 FAIL SourceBuffer interface: sourceBuffer must inherit property "onerror" with the proper type (12) Unrecognized type EventHandler 87 FAIL SourceBuffer interface: sourceBuffer must inherit property "onabort" with the proper type (13) Unrecognized type EventHandler 92 88 PASS SourceBuffer interface: sourceBuffer must inherit property "appendBuffer" with the proper type (14) 93 PASS SourceBuffer interface: calling appendBuffer(ArrayBuffer) on sourceBuffer with too few arguments must throw TypeError 94 PASS SourceBuffer interface: sourceBuffer must inherit property "appendBuffer" with the proper type (15) 95 PASS SourceBuffer interface: calling appendBuffer(ArrayBufferView) on sourceBuffer with too few arguments must throw TypeError 96 PASS SourceBuffer interface: sourceBuffer must inherit property "appendStream" with the proper type (16) 97 PASS SourceBuffer interface: calling appendStream(ReadableStream,unsigned long long) on sourceBuffer with too few arguments must throw TypeError 98 PASS SourceBuffer interface: sourceBuffer must inherit property "abort" with the proper type (17) 99 PASS SourceBuffer interface: sourceBuffer must inherit property "remove" with the proper type (18) 89 PASS SourceBuffer interface: calling appendBuffer(BufferSource) on sourceBuffer with too few arguments must throw TypeError 90 PASS SourceBuffer interface: sourceBuffer must inherit property "abort" with the proper type (15) 91 PASS SourceBuffer interface: sourceBuffer must inherit property "remove" with the proper type (16) 100 92 PASS SourceBuffer interface: calling remove(double,unrestricted double) on sourceBuffer with too few arguments must throw TypeError 101 PASS SourceBuffer interface: sourceBuffer must inherit property "trackDefaults" with the proper type (19)102 93 PASS EventTarget interface: sourceBuffer must inherit property "addEventListener" with the proper type (0) 103 94 PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on sourceBuffer with too few arguments must throw TypeError … … 117 108 PASS Stringification of mediaSource.sourceBuffers 118 109 PASS SourceBufferList interface: mediaSource.sourceBuffers must inherit property "length" with the proper type (0) 119 PASS SourceBufferList interface: mediaSource.sourceBuffers must inherit property "onaddsourcebuffer" with the proper type (1) 120 PASS SourceBufferList interface: mediaSource.sourceBuffers must inherit property "onremovesourcebuffer" with the proper type (2) 110 FAIL SourceBufferList interface: mediaSource.sourceBuffers must inherit property "onaddsourcebuffer" with the proper type (1) Unrecognized type EventHandler 111 FAIL SourceBufferList interface: mediaSource.sourceBuffers must inherit property "onremovesourcebuffer" with the proper type (2) Unrecognized type EventHandler 121 112 PASS EventTarget interface: mediaSource.sourceBuffers must inherit property "addEventListener" with the proper type (0) 122 113 PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on mediaSource.sourceBuffers with too few arguments must throw TypeError … … 125 116 PASS EventTarget interface: mediaSource.sourceBuffers must inherit property "dispatchEvent" with the proper type (2) 126 117 PASS EventTarget interface: calling dispatchEvent(Event) on mediaSource.sourceBuffers with too few arguments must throw TypeError 127 PASS VideoPlaybackQuality interface: existence and properties of interface object128 PASS VideoPlaybackQuality interface object length129 PASS VideoPlaybackQuality interface object name130 PASS VideoPlaybackQuality interface: existence and properties of interface prototype object131 PASS VideoPlaybackQuality interface: existence and properties of interface prototype object's "constructor" property132 PASS VideoPlaybackQuality interface: attribute creationTime133 PASS VideoPlaybackQuality interface: attribute totalVideoFrames134 PASS VideoPlaybackQuality interface: attribute droppedVideoFrames135 PASS VideoPlaybackQuality interface: attribute corruptedVideoFrames136 PASS VideoPlaybackQuality interface: attribute totalFrameDelay137 PASS VideoPlaybackQuality must be primary interface of video.getVideoPlaybackQuality()138 PASS Stringification of video.getVideoPlaybackQuality()139 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "creationTime" with the proper type (0)140 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "totalVideoFrames" with the proper type (1)141 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "droppedVideoFrames" with the proper type (2)142 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "corruptedVideoFrames" with the proper type (3)143 PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "totalFrameDelay" with the proper type (4)144 PASS TrackDefault interface: existence and properties of interface object145 PASS TrackDefault interface object length146 PASS TrackDefault interface object name147 PASS TrackDefault interface: existence and properties of interface prototype object148 PASS TrackDefault interface: existence and properties of interface prototype object's "constructor" property149 PASS TrackDefault interface: attribute type150 PASS TrackDefault interface: attribute byteStreamTrackID151 PASS TrackDefault interface: attribute language152 PASS TrackDefault interface: attribute label153 PASS TrackDefault interface: operation getKinds()154 PASS TrackDefaultList interface: existence and properties of interface object155 PASS TrackDefaultList interface object length156 PASS TrackDefaultList interface object name157 PASS TrackDefaultList interface: existence and properties of interface prototype object158 PASS TrackDefaultList interface: existence and properties of interface prototype object's "constructor" property159 PASS TrackDefaultList interface: attribute length160 PASS TrackDefaultList must be primary interface of sourceBuffer.trackDefaults161 PASS Stringification of sourceBuffer.trackDefaults162 PASS TrackDefaultList interface: sourceBuffer.trackDefaults must inherit property "length" with the proper type (0)163 118 -
trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
r205893 r206146 1999 1999 PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').enumerable is false 2000 2000 PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').configurable is true 2001 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').value is SourceBuffer 2002 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('get') is false 2003 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('set') is false 2004 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').enumerable is false 2005 PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').configurable is true 2006 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').value is SourceBufferList 2007 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('get') is false 2008 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('set') is false 2009 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').enumerable is false 2010 PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').configurable is true 2001 2011 PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').value is SpeechSynthesisEvent 2002 2012 PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('get') is false -
trunk/Source/WebCore/ChangeLog
r206145 r206146 1 2016-09-20 Jer Noble <jer.noble@apple.com> 2 3 [media-source] Support MediaSource.setLiveSeekableRanges() 4 https://bugs.webkit.org/show_bug.cgi?id=162252 5 6 Reviewed by Sam Weinig. 7 8 Fixes tests: imported/w3c/web-platform-tests/media-source/interfaces.html 9 imported/w3c/web-platform-tests/media-source/mediasource-liveseekable.html 10 11 Add support for a new part of the Media Source specification, the ability for clients to 12 specify the seekable ranges for a MediaSource-backed HTMLMediaElement. 13 14 Adding the live-seekable methods to MediaSource fixes a large number of the interfaces.html 15 tests, and the rest are fixed by adding on<event> handlers to MediaSource, SourceBuffer, 16 and SourceBufferList. 17 18 * Modules/mediasource/MediaSource.cpp: 19 (WebCore::MediaSource::seekable): 20 (WebCore::MediaSource::setLiveSeekableRange): 21 (WebCore::MediaSource::clearLiveSeekableRange): 22 * Modules/mediasource/MediaSource.h: 23 * Modules/mediasource/MediaSource.idl: 24 * Modules/mediasource/SourceBuffer.idl: 25 * Modules/mediasource/SourceBufferList.idl: 26 * Modules/mediasource/VideoPlaybackQuality.idl: 27 * html/HTMLMediaElement.cpp: 28 (WebCore::HTMLMediaElement::seekable): 29 1 30 2016-09-20 Per Arne Vollan <pvollan@apple.com> 2 31 -
trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp
r206127 r206146 260 260 m_pendingSeekTime = MediaTime::invalidTime(); 261 261 monitorSourceBuffers(); 262 } 263 264 Ref<TimeRanges> MediaSource::seekable() 265 { 266 // 6. HTMLMediaElement Extensions, seekable 267 // W3C Editor's Draft 16 September 2016 268 // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#htmlmediaelement-extensions 269 270 // ↳ If duration equals NaN: 271 // Return an empty TimeRanges object. 272 if (m_duration.isInvalid()) 273 return TimeRanges::create(); 274 275 // ↳ If duration equals positive Infinity: 276 if (m_duration.isPositiveInfinite()) { 277 auto buffered = this->buffered(); 278 // If live seekable range is not empty: 279 if (m_liveSeekable && m_liveSeekable->length()) { 280 // Let union ranges be the union of live seekable range and the HTMLMediaElement.buffered attribute. 281 buffered->unionWith(*m_liveSeekable); 282 // Return a single range with a start time equal to the earliest start time in union ranges 283 // and an end time equal to the highest end time in union ranges and abort these steps. 284 buffered->add(buffered->start(0), buffered->maximumBufferedTime()); 285 return TimeRanges::create(*buffered); 286 } 287 288 // If the HTMLMediaElement.buffered attribute returns an empty TimeRanges object, then return 289 // an empty TimeRanges object and abort these steps. 290 if (!buffered->length()) 291 return TimeRanges::create(); 292 293 // Return a single range with a start time of 0 and an end time equal to the highest end time 294 // reported by the HTMLMediaElement.buffered attribute. 295 return TimeRanges::create({MediaTime::zeroTime(), buffered->maximumBufferedTime()}); 296 } 297 298 299 // ↳ Otherwise: 300 // Return a single range with a start time of 0 and an end time equal to duration. 301 return TimeRanges::create({MediaTime::zeroTime(), m_duration}); 302 } 303 304 void MediaSource::setLiveSeekableRange(double start, double end, ExceptionCode& ec) 305 { 306 // W3C Editor's Draft 16 September 2016 307 // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#dom-mediasource-setliveseekablerange 308 309 // If the readyState attribute is not "open" then throw an InvalidStateError exception and abort these steps. 310 if (!isOpen()) { 311 ec = INVALID_STATE_ERR; 312 return; 313 } 314 315 // If start is negative or greater than end, then throw a TypeError exception and abort these steps. 316 if (start < 0 || start > end) { 317 ec = TypeError; 318 return; 319 } 320 321 // Set live seekable range to be a new normalized TimeRanges object containing a single range 322 // whose start position is start and end position is end. 323 m_liveSeekable = std::make_unique<PlatformTimeRanges>(MediaTime::createWithDouble(start), MediaTime::createWithDouble(end)); 324 } 325 326 void MediaSource::clearLiveSeekableRange(ExceptionCode& ec) 327 { 328 // W3C Editor's Draft 16 September 2016 329 // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#dom-mediasource-clearliveseekablerange 330 331 // If the readyState attribute is not "open" then throw an InvalidStateError exception and abort these steps. 332 if (!isOpen()) { 333 ec = INVALID_STATE_ERR; 334 return; 335 } 336 m_liveSeekable = nullptr; 262 337 } 263 338 -
trunk/Source/WebCore/Modules/mediasource/MediaSource.h
r206127 r206146 83 83 bool isSeeking() const { return m_pendingSeekTime.isValid(); } 84 84 void completeSeek(); 85 Ref<TimeRanges> seekable(); 86 void setLiveSeekableRange(double start, double end, ExceptionCode&); 87 void clearLiveSeekableRange(ExceptionCode&); 88 85 89 86 90 void setDuration(double, ExceptionCode&); … … 144 148 RefPtr<SourceBufferList> m_activeSourceBuffers; 145 149 mutable std::unique_ptr<PlatformTimeRanges> m_buffered; 150 std::unique_ptr<PlatformTimeRanges> m_liveSeekable; 146 151 HTMLMediaElement* m_mediaElement; 147 152 MediaTime m_duration; -
trunk/Source/WebCore/Modules/mediasource/MediaSource.idl
r205890 r206146 57 57 58 58 static boolean isTypeSupported (DOMString type); 59 60 [RaisesException] void setLiveSeekableRange(double start, double end); 61 [RaisesException] void clearLiveSeekableRange(); 62 63 attribute EventHandler onsourceopen; 64 attribute EventHandler onsourceended; 65 attribute EventHandler onsourceclose; 59 66 }; -
trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl
r206028 r206146 38 38 Conditional=MEDIA_SOURCE, 39 39 ExportMacro=WEBCORE_EXPORT, 40 NoInterfaceObject,41 40 ] interface SourceBuffer : EventTarget { 42 41 … … 66 65 [RaisesException] void abort(); 67 66 [RaisesException] void remove(unrestricted double start, unrestricted double end); 67 68 attribute EventHandler onupdatestart; 69 attribute EventHandler onupdate; 70 attribute EventHandler onupdateend; 71 attribute EventHandler onerror; 72 attribute EventHandler onabort; 68 73 }; 69 74 -
trunk/Source/WebCore/Modules/mediasource/SourceBufferList.idl
r196568 r206146 31 31 [ 32 32 Conditional=MEDIA_SOURCE, 33 NoInterfaceObject,34 33 GenerateIsReachable=Impl, 35 34 CallWith=ScriptExecutionContext, … … 37 36 readonly attribute unsigned long length; 38 37 getter SourceBuffer item(unsigned long index); 38 39 attribute EventHandler onaddsourcebuffer; 40 attribute EventHandler onremovesourcebuffer; 39 41 }; 40 42 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r206127 r206146 4837 4837 Ref<TimeRanges> HTMLMediaElement::seekable() const 4838 4838 { 4839 #if ENABLE(MEDIA_SOURCE) 4840 if (m_mediaSource) 4841 return m_mediaSource->seekable(); 4842 #endif 4843 4839 4844 if (m_player) 4840 4845 return TimeRanges::create(*m_player->seekable());
Note: See TracChangeset
for help on using the changeset viewer.