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

Справка по VideoElementPoolPlugin

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

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

ElementEvent

Ƭ ElementEvent: ElementEventAddTrack | ElementEventRemoveTrack | ElementEventTrackMuteChanged | ElementEventElementsPaused


ElementEventAddTrack

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


ElementEventElementsPaused

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


ElementEventRemoveTrack

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


ElementEventTrackMuteChanged

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


PausedMediaTypes

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


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

VideoElementPoolEvent

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


VideoElementPoolManager

Ƭ VideoElementPoolManager: Object

Type declaration

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

Методы

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

Возвращает

VideoElementPool


getVideoElementPoolManager

getVideoElementPoolManager(sdk): VideoElementPoolManager

Параметры

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

Возвращает

VideoElementPoolManager


videoElementPoolPlugin

videoElementPoolPlugin(): JazzSdkPlugin<VideoElementPoolPlugin>

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

Возвращает

JazzSdkPlugin<VideoElementPoolPlugin>

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