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.
<rdar://problem/29184097>
Created attachment 294269 [details] Patch
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?
(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.
Created attachment 294286 [details] Patch for landing
Comment on attachment 294286 [details] Patch for landing Clearing flags on attachment: 294286 Committed r208491: <http://trac.webkit.org/changeset/208491>
All reviewed patches have been landed. Closing bug.