RemotePlayback: connecting event
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Theconnecting event of theRemotePlayback interface fires when the user agent initiates remote playback.
In this article
Syntax
Use the event name in methods likeaddEventListener(), or set an event handler property.
js
addEventListener("connecting", (event) => { })onconnecting = (event) => { }Event type
A genericEvent.
Example
In the following example the value ofRemotePlayback.state is printed to the console when the user agent initiates a connection.
js
RemotePlayback.onconnecting = () => { console.log(RemotePlayback.state);};Specifications
| Specification |
|---|
| Remote Playback API> # dom-remoteplayback-onconnecting> |