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

FYI regarding how output devices enumerated from getMediaDevices would
actually be used in conjunction with a <video/>.

---------- Forwarded message ----------
From: Ami Fischman <fischman@chromium.org>
Date: Tue, Dec 17, 2013 at 3:40 PM
Subject: [whatwg] Media sink device selection on <audio>/<video>
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 Wednesday, 18 December 2013 00:49:20 UTC