다음을 통해 공유


StatefulCallClient interface

CallClient <xref:%40azure%2Fcommunication-calling%23CallClient> 상태 저장으로 사용할 수 있도록 하는 메서드를 정의합니다. 인터페이스는 프록시된 상태에 대한 액세스를 제공하고 상태 변경 이벤트에 대한 처리기를 등록할 수도 있습니다. 상태 정의는 CallClientState참조하세요.

상태 변경 이벤트는 다음을 통해 구동됩니다.

  • <xref:%40azure%2Fcommunication-calling%23DeviceManager> API에서 데이터를 반환했습니다.
  • <xref:%40azure%2Fcommunication-calling%23CallAgent> API에서 데이터를 반환했습니다.
  • 수신기는 다양한 Azure 통신 호출 개체에 자동으로 연결됩니다.
    • CallAgent '수신전화'
    • CallAgent 'callsUpdated'
    • DeviceManager 'videoDevicesUpdated'
    • 장치 관리자 'audioDevicesUpdated
    • 장치 관리자 'selectedMicrophoneChanged'
    • 장치 관리자 'selectedSpeakerChanged'
    • 'stateChanged'를 호출합니다.
    • 'idChanged'를 호출합니다.
    • 'isMutedChanged' 호출
    • 'isScreenSharingOnChanged' 호출
    • 'remoteParticipantsUpdated'를 호출합니다.
    • 'localVideoStreamsUpdated'를 호출합니다.
    • 수신 전화 'callEnded'
    • RemoteParticipant 'stateChanged'
    • RemoteParticipant 'isMutedChanged'
    • 원격 참가자 'displayNameChanged'
    • RemoteParticipant 'isSpeakingChanged'
    • RemoteParticipant 'videoStreamsUpdated'
    • RemoteVideoStream 'isAvailableChanged'
    • 전사Call기능 'isTranscriptionActiveChanged'
    • RecordingCallFeature 'isRecordingActiveChanged'
    • LocalRecordingCallFeature 'isLocalRecordingActiveChanged'
    • RaiseHandCallFeature 'raisedHandEvent'
    • RaiseHandCallFeature 'loweredHandEvent'
    • PPTLiveCallFeature 'isAciveChanged'입니다.
    • ReactionCallFeature '반응'
Extends

메서드

createCallAgent([tokenCredential, options])

CallAgent는 호출을 처리하는 데 사용됩니다. CallAgent를 만들려면 SDK에서 제공된 CommunicationTokenCredential 개체를 전달합니다.

  • CallClient는 한 번에 하나의 활성 CallAgent 인스턴스만 가질 수 있습니다.
  • 새 CallClient 인스턴스를 만들어 새 CallAgent를 만들 수 있습니다.
  • CallClient의 현재 활성 CallAgent를 삭제하고 CallClient의 createCallAgent() 메서드를 다시 호출하여 새 CallAgent를 만들 수 있습니다.
createTeamsCallAgent([tokenCredential, options])

TeamsCallAgent는 통화를 처리하는 데 사용됩니다. TeamsCallAgent를 만들려면 SDK에서 제공된 CommunicationTokenCredential 개체를 전달합니다.

  • CallClient는 한 번에 하나의 활성 TeamsCallAgent 인스턴스만 가질 수 있습니다.
  • 새 CallClient 인스턴스를 만들어 새 TeamsCallAgent를 만들 수 있습니다.
  • CallClient의 현재 활성 TeamsCallAgent를 삭제하고 CallClient의 createTeamsCallAgent() 메서드를 다시 호출하여 새 TeamsCallAgent를 만들 수 있습니다.
createView(undefined | string, undefined | CommunicationIdentifier, CallFeatureStreamState | RemoteVideoStreamState | LocalVideoStreamState, CreateViewOptions)

RemoteVideoStreamState 또는 LocalVideoStreamState 렌더링하고 결과 VideoStreamRendererViewState 관련 RemoteVideoStreamState 또는 LocalVideoStreamState 또는 상태의 분할되지 않은 보기로 저장합니다. 내부 호출에서 <xref:%40azure%2Fcommunication-calling%23VideoStreamRenderer.createView>.

