W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2013

[whatwg] Media sink device selection on <audio>/<video>

From: Ami Fischman <fischman@chromium.org>
Date: Tue, 17 Dec 2013 15:40:15 -0800
Message-ID: <CAHuR8a9JUb=Lxpc3fVFnmzw619PSR8P5mPNUgNPD3mvwc0_ehA@mail.gmail.com>
To: whatwg@whatwg.org
Recently <https://www.w3.org/Bugs/Public/show_bug.cgi?id=23263> Navigator
acquired the ability to enumerate media output devices (in addition to
input devices):
http://dev.w3.org/2011/webrtc/editor/getusermedia.html#enumerating-devices
It would be nice to allow media elements to direct their output to such an
output device.

The primary use-case is to allow app UI/script to select which audio output
device should play the audio track of a <video> or <audio> tag (wired
speakers, bluetooth headset, etc.).

A simple impl (mentioned only in case the above is too vague and would
benefit from concreteness; I have no attachment to this particular version)
would look like: extend html media elements with new
{audio,video}OutputDeviceId attributes which:
- when read provides the last-set value, or if never set, the UA's idea of
a default device (probably influenced by the OS's idea of a default device)
- when set directs the relevant type of output (audio/video) from the
element to the device in question
(specified as deviceId)

(note that the Media Capture spec only specifies an audioOut "kind", not a
videoOut "kind", so it probably makes sense to only offer an
audioOutputDeviceId attribute for now, but naming it "outputDeviceId"
(omitting "audio") might be a regrettable move in the future if/when Media
Capture adds "videoOut" to the kind enum).

Cheers,
-a
Received on Tuesday, 17 December 2013 23:40:41 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:14 UTC