Changeset 278622 in webkit
- Timestamp:
- Jun 8, 2021, 11:39:39 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/media/modern-media-controls/overflow-support (added)
-
LayoutTests/http/tests/media/modern-media-controls/overflow-support/playback-speed-live-broadcast-expected.txt (added)
-
LayoutTests/http/tests/media/modern-media-controls/overflow-support/playback-speed-live-broadcast.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/modern-media-controls/media/overflow-support.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r278618 r278622 1 2021-06-08 Devin Rousso <drousso@apple.com> 2 3 [Modern Media Controls] Don't show Playback Speed when up-to-date Live Boadcasts 4 https://bugs.webkit.org/show_bug.cgi?id=226744 5 6 Reviewed by Eric Carlson. 7 8 * http/tests/media/modern-media-controls/overflow-support/playback-speed-live-broadcast.html: Added. 9 * http/tests/media/modern-media-controls/overflow-support/playback-speed-live-broadcast-expected.txt: Added. 10 1 11 2021-06-08 Devin Rousso <drousso@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r278621 r278622 1 2021-06-08 Devin Rousso <drousso@apple.com> 2 3 [Modern Media Controls] Don't show Playback Speed when up-to-date Live Boadcasts 4 https://bugs.webkit.org/show_bug.cgi?id=226744 5 6 Reviewed by Eric Carlson. 7 8 Test: http/tests/media/modern-media-controls/overflow-support/playback-speed-live-broadcast.html 9 10 * Modules/modern-media-controls/media/overflow-support.js: 11 (OverflowSupport.prototype.get mediaEvents): 12 (OverflowSupport.prototype.syncControl): 13 (OverflowSupport.prototype.get _includePlaybackRates): Added. 14 Rework existing logic that determines whether to include "Playback Speed" into a separate 15 function for clarity. 16 1 17 2021-06-08 Antti Koivisto <antti@apple.com> 2 18 -
trunk/Source/WebCore/Modules/modern-media-controls/media/overflow-support.js
r278618 r278622 31 31 get mediaEvents() 32 32 { 33 return ["loadstart", "loadedmetadata"]; 33 return [ 34 "abort", 35 "canplay", 36 "canplaythrough", 37 "durationchange", 38 "emptied", 39 "error", 40 "loadeddata", 41 "loadedmetadata", 42 "loadstart", 43 "playing", 44 "stalled", 45 "suspend", 46 "waiting", 47 ]; 34 48 } 35 49 … … 55 69 let defaultContextMenuOptions = {}; 56 70 57 if ( !this.mediaController.hidePlaybackRates && (!window.MediaStream || !(this.mediaController.media.srcObject instanceof MediaStream)))71 if (this._includePlaybackRates) 58 72 defaultContextMenuOptions.includePlaybackRates = true; 59 73 … … 70 84 } 71 85 86 // Private 87 88 get _includePlaybackRates() 89 { 90 if (this.mediaController.hidePlaybackRates) 91 return false; 92 93 let media = this.mediaController.media; 94 95 if (media.duration === Number.POSITIVE_INFINITY && media.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA) { 96 // Do not allow adjustment of the playback rate for live broadcasts. 97 return false; 98 } 99 100 if (window.MediaStream && media.srcObject instanceof MediaStream) { 101 // http://w3c.github.io/mediacapture-main/#mediastreams-in-media-elements 102 // "playbackRate" - A MediaStream is not seekable. 103 return false; 104 } 105 106 return true; 107 } 108 72 109 }
Note:
See TracChangeset
for help on using the changeset viewer.