export const CHANNEL_EVENTS = { channelEvent: 'channel.event', channelJoin: 'channel.join', channelGetPeers: 'channel.getPeers', channelTriggerStateEvent: 'channel.triggerStateEvent', channelState: 'channel.state', channelLeave: 'peer.disconnected', updatePeerAppData: 'peer.updateAppData', activityConfirm: 'channel.confirmActivity', activityConfirmationAcquired: 'channel.activityConfirmationAcquired', activityConfirmationRequired: 'channel.activityConfirmationRequired', activityConfirmationExpired: 'channel.activityConfirmationExpired', getAudioObserverProducer: 'channel.getAudioObserverProducer', changeProducePermissions: 'channel.changeProducePermissions', deleteProducePermissions: 'channel.deleteProducePermissions', changePeerProducePermissions: 'peer.changeProducePermissions', addPeerProducePermissions: 'peer.addProducePermissions', removePeerProducePermissions: 'peer.removeProducePermissions', changePeerGroups: 'peer.groupsChanged', ping: 'peer.ping', audioObserverMessage: 'audioObserver.message', } as const; export const CLIENT_EVENTS = { channelEvent: 'channel-event', peerJoined: 'peer-joined', peerLeft: 'peer-left', activityConfirmationRequired: 'channel-activity-confirmation-required', activityConfirmationAcquired: 'channel-activity-confirmation-acquired', activityConfirmationExpired: 'channel-activity-confirmation-expired', channelRejoinRequired: 'channel-rejoin-required', devicesListUpdated: 'devices-list-updated', transportConnectionTimeout: 'transport-connection-timeout', trackForceClosed: 'track-force-closed', trackFailed: 'track-failed', activeSpeakerChanged: 'active-speaker-changed', channelStateInconsistent: 'channel-state-inconsistent', connectionLost: 'connection-lost', connectionRestored: 'connection-restored', forcedDisconnect: 'forced-disconnect', rejectUnauthorized: 'reject-unauthorized', denoiserInitializing: 'denoiser-initializing', channelStateSynced: 'channel-state-synced', denoiserEnabled: 'denoiser-enabled', denoiserDisabled: 'denoiser-disabled', denoiserFallback: 'denoiser-fallback', denoiserFailed: 'denoiser-failed', } as const; export const TRACK_EVENTS = { volumeChanged: 'volume-changed', } as const; export const INTERNAL_CLIENT_EVENTS = { trackProduced: 'track-produced', trackUnproduced: 'track-unproduced', trackPaused: 'track-paused', trackResumed: 'track-resumed', trackClosed: 'track-closed', trackReopened: 'track-reopened', trackFailed: 'track-failed', } as const; export const PEER_EVENTS = { mediaPublished: 'media-published', mediaUnPublished: 'media-unpublished', publisherPaused: 'publisher-paused', publisherResumed: 'publisher-resumed', connectionQualityChanged: 'connection-quality-changed', trackStart: 'track-start', trackEnd: 'track-end', trackPaused: 'track-paused', trackResumed: 'track-resumed', trackFailed: 'track-failed', appDataUpdated: 'app-data-updated', producePermissionsChanged: 'produce-permissions-changed', groupsChanged: 'groups-changed', } as const; export const MEDIASOUP_EVENTS = { newProducer: 'peer.newProducer', producerClose: 'producer.close', producerPause: 'producer.pause', producerResume: 'producer.resume', producerPaused: 'producer.paused', producerResumed: 'producer.resumed', producerForceClosed: 'producer.forceClosed', producerSetMaxSpatialLayer: 'producer.setMaxSpatialLayer', producerRequestMaxSpatialLayer: 'producer.requestMaxSpatialLayer', createConsumer: 'consumer.create', eventDataProducerSubscribe: 'dataProducer.subscribe', createDataConsumer: 'dataConsumer.create', closeConsumer: 'consumer.close', pauseConsumer: 'consumer.pause', resumeConsumer: 'consumer.resume', consumerChangePreferredLayers: 'consumer.changeConsumerPreferredLayers', consumerRequestKeyFrame: 'consumer.requestKeyFrame', transportCreate: 'transport.create', transportClose: 'transport.close', transportConnect: 'transport.connect', transportProduce: 'transport.produce', transportProduceData: 'transport.produceData', transportConnectionTimeout: 'transport.connectionTimeout', transportStateChange: 'connectionstatechange', transportGetIceParameters: 'transport.getIceParameters', } as const; export const MEDIASOUP_MEDIA_ACTIONS_TRACK_EVENTS = [ MEDIASOUP_EVENTS.transportCreate as string, MEDIASOUP_EVENTS.transportConnect as string, MEDIASOUP_EVENTS.transportProduce as string, MEDIASOUP_EVENTS.transportProduceData as string, MEDIASOUP_EVENTS.transportGetIceParameters as string, MEDIASOUP_EVENTS.producerClose as string, MEDIASOUP_EVENTS.producerPause as string, MEDIASOUP_EVENTS.producerResume as string, MEDIASOUP_EVENTS.pauseConsumer as string, MEDIASOUP_EVENTS.resumeConsumer as string, MEDIASOUP_EVENTS.createConsumer as string, MEDIASOUP_EVENTS.closeConsumer as string, CHANNEL_EVENTS.ping as string, ]; export const NETWORK_OBSERVER_EVENTS = { transportState: 'transport-state', } as const;