RESOLVED FIXED 164557
[Modern Media Controls] Media Controller: set status label according to media state
https://bugs.webkit.org/show_bug.cgi?id=164557
Summary [Modern Media Controls] Media Controller: set status label according to media...
Antoine Quint
Reported 2016-11-09 12:27:57 PST
Now that we have a way to display a custom status label in the media controls, we need to reflect it correctly based on the media loading and network state.
Attachments
Patch (14.97 KB, patch)
2016-11-09 12:54 PST, Antoine Quint
no flags
Patch for landing (14.84 KB, patch)
2016-11-09 14:04 PST, Antoine Quint
no flags
Radar WebKit Bug Importer
Comment 1 2016-11-09 12:34:54 PST
Antoine Quint
Comment 2 2016-11-09 12:54:56 PST
Dean Jackson
Comment 3 2016-11-09 12:56:42 PST
Comment on attachment 294269 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=294269&action=review > Source/WebCore/Modules/modern-media-controls/media/status-support.js:2 > + > +/* Blank line. > Source/WebCore/Modules/modern-media-controls/media/status-support.js:46 > + let statusText = ""; Might as well just assign directly to this.control.text > Source/WebCore/Modules/modern-media-controls/media/status-support.js:52 > + statusText = "Error"; > + if (media.duration === Number.POSITIVE_INFINITY && media.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA) > + statusText = "Live Broadcast"; > + if (media.readyState <= HTMLMediaElement.HAVE_NOTHING && media.networkState === HTMLMediaElement.NETWORK_LOADING) > + statusText = "Loading"; How are you going to localize these?
Antoine Quint
Comment 4 2016-11-09 12:57:59 PST
(In reply to comment #3) > Comment on attachment 294269 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=294269&action=review > > > Source/WebCore/Modules/modern-media-controls/media/status-support.js:2 > > + > > +/* > > Blank line. Will remove when landing. > > Source/WebCore/Modules/modern-media-controls/media/status-support.js:46 > > + let statusText = ""; > > Might as well just assign directly to this.control.text Sure. > > Source/WebCore/Modules/modern-media-controls/media/status-support.js:52 > > + statusText = "Error"; > > + if (media.duration === Number.POSITIVE_INFINITY && media.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA) > > + statusText = "Live Broadcast"; > > + if (media.readyState <= HTMLMediaElement.HAVE_NOTHING && media.networkState === HTMLMediaElement.NETWORK_LOADING) > > + statusText = "Loading"; > > How are you going to localize these? The same way I'll localise all other strings, using the same technique we've used for previous controls.
Antoine Quint
Comment 5 2016-11-09 14:04:10 PST
Created attachment 294286 [details] Patch for landing
WebKit Commit Bot
Comment 6 2016-11-09 14:37:52 PST
Comment on attachment 294286 [details] Patch for landing Clearing flags on attachment: 294286 Committed r208491: <http://trac.webkit.org/changeset/208491>
WebKit Commit Bot
Comment 7 2016-11-09 14:37:56 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.