시나리오 1: RemoteVideoStreamState 렌더링

  • CallId가 필요하고, participantId가 필요하며, RemoteVideoStreamState 형식의 스트림이 필요합니다.
  • 결과 VideoStreamRendererViewStateCallClientState 지정된 callId 및 participantId에 저장됩니다.

시나리오 2: 호출에 대한 LocalVideoStreamState 렌더링

  • CallId가 필요하고, participantId가 정의되지 않아야 하며, LocalVideoStreamState 형식의 스트림이 필요합니다.

  • <xref:%40azure%2Fcommunication-calling%23Call.localVideoStreams> 이미 <xref:%40azure%2Fcommunication-calling%23Call.startVideo>사용하여 시작해야 합니다.

  • 결과 VideoStreamRendererViewStateCallClientState지정된 callId localVideoStreams 저장됩니다.

  • 시나리오 2: 호출의 일부가 아닌 LocalVideoStreamState 렌더링(예: 로컬 미리 보기용 카메라 렌더링)

  • CallId는 정의되지 않아야 하고, participantId는 정의되지 않아야 하며, LocalVideoStreamState 형식의 스트림이 필요합니다.

  • 결과 VideoStreamRendererViewState<xref:CallClientState.deviceManager.unparentedViews> 지정된 LocalVideoStreamState 아래에 저장됩니다.

disposeView(undefined | string, undefined | CommunicationIdentifier, CallFeatureStreamState | RemoteVideoStreamState | LocalVideoStreamState)

RemoteVideoStreamState 또는 LocalVideoStreamState 렌더링을 중지하고 <xref:VideoStreamRendererView> 또는 CallClientState 적절한 <xref:LocalVideoStream>RemoteVideoStreamState<xref:CallClientState.deviceManager.unparentedViews><xref:%40azure%2Fcommunication-calling%23VideoStreamRenderer.dispose>제거합니다.

리소스를 제대로 정리하려면 disposeView를 사용하는 것이 중요합니다.

시나리오 1: RemoteVideoStreamState 삭제

  • CallId가 필요하고, participantId가 필요하며, RemoteVideoStreamState 형식의 스트림이 필요합니다.

시나리오 2: 호출에 대한 LocalVideoStreamState 삭제

  • CallId가 필요하고, participantId가 정의되지 않아야 하며, LocalVideoStreamState 형식의 스트림이 필요합니다.

  • 시나리오 2: 호출의 일부가 아닌 LocalVideoStreamState 삭제

  • CallId는 정의되지 않아야 하고, participantId는 정의되지 않아야 하며, LocalVideoStreamState 형식의 스트림이 필요합니다.

  • LocalVideoStreamState는 createView에 전달된 원래 상태여야 합니다.

getState()

CallClientState <xref:%40azure%2Fcommunication-calling%23CallClient>CallClient 프록시할 수 있는 모든 상태를 보유합니다.

offStateChange((state: CallClientState) => void)

'stateChanged' 이벤트에 대한 등록을 취소할 수 있습니다.

onStateChange((state: CallClientState) => void)

처리기를 'stateChanged' 이벤트에 등록할 수 있습니다.

상속된 메서드

dispose()

이 CallClient를 삭제하며, 연결된 디바이스 관리자 및 연결된 통화 에이전트도 삭제합니다.

feature<TFeature>(CallClientFeatureFactory<TFeature>)

확장 API를 사용하여 초기화되고 기억된 Feature 개체를 검색합니다. 이 패키지에서 사용 가능한 모든 확장 호출 클라이언트 기능에 대한 개체 Features.*를 확인합니다.

getDeviceManager()

DeviceManager는 카메라, 마이크 및 스피커와 같은 미디어 디바이스를 처리하는 데 사용됩니다.

메서드 세부 정보

createCallAgent([tokenCredential, options])

CallAgent는 호출을 처리하는 데 사용됩니다. CallAgent를 만들려면 SDK에서 제공된 CommunicationTokenCredential 개체를 전달합니다.

  • CallClient는 한 번에 하나의 활성 CallAgent 인스턴스만 가질 수 있습니다.
  • 새 CallClient 인스턴스를 만들어 새 CallAgent를 만들 수 있습니다.
  • CallClient의 현재 활성 CallAgent를 삭제하고 CallClient의 createCallAgent() 메서드를 다시 호출하여 새 CallAgent를 만들 수 있습니다.
