ym88659208ym87991671
Справка по AudioOutputMixerPlugin | Документация для разработчиков

Справка по AudioOutputMixerPlugin

Обновлено 30 мая 2024

Псевдонимы типов

AudioMixerEvent

Ƭ AudioMixerEvent: AudioMixerEventStopAudio | AudioMixerEventStoppedAudio | AudioMixerEventStartAudio | AudioMixerEventStartedAudio | AudioMixerEventAddMediaStream | AudioMixerEventRemoveMediaStream | AudioMixerEventGainChanged


AudioMixerEventAddMediaStream

Ƭ AudioMixerEventAddMediaStream: Readonly<{ payload: { audioElement: HTMLAudioElement ; mediaStream: MediaStream } ; type: "addMediaStream" }>


AudioMixerEventGainChanged

Ƭ AudioMixerEventGainChanged: Readonly<{ payload: { value: number } ; type: "gainChanged" }>


AudioMixerEventRemoveMediaStream

Ƭ AudioMixerEventRemoveMediaStream: Readonly<{ payload: { audioElement: HTMLAudioElement ; mediaStream: MediaStream } ; type: "removeMediaStream" }>


AudioMixerEventStartAudio

Ƭ AudioMixerEventStartAudio: Readonly<{ type: "startAudio" }>


AudioMixerEventStartedAudio

Ƭ AudioMixerEventStartedAudio: Readonly<{ type: "startedAudio" }>


AudioMixerEventStopAudio

Ƭ AudioMixerEventStopAudio: Readonly<{ type: "stopAudio" }>


AudioMixerEventStoppedAudio

Ƭ AudioMixerEventStoppedAudio: Readonly<{ type: "stoppedAudio" }>


AudioOutputMixer

Ƭ AudioOutputMixer: Object

Type declaration

NameType
$isSuspendedQuery<boolean>
addMediaStream(mediaStream: MediaStream) => void
event$Observable<AudioMixerEvent>
outputGainQuery<number>
removeMediaStream(mediaStream: MediaStream) => void
setOutputDevice(audioOutput: LocalAudioOutputDevice) => Promise<void>
setOutputGain(volume: number) => void
startAudio() => Promise<void>
stopAudio() => Promise<void>

AudioOutputMixerManager

Ƭ AudioOutputMixerManager: Object

Type declaration

NameType
event$Observable<RoomAudioMixerEvent>
isMutedAllQuery<boolean>
muteAllParticipants(isMutedAll: boolean) => void
muteParticipants(isMuted: boolean, participantIds: JazzRoomParticipantId[] | JazzRoomParticipantId) => void
mutedParticipantsQuery<ReadonlySet<JazzRoomParticipantId>>

Переменные

AUDIO_GAIN_DEFAULT

Const AUDIO_GAIN_DEFAULT: 1


MAX_AUDIO_GAIN_VALUE

Const MAX_AUDIO_GAIN_VALUE: 10


MIN_AUDIO_GAIN_VALUE

Const MIN_AUDIO_GAIN_VALUE: 0

Методы

audioOutputMixerPlugin

audioOutputMixerPlugin(options?): JazzSdkPlugin

Позволяет локально управлять звуком участников конференций

Параметры

NameType
options?Partial<{ flags?: Partial<Readonly<{ forceAudioSourcesPlayback: boolean ; interruptedRestartUserMedia: string ; loopbackAllBrowsers: boolean ; loopbackAudioSourcesFallback: boolean ; loopbackEnabled: boolean ; loopbackMaxChromiumVersion: number ; loopbackMungeCandidates: boolean ; loopbackRestartOnDisconnect: boolean ; loopbackStunServer?: string ; startAudioOnFirstInteraction: boolean }>> }>

Возвращает

JazzSdkPlugin


getAudioOutputMixer

getAudioOutputMixer(sdk): AudioOutputMixer

Пример

const { getAudioOutputMixer } from '@salutejs/jazz-sdk-web-plugins';
const audioOutputMixer = getAudioOutputMixer(sdk);
const initOutputGain = audioOutputMixer.outputGain.get();

Пример

const { getAudioOutputMixer } from '@salutejs/jazz-sdk-web-plugins';
const audioOutputMixer = getAudioOutputMixer(sdk);
audioOutputMixer.setOutputGain(5);

Пример

const { getAudioOutputMixer } from '@salutejs/jazz-sdk-web-plugins';
const audioOutputMixer = getAudioOutputMixer(sdk);
const unsubscribe = handleEvent(
audioOutputMixer.event$,
'gainChanged',
({ payload }) => {
setOutputGain(payload.value);
},
);

Параметры

NameType
sdkReadonly<{ container: Container ; event$: Observable<JazzSdkEvent> } & {}>

Возвращает

AudioOutputMixer


getAudioOutputMixerManager

getAudioOutputMixerManager(room): AudioOutputMixerManager

Пример

