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

Справка по AudioOutputMixerPlugin

Обновлено 8 ноября 2023

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

AudioMixerEvent

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

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/webAudioMixer/audioMixerController.ts:61


AudioMixerEventAddMediaStream

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

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/webAudioMixer/audioMixerController.ts:40


AudioMixerEventGainChanged

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

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/webAudioMixer/audioMixerController.ts:54


AudioMixerEventRemoveMediaStream

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

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/webAudioMixer/audioMixerController.ts:47


AudioMixerEventStartAudio

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

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/webAudioMixer/audioMixerController.ts:34


AudioMixerEventStartedAudio

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

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/webAudioMixer/audioMixerController.ts:37


AudioMixerEventStopAudio

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

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/webAudioMixer/audioMixerController.ts:28


AudioMixerEventStopedAudio

Ƭ AudioMixerEventStopedAudio: Readonly<{ type: "stopedAudio" }>

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/webAudioMixer/audioMixerController.ts:31


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>

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/audioOutputMixerController.ts:11


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>>

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/room/roomAudioOutputMixerController.ts:39

Переменные

AUDIO_GAIN_DEFAULT

Const AUDIO_GAIN_DEFAULT: 1

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/constants.ts:1


MAX_AUDIO_GAIN_VALUE

Const MAX_AUDIO_GAIN_VALUE: 10

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/constants.ts:3


MIN_AUDIO_GAIN_VALUE

Const MIN_AUDIO_GAIN_VALUE: 0

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/constants.ts:2

Методы

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

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/audioOutputMixerPlugin.ts:53


getAudioOutputMixer

getAudioOutputMixer(sdk): AudioOutputMixer

Пример

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

Exmaple

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

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/getAudioOutputMixer.ts:32


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<{ guestEnabled?: boolean ; lobbyEnabled?: boolean ; title: string }>) => Promise<Readonly<{ id: string ; password: string ; roomTitle: string ; roomType: "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: RoomType ; userRole: UserRole }>> ; 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 ; 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: { canEditRolePermissions: (role: UserRole) => boolean ; 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" | "canManageBreakoutRooms", allowed: boolean) => void ; grantedPermissions: Readonly<{}> ; kickUsers: (participantIds: string | readonly string[], reason?: "kicked" | "callEnded" | "get-state-error" | "EXCEEDED_MAX_CONFERENCE_DURATION" | "EXCEEDED_MAX_CONFERENCE_CAPACITY" | "EXCEEDED_MAX_CONFERENCE_VIEWERS_CAPACITY") => void ; kickUsersAll: (reason?: "kicked" | "callEnded" | "get-state-error" | "EXCEEDED_MAX_CONFERENCE_DURATION" | "EXCEEDED_MAX_CONFERENCE_CAPACITY" | "EXCEEDED_MAX_CONFERENCE_VIEWERS_CAPACITY") => 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" | "canManageBreakoutRooms") => void ; 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" | "canManageBreakoutRooms", boolean>>> ; role: UserRole }) => void } ; muteAudioInput: (isMuted: boolean) => Promise<void> ; muteDisplayVideoInput: (isMuted: boolean) => Promise<void> ; muteVideoInput: (isMuted: boolean) => Promise<void> ; params: 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" | "canManageBreakoutRooms") => void ; sendReaction: (reaction: JazzRoomReactionType) => void ; setDisplayVideoInput: (stream: undefined | MediaStream) => void ; setLocalRaiseHand: (isRaised: boolean) => void ; setUserAudioInput: (stream: undefined | MediaStream) => Promise<void> ; setUserVideoInput: (stream: undefined | MediaStream) => Promise<void> ; settings: Readonly<{}> ; sources: Readonly<{}> ; status: Readonly<{}> ; userAudioStream: Readonly<{}> ; userPermissionRequests: Readonly<{}> ; userPermissions: Readonly<{}> ; userVideoStream: Readonly<{}> }>

Возвращает

AudioOutputMixerManager

Определяется в

packages/jazz-sdk-web-plugins/src/audioOutputMixer/getAudioOutputMixerManager.ts:35

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