Open Bug 1379629 Opened 7 years ago Updated 2 years ago

Show audio playback error messages as a tooltip

Categories

(Toolkit :: Video/Audio Controls, enhancement, P4)

56 Branch
x86_64
Windows 10
enhancement

Tracking

()

People

(Reporter: alex.fdm, Unassigned)

References

()

Details

Go to the very bottom of this page: https://www.opus-codec.org/examples/ ("Live HTTP streams" section)

*What showld happen: after closing bug 1368053, you should be able to play the Live HTTP Streams, or some indication that the streams cannot start.
*What happens: nothing happens when you click the "play" button.  I get the same problem on Chrome, but Edge shows an error message saying the audio is not available (I am not sure if it the stream is really not available or if Edge is missing the Opus codec).
Summary: Can't play for Live HTTP streams → Can't play Live HTTP streams
Component: Video/Audio Controls → Audio/Video: Playback
Product: Toolkit → Core
Component: Audio/Video: Playback → Video/Audio Controls
Product: Core → Toolkit
Did you mean to move this back?

It's not clear to me why this would be a front-end issue. Calling element.play() directly seems to similarly fail.
Flags: needinfo?(ajones)
Alexandre, do you have a page that doesn't use mixed content? That might be part of the reason why this is failing to play.

> Loading mixed (insecure) display content “http://repeater.xiph.org:8000/temporalfugue.opus” on a secure page
> Loading mixed (insecure) display content “http://repeater.xiph.org:8000/clock.opus” on a secure page
> HTTP load failed with status 404. Load of media resource http://repeater.xiph.org:8000/temporalfugue.opus failed.
> HTTP load failed with status 404. Load of media resource http://repeater.xiph.org:8000/clock.opus failed.
> $0.src -> "http://repeater.xiph.org:8000/temporalfugue.opus"
> $0.play()
>   Promise { "rejected" }
>     <state>: "rejected"
>     <reason>: DOMException
>     code: 9
>     columnNumber: 0
>     data: null
>     filename: "debugger eval code"
>     lineNumber: 1
>     message: "The media resource indicated by the src attribute or assigned media provider object was not suitable."
>     name: "NotSupportedError"
>     result: 2154692611
>     stack: "@debugger eval code:1:1\n"
>     __proto__: DOMExceptionPrototype { name: Getter, message: Getter, INDEX_SIZE_ERR: 1, … }
>     __proto__: PromiseProto { … }
Flags: needinfo?(alex.fdm)
Sorry, I just bumped into the problem on a page that I was visiting.  I have no other examples.

I reported it as a front-end issue because I assumed the stream is broken (since it does not play on other browsers too), but there's no indication of the error.  The button simply seems to do nothing, which is confusing.  Maybe disable the play button with a tooltip indicating the error?
Flags: needinfo?(alex.fdm)
Okay thanks. Yeah we could do something like that. For <audio> we don't have anywhere to show error messages like we do for <video>, but we could try using a tooltip over the controls.
I looked in to this and we can only get the tooltip to work by setting the `title` attribute on the media element. I don't think we will want to do this because we have tried very hard to not make parts of our media player accessible from the web page. Doing so would create a defacto API that we would have to maintain.
How about setting it to "Can't play 'title'" or "'title' can't be played"?
Basically we can't do anything that can be read by webpages because once we do that we will be forced to maintain it or else we may break some site that depends on it.
Depends on: 248862
Summary: Can't play Live HTTP streams → Show audio playback error messages as a tooltip
Priority: -- → P4
(In reply to Justin Dolske [:Dolske] from comment #1)
> Did you mean to move this back?
> 
> It's not clear to me why this would be a front-end issue. Calling
> element.play() directly seems to similarly fail.

In this case playback is failing due to a 404, which we could do a better job of surfacing to the UI. Fixing this only improves the page from very broken to broken. I'm not sure how much that matters.
Flags: needinfo?(ajones)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.