Bug 1367868 - Don't hide media controls when error occurred for audio even if it hasn't been played yet. r=jaws

Unlike video element, audio has no status overlay to inform users if an
error occurred. Instead of hiding entire media controls, we should keep
it visible in order not confuse users, and see if we can come up with a
better approach such as making the buttons disabled afterwards.

MozReview-Commit-ID: 8YSCxbWwg2O

--HG--
extra : rebase_source : 0da6ce16fe28c7f1d0cbafe0c518f5c2c273abf1
This commit is contained in:
Ray Lin 2017-07-04 14:34:13 +08:00
Родитель aa82bd4422
Коммит bb0ee23e51
4 изменённых файлов: 32 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<audio controls></audio>
</body>
</html>

Просмотреть файл

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<audio src="bogus.mp3" controls></audio>
</body>
</html>

Просмотреть файл

@ -1,3 +1,4 @@
random-if(cocoaWidget||(/^Windows\x20NT\x206\.2/.test(http.oscpu)&&isDebugBuild)) == bug-442419-progressmeter-max.xul bug-442419-progressmeter-max-ref.xul # fails most of the time on Mac because progress meter animates
!= textbox-multiline-default-value.xul textbox-multiline-empty.xul
fails-if(styloVsGecko) == videocontrols-dynamically-add-cc.html videocontrols-dynamically-add-cc-ref.html
fails-if(styloVsGecko) == audio-with-bogus-url.html audio-with-bogus-url-ref.html

Просмотреть файл

@ -677,7 +677,7 @@
this.updateErrorText();
this.setupStatusFader(true);
// If video hasn't shown anything yet, disable the controls.
if (!this.firstFrameShown) {
if (!this.firstFrameShown && !this.isAudioOnly) {
this.startFadeOut(this.controlBar);
}
this.controlsSpacer.removeAttribute("hideCursor");