import { Codec, ContentType, Event, RemoteAudioStream, RemoteDataStream, RemoteStream, RemoteVideoStream, SubscriptionImpl, SubscriptionState, TransportConnectionState, WebRTCStats } from '@skyway-sdk/core'; import { RemoteRoomMember } from '../member/remote/base'; import { RoomPublication } from '../publication'; import { RoomImpl } from '../room/base'; export interface RoomSubscription { readonly id: string; readonly contentType: ContentType; readonly publication: RoomPublication; /**@description [japanese] このSubscriptionにStreamが紐つけられた時に発火する */ readonly onStreamAttached: Event; /** * @deprecated * @use {@link LocalPerson.onPublicationUnsubscribed} or {@link Channel.onPublicationUnsubscribed} * @description [japanese] このSubscriptionがUnsubscribeされた時に発火する */ readonly onCanceled: Event; /** * @description [japanese] メディア通信の状態が変化した時に発火するイベント */ onConnectionStateChanged: Event; readonly subscriber: RemoteRoomMember; /** * @description [japanese] subscribeしているStreamの実体。 * ローカルでSubscribeしているSubscriptionでなければundefinedとなる */ stream?: T; codec?: Codec; /** * @description [japanese] 現在の優先エンコーディング設定 */ preferredEncoding?: string; state: RoomSubscriptionState; /** * @deprecated * @use {@link LocalPerson.unsubscribe} * @description [japanese] unsubscribeする */ cancel: () => Promise; /**@description [japanese] 優先して受信するエンコード設定を変更する */ changePreferredEncoding: (id: string) => void; /** * @experimental * @description [japanese] RemoteStreamの通信の統計情報を取得する */ getStats(): Promise; /** * @experimental * @description [japanese] 試験的なAPIです。今後インターフェースや仕様が変更される可能性があります * @description [japanese] 対象のMemberとのRTCPeerConnectionを取得する。RTCPeerConnectionを直接操作すると SDK は正しく動作しなくなる可能性があります。 */ getRTCPeerConnection(): RTCPeerConnection | undefined; /** * @description [japanese] メディア通信の状態を取得 */ getConnectionState(): TransportConnectionState; } /**@internal */ export declare class RoomSubscriptionImpl implements RoomSubscription { /**@private */ _subscription: SubscriptionImpl; private _room; readonly id: string; readonly contentType: ContentType; readonly publication: RoomPublication; readonly subscriber: RemoteRoomMember; readonly _context: import("@skyway-sdk/core").SkyWayContext; readonly onStreamAttached: Event; readonly onCanceled: Event; readonly onConnectionStateChanged: Event; constructor( /**@private */ _subscription: SubscriptionImpl, _room: RoomImpl); get stream(): T | undefined; get state(): SubscriptionState; get codec(): Codec | undefined; get preferredEncoding(): string | undefined; changePreferredEncoding(id: string): void; cancel(): Promise; toJSON(): { id: string; contentType: ContentType; publication: RoomPublication; codec: Codec | undefined; }; getStats(): Promise; getRTCPeerConnection(): RTCPeerConnection | undefined; getConnectionState(): TransportConnectionState; } export declare type RoomSubscriptionState = SubscriptionState; //# sourceMappingURL=index.d.ts.map