function createCallAgent(args: [tokenCredential, options]): Promise<DeclarativeCallAgent>

매개 변수

args

[tokenCredential, options]

반환

createTeamsCallAgent([tokenCredential, options])

TeamsCallAgent는 통화를 처리하는 데 사용됩니다. TeamsCallAgent를 만들려면 SDK에서 제공된 CommunicationTokenCredential 개체를 전달합니다.

  • CallClient는 한 번에 하나의 활성 TeamsCallAgent 인스턴스만 가질 수 있습니다.
  • 새 CallClient 인스턴스를 만들어 새 TeamsCallAgent를 만들 수 있습니다.
  • CallClient의 현재 활성 TeamsCallAgent를 삭제하고 CallClient의 createTeamsCallAgent() 메서드를 다시 호출하여 새 TeamsCallAgent를 만들 수 있습니다.
function createTeamsCallAgent(args: [tokenCredential, options]): Promise<DeclarativeTeamsCallAgent>

매개 변수

args

[tokenCredential, options]

반환

createView(undefined | string, undefined | CommunicationIdentifier, CallFeatureStreamState | RemoteVideoStreamState | LocalVideoStreamState, CreateViewOptions)

RemoteVideoStreamState 또는 LocalVideoStreamState 렌더링하고 결과 VideoStreamRendererViewState 관련 RemoteVideoStreamState 또는 LocalVideoStreamState 또는 상태의 분할되지 않은 보기로 저장합니다. 내부 호출에서 <xref:%40azure%2Fcommunication-calling%23VideoStreamRenderer.createView>.

시나리오 1: RemoteVideoStreamState 렌더링

  • CallId가 필요하고, participantId가 필요하며, RemoteVideoStreamState 형식의 스트림이 필요합니다.
  • 결과 VideoStreamRendererViewStateCallClientState 지정된 callId 및 participantId에 저장됩니다.

시나리오 2: 호출에 대한 LocalVideoStreamState 렌더링

  • CallId가 필요하고, participantId가 정의되지 않아야 하며, LocalVideoStreamState 형식의 스트림이 필요합니다.

  • <xref:%40azure%2Fcommunication-calling%23Call.localVideoStreams> 이미 <xref:%40azure%2Fcommunication-calling%23Call.startVideo>사용하여 시작해야 합니다.

  • 결과 VideoStreamRendererViewStateCallClientState지정된 callId localVideoStreams 저장됩니다.

  • 시나리오 2: 호출의 일부가 아닌 LocalVideoStreamState 렌더링(예: 로컬 미리 보기용 카메라 렌더링)

  • CallId는 정의되지 않아야 하고, participantId는 정의되지 않아야 하며, LocalVideoStreamState 형식의 스트림이 필요합니다.

  • 결과 VideoStreamRendererViewState<xref:CallClientState.deviceManager.unparentedViews> 지정된 LocalVideoStreamState 아래에 저장됩니다.

function createView(callId: undefined | string, participantId: undefined | CommunicationIdentifier, stream: CallFeatureStreamState | RemoteVideoStreamState | LocalVideoStreamState, options?: CreateViewOptions): Promise<undefined | CreateViewResult>

매개 변수

callId

undefined | string

지정된 스트림에 대한 CallId입니다. 스트림이 호출의 일부가 아닌 경우 정의되지 않을 수 있습니다.

participantId

undefined | CommunicationIdentifier

지정된 RemoteVideoStreamState와 연결된 <xref:RemoteParticipant.identifier>. LocalVideoStreamState를 렌더링하는 경우 정의되지 않을 수 있습니다.

stream

CallFeatureStreamState | RemoteVideoStreamState | LocalVideoStreamState

렌더링을 시작할 LocalVideoStreamState 또는 RemoteVideoStreamState입니다.

options
CreateViewOptions

<xref:%40azure%2Fcommunication-calling%23VideoStreamRenderer>전달되는 옵션입니다.

반환

