Skip to main content

camerastatuschange

Description

This event is emitted when the status of the camera changes. See onCameraStatusChange from XR8.addCameraPipelineModule() for more information on the possible status.

Example

var handleCameraStatusChange = function handleCameraStatusChange(event) {
console.log('status change', event.detail.status);

switch (event.detail.status) {
case 'requesting':
// Do something
break;

case 'hasStream':
// Do something
break;

case 'failed':
event.target.emit('realityerror');
break;
}
};
let scene = this.el.sceneEl
scene.addEventListener('camerastatuschange', handleCameraStatusChange)