const { getAudioOutputMixerManager } from '@salutejs/jazz-sdk-web-plugins'
const audioOutputMixerManger = getAudioOutputMixerManager(room)
audioOutputMixerManger.mutedParticipants.get().has(participantId)

Пример

const { getAudioOutputMixerManager } from '@salutejs/jazz-sdk-web-plugins'
const audioOutputMixerManger = getAudioOutputMixerManager(room)

const unsubscribe = handleEvent(
audioOutputMixerManger.event$,
'muteParticipantsChanged',
({ payload }) => {
if (payload.participantIds.some((id) => participantId === id)) {
setIsMuted(payload.isMuted);
}
},
);

Пример

const { getAudioOutputMixerManager } from '@salutejs/jazz-sdk-web-plugins'
const audioOutputMixerManger = getAudioOutputMixerManager(room)
audioOutputMixerManger.muteParticipants(!isMuted, [participantId]);

Параметры

NameType
roomReadonly<{ client: Readonly<{ auth: Readonly<{ authStatus: Readonly<{}> ; event$: Observable<AuthEvents> ; isAuthorised: Readonly<{}> ; loginBySdkToken: (sdkToken: string) => Promise<boolean> ; logout: () => Promise<void> ; setAuthToken: (authToken: string) => Promise<boolean> ; userInfo: Readonly<{}> }> ; conferences: Readonly<{ close: (params: { conferenceId: string ; password: string }) => Promise<void> ; createConference: (params: Readonly<{ isGuestEnabled?: boolean ; isLobbyEnabled?: boolean ; title: string }>) => Promise<Readonly<{ id: string ; password: string ; roomTitle: string ; roomType: StringEnum<"MEETING"> ; url: string }>> ; getDetails: (params: Readonly<{ conferenceId: string ; password: string }>) => Promise<Readonly<{ roomRestrictions?: Readonly<{ asrAllowed?: boolean ; chatAllowed?: boolean ; denoiserAllowed?: boolean ; editOwnNameAllowed?: boolean ; editTitleAllowed?: boolean ; guestAllowed?: boolean ; inviteAllowed?: boolean ; lobbyAllowed?: boolean ; maxConferenceCapacity?: number ; maxConferenceDurationSec?: number ; maxConferenceViewersCapacity?: number ; maxPremiumConferences?: number ; maxUsersForInfiniteConference?: number ; recordScreenAllowed?: boolean ; sipAllowed?: boolean ; watermarkAllowed?: boolean ; webinarAllowed?: boolean }> ; roomTitle?: string ; roomType: StringEnum<"MEETING"> ; userRole: JazzRoomParticipantRole }>> ; join: (params: { conferenceId: string ; password: string }) => Readonly<{ container: Container; event$: Observable<JazzRoomEvent>; status: Readonly<{ get: () => JazzRoomStatus; value$: Observable<JazzRoomStatus>; }>; ... 32 more ...; client: Readonly<...>; }> ; update: (params: { conferenceId: string ; password: string ; roomSettings: Readonly<Partial<Pick<Readonly<{ guestEnabled?: boolean ; isNext?: boolean ; jsonChatEnabled?: boolean ; lobbyEnabled?: boolean ; room3dEnabled?: boolean ; serverVideoRecordAutoStartEnabled?: boolean ; sipEnabled?: boolean ; summarizationEnabled?: boolean ; title?: string ; watermarkEnabled?: boolean }>, "title" | "watermarkEnabled" | "lobbyEnabled" | "sipEnabled" | "serverVideoRecordAutoStartEnabled" | "room3dEnabled" | "summarizationEnabled">>> }) => Promise<void> }> ; container: Container ; destroy: () => void ; event$: Observable<JazzClientEvent> ; isNetworkOnline: Readonly<{}> ; sdk: Readonly<{ container: Container ; event$: Observable<JazzSdkEvent> } & {}> ; serverUrl: string }> ; connectionStatus: Readonly<{}> ; container: Container ; displayStream: Readonly<{}> ; dominantParticipantId: Readonly<{}> ; error: Readonly<{}> ; event$: Observable<JazzRoomEvent> ; getAudioStream: (participantId: string) => undefined | MediaStream ; getParticipantSource: (participantId: string, mediaType: MediaType) => undefined | Readonly<{ isMuted: boolean ; stream: MediaStream }> ; getVideoStream: (participantId: string, request: { source: JazzRoomVideoSource }) => undefined | MediaStream ; getVideoStreamSourceName: (participantId: string, source: JazzRoomVideoSource) => undefined | string ; leave: (options?: { endConference: boolean }) => Promise<void> ; localParticipant: Readonly<{}> ; localRaisedHand: Readonly<{}> ; moderator: { grantPermission: (participantId: string, permission: "canEditOwnName" | "canEditRoomPolicy" | "canEditRoomTitle" | "canFinishCall" | "canGrantPermission" | "canInvite" | "canKickUser" | "canMuteUser" | "canRequestPermission" | "canSendMessage" | "canShareAudio" | "canShareCamera" | "canShareMedia" | "canViewModerators" | "canViewAsr" | "canManageAsr" | "canManageWatermark" | "canManageLobby" | "canManageDenoiser" | "canRecordScreen" | "canStartServerVideoRecord" | "canStartPoll" | "canSendReaction" | "canManagePoll" | "canManageSessionGroups" | "canLeaveSessionGroups", allowed: boolean) => void ; grantedPermissions: Readonly<{}> ; kickUsers: (participantIds: string | readonly string[]) => void ; kickUsersAll: () => void ; muteUsers: (participantIds: string | readonly string[], type: RoomMuteMediaType) => void ; muteUsersAll: (type: RoomMuteMediaType) => void ; permissionRequestResolutions: Readonly<{}> ; permissionRequests: Readonly<{}> ; removeGrantedPermission: (permission: "canEditOwnName" | "canEditRoomPolicy" | "canEditRoomTitle" | "canFinishCall" | "canGrantPermission" | "canInvite" | "canKickUser" | "canMuteUser" | "canRequestPermission" | "canSendMessage" | "canShareAudio" | "canShareCamera" | "canShareMedia" | "canViewModerators" | "canViewAsr" | "canManageAsr" | "canManageWatermark" | "canManageLobby" | "canManageDenoiser" | "canRecordScreen" | "canStartServerVideoRecord" | "canStartPoll" | "canSendReaction" | "canManagePoll" | "canManageSessionGroups" | "canLeaveSessionGroups") => void ; rolePermissions: Readonly<{}> ; setRolePermissions: (props: { permissions: Partial<Readonly<Record<"canEditOwnName" | "canEditRoomPolicy" | "canEditRoomTitle" | "canFinishCall" | "canGrantPermission" | "canInvite" | "canKickUser" | "canMuteUser" | "canRequestPermission" | "canSendMessage" | "canShareAudio" | "canShareCamera" | "canShareMedia" | "canViewModerators" | "canViewAsr" | "canManageAsr" | "canManageWatermark" | "canManageLobby" | "canManageDenoiser" | "canRecordScreen" | "canStartServerVideoRecord" | "canStartPoll" | "canSendReaction" | "canManagePoll" | "canManageSessionGroups" | "canLeaveSessionGroups", boolean>>> ; role: JazzRoomParticipantRole }) => Promise<void> ; setSettings: (settingsUpdate: Partial<JazzRoomSettings>) => Promise<void> } ; muteAudioInput: (isMuted: boolean) => Promise<void> ; muteDisplayVideoInput: (isMuted: boolean) => Promise<void> ; muteVideoInput: (isMuted: boolean) => Promise<void> ; params: Readonly<{ conferenceId: Readonly<{}> ; conferencePassword: Readonly<{}> ; domainUrl: Readonly<{}> ; nodeToken: Readonly<{}> ; nodeUrl: Readonly<{}> ; roomId: Readonly<{}> ; roomPassword: Readonly<{}> ; roomType: Readonly<{}> ; sessionSecret: Readonly<{}> }> ; participants: Readonly<{}> ; ready: (status?: "connected" | "disconnecting" | "disconnected") => Promise<void> ; remoteParticipants: Readonly<{}> ; remoteRaisedHands: Readonly<{}> ; requestPermission: (permission: "canEditOwnName" | "canEditRoomPolicy" | "canEditRoomTitle" | "canFinishCall" | "canGrantPermission" | "canInvite" | "canKickUser" | "canMuteUser" | "canRequestPermission" | "canSendMessage" | "canShareAudio" | "canShareCamera" | "canShareMedia" | "canViewModerators" | "canViewAsr" | "canManageAsr" | "canManageWatermark" | "canManageLobby" | "canManageDenoiser" | "canRecordScreen" | "canStartServerVideoRecord" | "canStartPoll" | "canSendReaction" | "canManagePoll" | "canManageSessionGroups" | "canLeaveSessionGroups") => void ; sendReaction: (reaction: ReactionType) => void ; setDisplayVideoInput: (stream: undefined | MediaStream) => void ; setLocalRaiseHand: (isRaised: boolean) => void ; setUserAudioInput: (stream: undefined | MediaStream) => Promise<void> ; setUserVideoInput: (stream: undefined | MediaStream) => Promise<void> ; settings: JazzRoomSettingsQueries ; sources: Readonly<{}> ; status: Readonly<{}> ; userAudioStream: Readonly<{}> ; userPermissionRequests: Readonly<{}> ; userPermissions: Readonly<{}> ; userVideoStream: Readonly<{}> }>

Возвращает

AudioOutputMixerManager

ПАО Сбербанк использует cookie для персонализации сервисов и удобства пользователей.
Вы можете запретить сохранение cookie в настройках своего браузера.