Window: vrdisplayconnect event

L'événement vrdisplayconnect de l'API WebVR est déclenché lorsqu'un écran VR compatible est connecté à l'ordinateur.

Bulles Non
Annulable Non
Interface VRDisplayEvent (en-US)
Propriété de gestionnaire d'événements onvrdisplayconnect (en-US)

Exemples

Vous pouvez utiliser l'événement vrdisplayconnect dans une méthode addEventListener :

js
window.addEventListener("vrdisplayconnect", function () {
  info.textContent = "Affichage connecté.";
  reportDisplays();
});

Ou utilisez la propriété du gestionnaire d'événements onvrdisplayconnect (en-US) :

js
window.onvrdisplayconnect = function () {
  info.textContent = "Affichage connecté.";
  reportDisplays();
};

Spécifications

No specification found

No specification data found for api.Window.vrdisplayconnect_event.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Compatibilité des navigateurs

BCD tables only load in the browser

Voir aussi