Casting and AirPlay of a media element, from Remote Playback: whether a device is available, the browser's picker of devices, and the connection to one, as data.
Firefox has no Remote Playback, so there no device is available and prompt! answers {:refused :not-supported}. WebKit also fires its older AirPlay events, which watch! follows as well, since Video.js finds the standard events unreliable in Safari.
Casting and AirPlay of a media element, from Remote Playback: whether a
device is available, the browser's picker of devices, and the connection
to one, as data.
Firefox has no Remote Playback, so there no device is available and
prompt! answers {:refused :not-supported}. WebKit also fires its older
AirPlay events, which watch! follows as well, since Video.js finds the
standard events unreliable in Safari.(disable! element)Keep the media element off remote devices, which also takes it out of
the browser's own controls and picker.
The call removes the element's x-webkit-airplay attribute too, since on an iPhone its value "allow" lets a video use AirPlay all the same.
Keep the media `element` off remote devices, which also takes it out of the browser's own controls and picker. The call removes the element's x-webkit-airplay attribute too, since on an iPhone its value "allow" lets a video use AirPlay all the same.
(prompt! element)Show the browser's picker of remote devices for the media element,
e.g. at a click of a cast button, and return a promise of the answer,
which never rejects:
Show the browser's picker of remote devices for the media `element`,
e.g. at a click of a cast button, and return a promise of the answer,
which never rejects:
- {:state :connecting}, or another state, once the user has picked
- {:refused :not-allowed} without a click
- {:refused :dismissed} where the user closed the picker, which Chrome
also answers without a click
- {:refused :no-devices} where there's no device to pick
- {:refused :disabled} for an element with disableremoteplayback
- {:refused :not-supported} where the browser has no Remote Playback,
e.g. Firefox(state element)The remote playback of the media element now, as watch! passes it,
e.g. {:availability :unknown :state :disconnected}.
The :state is the connection to a remote device: :disconnected, :connecting or :connected. Only watch! learns whether a device is available, so the :availability is :unknown where the browser has Remote Playback, and :unavailable where it hasn't.
The remote playback of the media `element` now, as watch! passes it,
e.g. {:availability :unknown :state :disconnected}.
The :state is the connection to a remote device: :disconnected,
:connecting or :connected. Only watch! learns whether a device is
available, so the :availability is :unknown where the browser has Remote
Playback, and :unavailable where it hasn't.(watch! element f)Call f with the remote playback of the media element now and
whenever it changes, and return a function that stops it, e.g.
{:availability :available :state :disconnected}.
The :availability is :available or :unavailable as the browser says, and :unknown until it has, or where it looks for devices only while its picker is open. The :state is :disconnected, :connecting or :connected, as in state.
Call `f` with the remote playback of the media `element` now and
whenever it changes, and return a function that stops it, e.g.
{:availability :available :state :disconnected}.
The :availability is :available or :unavailable as the browser says, and
:unknown until it has, or where it looks for devices only while its
picker is open. The :state is :disconnected, :connecting or :connected,
as in state.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |