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

Справка по VideoElementPoolPlugin

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

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

ElementEvent

Ƭ ElementEvent: ElementEventAddTrack | ElementEventRemoveTrack | ElementEventTrackMuteChanged | ElementEventElementsPaused

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/videoElementPoolManager.ts:47


ElementEventAddTrack

Ƭ ElementEventAddTrack: Readonly<{ payload: { isMuted: boolean ; isPaused: boolean ; stream: MediaStream } ; type: "addTrack" }>

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/videoElementPoolManager.ts:17


ElementEventElementsPaused

Ƭ ElementEventElementsPaused: Readonly<{ payload: { isMuted: boolean ; isPaused: boolean ; stream: MediaStream | undefined } ; type: "elementsPaused" }>

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/videoElementPoolManager.ts:39


ElementEventRemoveTrack

Ƭ ElementEventRemoveTrack: Readonly<{ payload: { stream: MediaStream } ; type: "removeTrack" }>

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/videoElementPoolManager.ts:25


ElementEventTrackMuteChanged

Ƭ ElementEventTrackMuteChanged: Readonly<{ payload: { isMuted: boolean ; isPaused: boolean ; stream: MediaStream } ; type: "trackMuteChanged" }>

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/videoElementPoolManager.ts:31


PausedMediaTypes

Ƭ PausedMediaTypes: { [key in MediaType]?: boolean }

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/videoElementPoolManager.ts:70


VideoElementPool

Ƭ VideoElementPool: Object

Type declaration

NameType
event$Observable<VideoElementPoolEvent>
getElement(participantId: JazzRoomParticipantId, request: JazzRoomVideoRequest) => Element
getPausedMediaTypes() => PausedMediaTypes
pauseSource(source?: JazzRoomVideoSource) => void
playSource(source?: JazzRoomVideoSource) => void
release() => void
setQuality(element: HTMLVideoElement, quality: JazzRoomVideoQuality) => void

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/videoElementPoolManager.ts:74


VideoElementPoolEvent

Ƭ VideoElementPoolEvent: Readonly<{ payload: PausedMediaTypes ; type: "mediaPaused" }>

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/videoElementPoolManager.ts:53


VideoElementPoolManager

Ƭ VideoElementPoolManager: Object

Type declaration

NameType
getVideoElementPool(room: JazzRoom) => VideoElementPool
releaseVideoElementPool(room: JazzRoom) => void

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/videoElementPoolManager.ts:12

Методы

getVideoElementPool

getVideoElementPool(room): VideoElementPool

Пример

const { getVideoElementPool } from '@salutejs/jazz-sdk-web-plugins';
const videoElementPool = getVideoElementPool(room);

const { videoElement, isMuted, isPaused, event$, releaseElement } =
videoElementPool.getElement(participantId, {
source,
height,
quality,
});

isMuted.get();
isPaused.get();

const unsubscribeEvents = handleEvents(event$, (event) => {...});

const unsubscribeAddTrack = handleEvent(
event$,
'addTrack',
({ payload }) => {
payload.isPaused;
payload.isMuted;
},
);

const unsubscribeRemoveTrack = handleEvent(event$, 'removeTrack', () => {...});

const unsubscribeMuteChange = handleEvent(
event$,
'trackMuteChanged',
({ payload }) => {...},
);

const unsubscribePaused = handleEvent(
event$,
'elementsPaused',
({ payload }) => {...},
);

Параметры

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

Возвращает

VideoElementPool

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/getVideoElementPool.ts:53


getVideoElementPoolManager

getVideoElementPoolManager(sdk): VideoElementPoolManager

Параметры

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

Возвращает

VideoElementPoolManager

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

packages/jazz-sdk-web-plugins/src/videoElementPoolPlugin/getVideoElementPool.ts:61


videoElementPoolPlugin

videoElementPoolPlugin(): JazzSdkPlugin<VideoElementPoolPlugin>

Позволяет интергрировать видео в страницу через видео элемент, а так же отслеживать состояния треков.

Возвращает

JazzSdkPlugin<VideoElementPoolPlugin>

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

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

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