Promise<undefined | CreateViewResult>

disposeView(undefined | string, undefined | CommunicationIdentifier, CallFeatureStreamState | RemoteVideoStreamState | LocalVideoStreamState)

RemoteVideoStreamState 또는 LocalVideoStreamState 렌더링을 중지하고 <xref:VideoStreamRendererView> 또는 CallClientState 적절한 <xref:LocalVideoStream>RemoteVideoStreamState<xref:CallClientState.deviceManager.unparentedViews><xref:%40azure%2Fcommunication-calling%23VideoStreamRenderer.dispose>제거합니다.

리소스를 제대로 정리하려면 disposeView를 사용하는 것이 중요합니다.

시나리오 1: RemoteVideoStreamState 삭제

  • CallId가 필요하고, participantId가 필요하며, RemoteVideoStreamState 형식의 스트림이 필요합니다.

시나리오 2: 호출에 대한 LocalVideoStreamState 삭제

  • CallId가 필요하고, participantId가 정의되지 않아야 하며, LocalVideoStreamState 형식의 스트림이 필요합니다.

  • 시나리오 2: 호출의 일부가 아닌 LocalVideoStreamState 삭제

  • CallId는 정의되지 않아야 하고, participantId는 정의되지 않아야 하며, LocalVideoStreamState 형식의 스트림이 필요합니다.

  • LocalVideoStreamState는 createView에 전달된 원래 상태여야 합니다.

function disposeView(callId: undefined | string, participantId: undefined | CommunicationIdentifier, stream: CallFeatureStreamState | RemoteVideoStreamState | LocalVideoStreamState)

매개 변수

callId

undefined | string

지정된 스트림에 대한 CallId입니다. 스트림이 호출의 일부가 아닌 경우 정의되지 않을 수 있습니다.

participantId

undefined | CommunicationIdentifier

지정된 RemoteVideoStreamState와 연결된 <xref:RemoteParticipant.identifier>. LocalVideoStreamState를 삭제하는 경우 정의되지 않을 수 있습니다.

stream

CallFeatureStreamState | RemoteVideoStreamState | LocalVideoStreamState

삭제할 LocalVideoStreamState 또는 RemoteVideoStreamState입니다.

getState()

CallClientState <xref:%40azure%2Fcommunication-calling%23CallClient>CallClient 프록시할 수 있는 모든 상태를 보유합니다.

function getState(): CallClientState

반환

offStateChange((state: CallClientState) => void)

'stateChanged' 이벤트에 대한 등록을 취소할 수 있습니다.

function offStateChange(handler: (state: CallClientState) => void)

매개 변수

handler

(state: CallClientState) => void

구독을 취소할 원래 콜백입니다.

onStateChange((state: CallClientState) => void)

처리기를 'stateChanged' 이벤트에 등록할 수 있습니다.

function onStateChange(handler: (state: CallClientState) => void)

매개 변수

handler

(state: CallClientState) => void

상태를 수신하기 위한 콜백입니다.

상속된 메서드 세부 정보

dispose()

이 CallClient를 삭제하며, 연결된 디바이스 관리자 및 연결된 통화 에이전트도 삭제합니다.

function dispose(): Promise<void>

반환

Promise<void>

다음에서 상속됨 CallClient.dispose를 호출합니다.

feature<TFeature>(CallClientFeatureFactory<TFeature>)

확장 API를 사용하여 초기화되고 기억된 Feature 개체를 검색합니다. 이 패키지에서 사용 가능한 모든 확장 호출 클라이언트 기능에 대한 개체 Features.*를 확인합니다.

function feature<TFeature>(factory: CallClientFeatureFactory<TFeature>): TFeature

매개 변수

factory

CallClientFeatureFactory<TFeature>

확장 API를 제공하는 호출 클라이언트 기능 생성자에 대한 팩터리입니다.

반환

TFeature

CallClient.feature에서 상속된

getDeviceManager()

DeviceManager는 카메라, 마이크 및 스피커와 같은 미디어 디바이스를 처리하는 데 사용됩니다.

function getDeviceManager(): Promise<DeviceManager>

반환

Promise<DeviceManager>

CallClient.getDeviceManager에서 상속된