Closed
Bug 480376
Opened 15 years ago
Closed 12 years ago
Video should indicate when there's no audio track available
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: Dolske, Assigned: padenot)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
184.24 KB,
image/png
|
Details | |
13.80 KB,
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
It's not too uncommon for videos to have no audio track. It would be really nice if the video controls could indicate this, so that users know why there's no sound ("is something broken? is my volume too low? wtf?"). Unfortunately this info isn't available through the media element API, so this would need to be added to the HTML5 spec. The simplest way to expose this would be as |readonly boolean hasAudio|. Is the media backend capable of determining this this?
Comment 1•15 years ago
|
||
Yes we can determine if it has no audio track at the beginning. If we eventually support chained oggs then it may be possible for a track to appear as we download so some event to indicate the change of state may be needed.
Reporter | ||
Updated•14 years ago
|
Component: Video/Audio → Video/Audio Controls
Product: Core → Toolkit
QA Contact: video.audio → video.audio
Version: Trunk → unspecified
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → paul
Assignee | ||
Comment 2•12 years ago
|
||
Here is a possible patch and its test. If we play chained medias at some point, I suppose we will have to read metadata again (to prevent failure in case of number of channel or playback rate change), and therefore post new a |nsAudioMetadataEventRunner| to the main thread. That should update the |mozHasAudio| property.
Attachment #618878 -
Flags: review?(cpearce)
Comment 3•12 years ago
|
||
Comment on attachment 618878 [details] [diff] [review] v0 - implements mozHasAudio and adds a test. Review of attachment 618878 [details] [diff] [review]: ----------------------------------------------------------------- Nice. This seems a reasonable and way to expose this information until we implement AudioTrackList.
Attachment #618878 -
Flags: review?(cpearce) → review+
Comment 4•12 years ago
|
||
Jared: see Paul's attached patch, which will be enable them to detect when a video has no audio so they can hide the volume controls etc.
Updated•12 years ago
|
Component: Video/Audio Controls → Video/Audio
Product: Toolkit → Core
QA Contact: video.audio → video.audio
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 5•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b579fa03e84a Also, to make life easier for those checking in patches on your behalf, please follow the directions below for future patches you submit. Thanks! https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F https://developer.mozilla.org/en/Creating_a_patch_that_can_be_checked_in
Can't the HTML5 track API be used to check if there's an audio track? Assuming we implemented that of course...
Comment 7•12 years ago
|
||
Yes, as I mentioned in comment 3. It seems we can get a result sooner by taking this now than waiting for AudioTrackList to be implemented.
It wouldn't be that hard to implement enough of AudioTrackList to be useful here.
Comment 9•12 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b579fa03e84a
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Keywords: dev-doc-needed
Comment 10•12 years ago
|
||
Even better would be to set disabled (instead of noAudio), so that the button is no longer clickable (as muting no sound doesn't work ;-)
Comment 11•11 years ago
|
||
mozHasAudio is now documented in: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/15 and in https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•