@agora-js/shared
Advanced tools
Comparing version 4.20.2-200 to 4.20.2-300
{ | ||
"name": "@agora-js/shared", | ||
"version": "4.20.2-200", | ||
"version": "4.20.2-300", | ||
"description": "internal utils shared across @agora-js packages", | ||
@@ -5,0 +5,0 @@ "main": "AgoraRTC_N-shared.js", |
@@ -10,25 +10,5 @@ import { AxiosRequestConfig } from 'axios'; | ||
CHECK_AUDIO_TRACK_IS_ACTIVE = "checkAudioTrackIsActive", | ||
CREATE_MIC_AUDIO_TRACK = "createMicrophoneAudioTrack", | ||
CREATE_CUSTOM_AUDIO_TRACK = "createCustomAudioTrack", | ||
CREATE_BUFFER_AUDIO_TRACK = "createBufferSourceAudioTrack", | ||
CREATE_CAM_VIDEO_TRACK = "createCameraVideoTrack", | ||
CREATE_CUSTOM_VIDEO_TRACK = "createCustomVideoTrack", | ||
CREATE_MIC_AND_CAM_TRACKS = "createMicrophoneAndCameraTracks", | ||
CREATE_SCREEN_VIDEO_TRACK = "createScreenVideoTrack", | ||
SET_ENCRYPTION_CONFIG = "Client.setEncryptionConfig", | ||
START_PROXY_SERVER = "Client.startProxyServer", | ||
STOP_PROXY_SERVER = "Client.stopProxyServer", | ||
SET_PROXY_SERVER = "Client.setProxyServer", | ||
SET_TURN_SERVER = "Client.setTurnServer", | ||
SET_CLIENT_ROLE = "Client.setClientRole", | ||
SET_LOW_STREAM_PARAMETER = "Client.setLowStreamParameter", | ||
ENABLE_DUAL_STREAM = "Client.enableDualStream", | ||
DISABLE_DUAL_STREAM = "Client.disableDualStream", | ||
JOIN = "Client.join", | ||
LEAVE = "Client.leave", | ||
PUBLISH = "Client.publish", | ||
UNPUBLISH = "Client.unpublish", | ||
SUBSCRIBE = "Client.subscribe", | ||
MASS_SUBSCRIBE = "Client.massSubscribe", | ||
MASS_UNSUBSCRIBE = "Client.massUnsubscribe", | ||
UNSUBSCRIBE = "Client.unsubscribe", | ||
@@ -40,34 +20,6 @@ RENEW_TOKEN = "Client.renewToken", | ||
SEND_CUSTOM_REPORT_MESSAGE = "Client.sendCustomReportMessage", | ||
INSPECT_VIDEO_CONTENT = "Client.inspectVideoContent", | ||
STOP_INSPECT_VIDEO_CONTENT = "Client.stopInspectVideoContent", | ||
JOIN_FALLBACK_TO_PROXY = "Client._joinFallbackToProxy", | ||
DATACHANNEL_FAILBACK = "Client._datachannelFailback", | ||
ON_LIVE_STREAM_WARNING = "Client.onLiveStreamWarning", | ||
ON_LIVE_STREAM_ERROR = "Client.onLiveStreamingError", | ||
START_LIVE_STREAMING = "Client.startLiveStreaming", | ||
SET_LIVE_TRANSCODING = "Client.setLiveTranscoding", | ||
STOP_LIVE_STREAMING = "Client.stopLiveStreaming", | ||
START_CHANNEL_MEDIA_RELAY = "Client.startChannelMediaRelay", | ||
UPDATE_CHANNEL_MEDIA_RELAY = "Client.updateChannelMediaRelay", | ||
STOP_CHANNEL_MEDIA_RELAY = "Client.stopChannelMediaRelay", | ||
REQUEST_CONFIG_DISTRIBUTE = "_config-distribute-request", | ||
SET_CONFIG_DISTRIBUTE = "_configDistribute", | ||
LOCAL_TRACK_SET_MUTED = "LocalTrack.setMute", | ||
LOCAL_AUDIO_TRACK_PLAY = "LocalAudioTrack.play", | ||
LOCAL_AUDIO_TRACK_PLAY_IN_ELEMENT = "LocalAudioTrack.playInElement", | ||
LOCAL_AUDIO_TRACK_STOP = "LocalAudioTrack.stop", | ||
LOCAL_AUDIO_TRACK_SET_VOLUME = "LocalAudioTrack.setVolume", | ||
MIC_AUDIO_TRACK_SET_DEVICE = "MicrophoneAudioTrack.setDevice", | ||
BUFFER_AUDIO_TRACK_START = "BufferSourceAudioTrack.startProcessAudioBuffer", | ||
BUFFER_AUDIO_TRACK_STOP = "BufferSourceAudioTrack.stopProcessAudioBuffer", | ||
BUFFER_AUDIO_TRACK_PAUSE = "BufferSourceAudioTrack.pauseProcessAudioBuffer", | ||
BUFFER_AUDIO_TRACK_RESUME = "BufferSourceAudioTrack.resumeProcessAudioBuffer", | ||
BUFFER_AUDIO_TRACK_SEEK = "BufferSourceAudioTrack.seekAudioBuffer", | ||
LOCAL_VIDEO_TRACK_PLAY = "LocalVideoTrack.play", | ||
LOCAL_VIDEO_TRACK_STOP = "LocalVideoTrack.stop", | ||
LOCAL_VIDEO_TRACK_GET_VIDEO_VISIBLE = "LocalVideoTrack.getVideoElementVisibleStatus", | ||
LOCAL_VIDEO_TRACK_BEAUTY = "LocalVideoTrack.setBeautyEffect", | ||
LOCAL_VIDEO_SEND_SEI_DATA = "LocalVideoTrack.sendSeiData", | ||
CAM_VIDEO_TRACK_SET_DEVICE = "CameraVideoTrack.setDevice", | ||
CAM_VIDEO_TRACK_SET_ENCODER_CONFIG = "CameraVideoTrack.setEncoderConfiguration", | ||
REMOTE_VIDEO_TRACK_PLAY = "RemoteVideoTrack.play", | ||
@@ -83,4 +35,3 @@ REMOTE_VIDEO_TRACK_STOP = "RemoteVideoTrack.stop", | ||
CONNECTION_STATE_CHANGE = "connectionStateChange", | ||
LOAD_CONFIG_FROM_LOCALSTORAGE = "loadConfigFromLocalStorage", | ||
IMAGE_MODERATION_UPLOAD = "imageModerationUpload" | ||
LOAD_CONFIG_FROM_LOCALSTORAGE = "loadConfigFromLocalStorage" | ||
} | ||
@@ -121,3 +72,2 @@ | ||
ADD_CANDIDATE_FAILED = "ADD_CANDIDATE_FAILED", | ||
DATACHANNEL_FAILED = "DATACHANNEL_FAILED", | ||
NETWORK_ERROR = "NETWORK_ERROR", | ||
@@ -135,3 +85,2 @@ NETWORK_TIMEOUT = "NETWORK_TIMEOUT", | ||
PERMISSION_DENIED = "PERMISSION_DENIED", | ||
PERMISSION_DISMISSED = "PERMISSION_DISMISSED", | ||
CONSTRAINT_NOT_SATISFIED = "CONSTRAINT_NOT_SATISFIED", | ||
@@ -178,19 +127,4 @@ TRACK_IS_DISABLED = "TRACK_IS_DISABLED", | ||
EXTERNAL_SIGNAL_ABORT = "EXTERNAL_SIGNAL_ABORT", | ||
LIVE_STREAMING_TASK_CONFLICT = "LIVE_STREAMING_TASK_CONFLICT", | ||
LIVE_STREAMING_INVALID_ARGUMENT = "LIVE_STREAMING_INVALID_ARGUMENT", | ||
LIVE_STREAMING_INTERNAL_SERVER_ERROR = "LIVE_STREAMING_INTERNAL_SERVER_ERROR", | ||
LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED = "LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED", | ||
LIVE_STREAMING_TRANSCODING_NOT_SUPPORTED = "LIVE_STREAMING_TRANSCODING_NOT_SUPPORTED", | ||
LIVE_STREAMING_CDN_ERROR = "LIVE_STREAMING_CDN_ERROR", | ||
LIVE_STREAMING_INVALID_RAW_STREAM = "LIVE_STREAMING_INVALID_RAW_STREAM", | ||
LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT = "LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT", | ||
LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE = "LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE", | ||
LIVE_STREAMING_WARN_FREQUENT_REQUEST = "LIVE_STREAMING_WARN_FREQUENT_REQUEST", | ||
WEBGL_INTERNAL_ERROR = "WEBGL_INTERNAL_ERROR", | ||
BEAUTY_PROCESSOR_INTERNAL_ERROR = "BEAUTY_PROCESSOR_INTERNAL_ERROR", | ||
CROSS_CHANNEL_WAIT_STATUS_ERROR = "CROSS_CHANNEL_WAIT_STATUS_ERROR", | ||
CROSS_CHANNEL_FAILED_JOIN_SRC = "CROSS_CHANNEL_FAILED_JOIN_SEC", | ||
CROSS_CHANNEL_FAILED_JOIN_DEST = "CROSS_CHANNEL_FAILED_JOIN_DEST", | ||
CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST = "CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST", | ||
CROSS_CHANNEL_SERVER_ERROR_RESPONSE = "CROSS_CHANNEL_SERVER_ERROR_RESPONSE", | ||
METADATA_OUT_OF_RANGE = "METADATA_OUT_OF_RANGE", | ||
@@ -206,5 +140,3 @@ LOCAL_AEC_ERROR = "LOCAL_AEC_ERROR", | ||
DATACHANNEL_CONNECTION_TIMEOUT = "DATACHANNEL_CONNECTION_TIMEOUT", | ||
PROHIBITED_OPERATION = "PROHIBITED_OPERATION", | ||
IMAGE_MODERATION_UPLOAD_FAILED = "IMAGE_MODERATION_UPLOAD_FAILED", | ||
P2P_MESSAGE_FAILED = "P2P_MESSAGE_FAILED" | ||
PROHIBITED_OPERATION = "PROHIBITED_OPERATION" | ||
} | ||
@@ -391,4 +323,2 @@ | ||
CLIENT_BANNED = "client-banned", | ||
CHANNEL_MEDIA_RELAY_STATE = "channel-media-relay-state", | ||
CHANNEL_MEDIA_RELAY_EVENT = "channel-media-relay-event", | ||
VOLUME_INDICATOR = "volume-indicator", | ||
@@ -403,6 +333,3 @@ CRYPT_ERROR = "crypt-error", | ||
STREAM_MESSAGE = "stream-message", | ||
LIVE_STREAMING_ERROR = "live-streaming-error", | ||
LIVE_STREAMING_WARNING = "live-streaming-warning", | ||
/** @internal */ | ||
INJECT_STREAM_STATUS = "stream-inject-status", | ||
EXCEPTION = "exception", | ||
@@ -414,10 +341,3 @@ ERROR = "error", | ||
MEDIA_CONNECTION_TYPE_CHANGE = "media-connection-type-change", | ||
PUBLISHED_USER_LIST = "published-user-list", | ||
/** @internal */ | ||
CONTENT_INSPECT_CONNECTION_STATE_CHANGE = "content-inspect-connection-state-change", | ||
/** @internal */ | ||
CONTENT_INSPECT_ERROR = "content-inspect-error", | ||
/** @internal */ | ||
CONTENT_INSPECT_RESULT = "content-inspect-result", | ||
IMAGE_MODERATION_CONNECTION_STATE_CHANGE = "image-moderation-connection-state-change" | ||
PUBLISHED_USER_LIST = "published-user-list" | ||
} | ||
@@ -427,6 +347,5 @@ | ||
* The user role in a live broadcast channel. | ||
* - `"host"`: Host. A host can both publish tracks and subscribe to tracks. | ||
* - `"audience"`: Audience. An audience can only subscribe to tracks. | ||
*/ | ||
export declare type ClientRole = "audience" | "host"; | ||
export declare type ClientRole = "audience"; | ||
@@ -555,10 +474,2 @@ /** | ||
export declare interface DataChannelMessage { | ||
uid: number; | ||
stream_id: number; | ||
ordered: number; | ||
max_retrans_times: number; | ||
metadata: string; | ||
} | ||
export declare function decryptAesGcm(iv: Uint8Array, key: CryptoKey, payload: Uint8Array): Promise<Uint8Array>; | ||
@@ -589,26 +500,2 @@ | ||
declare type Electron = any; | ||
/** | ||
* Information of the sharing screen source on Electron, which is retrieved by calling {@link getElectronScreenSources}. | ||
* | ||
* See [DesktopCapturerSource](https://www.electronjs.org/docs/api/structures/desktop-capturer-source) in the Electron API documentation for details. | ||
*/ | ||
export declare interface ElectronDesktopCapturerSource { | ||
/** | ||
* The ID of the screen source. | ||
*/ | ||
id: string; | ||
/** | ||
* The name of the screen source. | ||
*/ | ||
name: string; | ||
/** | ||
* The thumbnail of the screen source. | ||
* | ||
* See [ElectronNativeImage](https://electronjs.org/docs/api/native-image#nativeimage) for details. | ||
*/ | ||
thumbnail: IElectronNativeImage; | ||
} | ||
declare class ElementVisibleChecker { | ||
@@ -720,6 +607,2 @@ private _clientSize; | ||
export declare function getBigInt64(dataView: DataView, byteOffset: number, littleEndian: boolean | undefined): bigint; | ||
export declare function getBigUint64(dataView: DataView, byteOffset: number, littleEndian?: boolean): bigint; | ||
export declare function getBrowserInfo(userAgent?: string): Readonly<BrowserInfo>; | ||
@@ -735,4 +618,2 @@ | ||
export declare function getElectronInstance(): Electron | null; | ||
export declare function getHTTPRecvBytes(): number; | ||
@@ -758,4 +639,2 @@ | ||
export declare function hexToBytes(hex: string): Uint8Array; | ||
/** | ||
@@ -774,16 +653,2 @@ * @ignore | ||
/** | ||
* @ignore | ||
*/ | ||
export declare interface IElectronNativeImage { | ||
toDataURL(): string; | ||
getSize(): { | ||
width: number; | ||
height: number; | ||
}; | ||
resize(options: { | ||
width: number; | ||
}): IElectronNativeImage; | ||
} | ||
export declare const IS_GLOBAL_VERSION: boolean; | ||
@@ -813,2 +678,4 @@ | ||
export declare function isBelowChrome(maxVersion: number): boolean; | ||
export declare function isBelowIOS(maxVersion: number, subVersion?: number, isExcluded?: boolean): boolean; | ||
@@ -836,4 +703,2 @@ | ||
export declare function isElectron(): boolean; | ||
export declare function isEmpty(n: any): boolean; | ||
@@ -869,4 +734,2 @@ | ||
export declare function isP2PTransport(transport: P2PTransportType): transport is P2PTransportType; | ||
export declare function isQQBrowser(): boolean; | ||
@@ -965,4 +828,2 @@ | ||
export declare function md5(inputString: string): string; | ||
export declare const MUTABLE_PARAMS: { | ||
@@ -984,3 +845,2 @@ PROCESS_ID: string; | ||
GATEWAY_WSS_ADDRESS: string; | ||
LIVE_STREAMING_ADDRESS: string; | ||
HTTP_CONNECT_TIMEOUT: number; | ||
@@ -1077,9 +937,2 @@ SIGNAL_REQUEST_TIMEOUT: number; | ||
NEW_REPORT_SERVER_DOMAINS: string[]; | ||
VIDEO_INSPECT_WORKER_MESSAGE_LENGTH_LIMIT: number; | ||
VIDEO_INSPECT_INTERVAL_MINIMUM: number; | ||
VIDEO_INSPECT_QUALITY_RATIO: number; | ||
VIDEO_INSPECT_WORKER_MANAGER_HOST: string; | ||
VIDEO_INSPECT_WORKER_MANAGER_PORT: string; | ||
VIDEO_INSPECT_WORKER_PORT: string; | ||
SHOW_VIDEO_INSPECT_WORKER_MESSAGE: boolean; | ||
STATS_COLLECTOR_PORT: number; | ||
@@ -1101,7 +954,2 @@ FORCE_TURN_TCP: boolean; | ||
SIGNAL_CHANNEL: number; | ||
TRANSMITTER_INITIAL_RTT: number; | ||
TRANSMITTER_INITIAL_RTO: number; | ||
TRANSMITTER_MAX_BATCH_ACK_COUNT: number; | ||
TRANSMITTER_MAX_RTO: number; | ||
DATACHANNEL_COMPRESS: boolean; | ||
FINGERPRINT: any; | ||
@@ -1121,6 +969,2 @@ DC_JOIN_WITH_FAILBACK: number; | ||
DISABLE_WEBAUDIO: boolean; | ||
CHANNEL_MEDIA_RELAY_SERVERS: { | ||
address: string; | ||
wss: number; | ||
}[]; | ||
KEEP_LAST_FRAME: boolean; | ||
@@ -1134,8 +978,2 @@ FORWARD_P2P_CREATION: boolean; | ||
ENABLE_VIDEO_SEI: boolean; | ||
IMAGE_MODERATION_WORKER_HOST: string; | ||
IMAGE_MODERATION_WORKER_MESSAGE_LENGTH_LIMIT: number; | ||
IMAGE_MODERATION_INTERVAL_MINIMUM: number; | ||
SHOW_IMAGE_MODERATION_WORKER_MESSAGE: boolean; | ||
IMAGE_MODERATION_QUALITY_RATIO: number; | ||
IMAGE_MODERATION_UPLOAD_REPORT_INTERVAL: number; | ||
SHOW_GLOBAL_CLIENT_LIST: boolean; | ||
@@ -1174,2 +1012,3 @@ ENABLE_DATASTREAM_2: boolean; | ||
FILTER_VIDEO_CODEC: any[]; | ||
USE_NEW_NETWORK_CONFIG: boolean; | ||
PLUGIN_INFO: any[]; | ||
@@ -1260,9 +1099,2 @@ }; | ||
export declare enum P2PTransportType { | ||
Default = "default", | ||
Auto = "auto", | ||
Relay = "relay", | ||
SdRtn = "sd-rtn" | ||
} | ||
export declare type PartialMutableParams = Partial<typeof MUTABLE_PARAMS>; | ||
@@ -1296,12 +1128,2 @@ | ||
export declare type RequiredOnlyOneOf<T, K extends keyof T = keyof T> = { | ||
[P in K]: { | ||
[S in P]: T[S]; | ||
} & { | ||
[U in keyof Omit<T, P>]?: never; | ||
}; | ||
}[K] extends infer O ? { | ||
[K in keyof O]: O[K]; | ||
} : never; | ||
export declare function resetHTTPBytesCount(): void; | ||
@@ -1361,5 +1183,4 @@ | ||
* - `"live"`: Sets the channel profile as live broadcast. You need to go on to call [setClientRole]{@link IAgoraRTCClient.setClientRole} to set the client as either a host or an audience. A host can send and receive audio or video, while an audience can only receive audio or video. | ||
* - `"rtc"`: Sets the channel profile as communication. It is used for a one-on-one call or a group call where all users in the channel can converse freely. | ||
*/ | ||
export declare type SDK_MODE = "live" | "rtc" | "p2p"; | ||
export declare type SDK_MODE = "live"; | ||
@@ -1389,8 +1210,2 @@ export declare class SDKStore { | ||
get cloudProxyServerMode(): CloudProxyServerMode; | ||
set useDataChannel(val: boolean); | ||
get useDataChannel(): boolean; | ||
set useP2P(val: boolean); | ||
get useP2P(): boolean; | ||
set p2pTransport(val: P2PTransportType); | ||
get p2pTransport(): P2PTransportType; | ||
clientCreated(): void; | ||
@@ -1408,8 +1223,3 @@ joinStart(): void; | ||
iceConnectionEnd(): void; | ||
publish(trackId: string, type: "video" | "audio" | "datachannel", publishStart?: number, publishEnd?: number): void; | ||
subscribe(userId: UID, type: "video" | "audio", subscribeStart?: number, subscribeEnd?: number, firstFrame?: number, streamAdded?: number, firstDecoded?: number): void; | ||
massSubscribe(userList: { | ||
userId: UID; | ||
type: "video" | "audio"; | ||
}[], subscribeStart?: number, subscribeEnd?: number, firstFrame?: number): void; | ||
get keyMetrics(): KeyMetrics; | ||
@@ -1424,6 +1234,2 @@ recordJoinChannelService(record: Partial<JoinChannelServiceRecord>, index?: number): number; | ||
export declare function setBigInt64(dataView: DataView, byteOffset: number, value: bigint, littleEndian: boolean | undefined): void; | ||
export declare function setBigUint64(dataView: DataView, byteOffset: number, value: bigint, littleEndian?: boolean): void; | ||
export declare function setParameter(key: keyof typeof MUTABLE_PARAMS, value: any, _force?: boolean): void; | ||
@@ -1435,7 +1241,2 @@ | ||
export declare function showElectronSelectSourceWindow(sources: ElectronDesktopCapturerSource[], captureAudio?: boolean): Promise<{ | ||
sourceId: string; | ||
audio: boolean; | ||
}>; | ||
export declare interface StreamInfo { | ||
@@ -1442,0 +1243,0 @@ audio: boolean; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
325786
3884