aliyun-rtc-sdk 7.1.2 → 7.1.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aliyun-rtc-sdk.es.js +1131 -955
- package/dist/aliyun-rtc-sdk.umd.js +28 -13
- package/dist/plugins/audioProcessPlugin.d.ts +55 -34
- package/dist/plugins/audioProcessPlugin.js +105 -102
- package/dist/plugins/beautyPlugin.d.ts +15 -26
- package/dist/types/index.d.ts +35 -12
- package/package.json +2 -2
|
@@ -13,25 +13,11 @@ interface IAudioProfile {
|
|
|
13
13
|
maxBitrate: number;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
declare enum FacingMode {
|
|
17
|
-
USER = "user",
|
|
18
|
-
ENVIRONMENT = "environment"
|
|
19
|
-
}
|
|
20
16
|
interface IError {
|
|
21
17
|
code: number;
|
|
22
18
|
reason: string;
|
|
23
19
|
relatedLink: string;
|
|
24
20
|
}
|
|
25
|
-
interface IAudioConstraints extends MediaTrackConstraints {
|
|
26
|
-
}
|
|
27
|
-
interface IVideoConstraints {
|
|
28
|
-
deviceId?: string;
|
|
29
|
-
facingMode?: FacingMode;
|
|
30
|
-
aspectRatio?: ConstrainDouble;
|
|
31
|
-
width?: number;
|
|
32
|
-
height?: number;
|
|
33
|
-
frameRate?: number;
|
|
34
|
-
}
|
|
35
21
|
interface IScreenConstraints {
|
|
36
22
|
audio?: boolean | MediaTrackConstraints;
|
|
37
23
|
video?: boolean | MediaTrackConstraints;
|
|
@@ -45,11 +31,12 @@ interface IDeviceManager {
|
|
|
45
31
|
getCameraList(): Promise<Array<MediaDeviceInfo>>;
|
|
46
32
|
getMicList(): Promise<Array<MediaDeviceInfo>>;
|
|
47
33
|
getSpeakerList(): Promise<Array<MediaDeviceInfo>>;
|
|
48
|
-
getAudioTrack(constraints:
|
|
49
|
-
getVideoTrack(constraints:
|
|
34
|
+
getAudioTrack(constraints: MediaTrackConstraints): Promise<MediaStreamTrack>;
|
|
35
|
+
getVideoTrack(constraints: MediaTrackConstraints): Promise<MediaStreamTrack>;
|
|
36
|
+
getAudioVideoTracks(constraints: MediaStreamConstraints): Promise<MediaStreamTrack[]>;
|
|
50
37
|
getScreenTrack(constraints: IScreenConstraints): Promise<MediaStreamTrack[]>;
|
|
51
|
-
getAudioStream(constraints:
|
|
52
|
-
getVideoStream(constraints:
|
|
38
|
+
getAudioStream(constraints: MediaTrackConstraints): Promise<MediaStream>;
|
|
39
|
+
getVideoStream(constraints: MediaTrackConstraints): Promise<MediaStream>;
|
|
53
40
|
getScreenStream(constraints: IScreenConstraints): Promise<MediaStream>;
|
|
54
41
|
}
|
|
55
42
|
|
|
@@ -70,11 +57,12 @@ declare class BrowserDeviceManager implements IDeviceManager {
|
|
|
70
57
|
getCameraList(): Promise<Array<MediaDeviceInfo>>;
|
|
71
58
|
getMicList(): Promise<Array<MediaDeviceInfo>>;
|
|
72
59
|
getSpeakerList(): Promise<Array<MediaDeviceInfo>>;
|
|
73
|
-
getAudioTrack(constraints:
|
|
74
|
-
getVideoTrack(constraints:
|
|
60
|
+
getAudioTrack(constraints: MediaTrackConstraints): Promise<MediaStreamTrack>;
|
|
61
|
+
getVideoTrack(constraints: MediaTrackConstraints): Promise<MediaStreamTrack>;
|
|
62
|
+
getAudioVideoTracks(constraints: MediaStreamConstraints): Promise<MediaStreamTrack[]>;
|
|
75
63
|
getScreenTrack(constraints: IScreenConstraints): Promise<MediaStreamTrack[]>;
|
|
76
|
-
getAudioStream(constraints:
|
|
77
|
-
getVideoStream(constraints:
|
|
64
|
+
getAudioStream(constraints: MediaTrackConstraints): Promise<MediaStream>;
|
|
65
|
+
getVideoStream(constraints: MediaTrackConstraints): Promise<MediaStream>;
|
|
78
66
|
getScreenStream(constraints: IScreenConstraints): Promise<MediaStream>;
|
|
79
67
|
checkSupportScreenShare(): boolean;
|
|
80
68
|
private createDeviceManager;
|
|
@@ -816,6 +804,7 @@ declare class LocalStream extends Stream {
|
|
|
816
804
|
initWithRetry(config: IStreamConfig, res?: () => void, rej?: (reason?: any) => void): Promise<void>;
|
|
817
805
|
private initMicAudio;
|
|
818
806
|
private initCameraVideo;
|
|
807
|
+
private initMicCamera;
|
|
819
808
|
private initScreenVideoAudio;
|
|
820
809
|
private tryMixMicAndScreenAudio;
|
|
821
810
|
private initTracks;
|
|
@@ -857,8 +846,8 @@ declare class LocalStream extends Stream {
|
|
|
857
846
|
}
|
|
858
847
|
|
|
859
848
|
interface IStreamConfig {
|
|
860
|
-
audio?:
|
|
861
|
-
video?:
|
|
849
|
+
audio?: MediaTrackConstraints | boolean;
|
|
850
|
+
video?: MediaTrackConstraints | boolean;
|
|
862
851
|
screen?: IScreenConstraints | boolean;
|
|
863
852
|
custom?: boolean;
|
|
864
853
|
mediaStream?: MediaStream;
|
|
@@ -964,8 +953,8 @@ declare class AliRtcLocalStreamInfo extends EventEmitter$1<AliRtcLocalStreamList
|
|
|
964
953
|
private _previewStream?;
|
|
965
954
|
plugins: AliRtcPlugin[];
|
|
966
955
|
private _profileManager?;
|
|
967
|
-
cameraVideoConstraints?:
|
|
968
|
-
micAudioConstraints?:
|
|
956
|
+
cameraVideoConstraints?: MediaTrackConstraints;
|
|
957
|
+
micAudioConstraints?: MediaTrackConstraints;
|
|
969
958
|
private get profileManager();
|
|
970
959
|
get audioProfile(): AudioProfileKey | undefined;
|
|
971
960
|
constructor(type: AliRtcRawDataStreamType);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { default as default_2 } from 'eventemitter3';
|
|
4
4
|
import { default as default_3 } from '@aliyun-sls/web-track-browser';
|
|
5
|
-
import { IAudioConstraints } from 'media-device';
|
|
6
5
|
import { IProfile } from 'aliyun-rts-sdk';
|
|
7
6
|
import { IStreamConfig } from 'aliyun-rts-sdk';
|
|
8
|
-
import {
|
|
7
|
+
import { ISubDeleteResult } from 'aliyun-peerconnection-core/dist/core';
|
|
9
8
|
import { LocalStream } from 'aliyun-rts-sdk';
|
|
10
9
|
import { RemoteStream } from 'aliyun-rts-sdk';
|
|
11
10
|
|
|
@@ -213,6 +212,7 @@ declare class AliRtcEngine_2 extends default_2<AliRtcEngineEventListener> {
|
|
|
213
212
|
static AliRtcConnectionStatusChangeReason: typeof AliRtcConnectionStatusChangeReason;
|
|
214
213
|
static AliRtcPlugin: typeof AliRtcPlugin;
|
|
215
214
|
static AliRtcPluginTrackType: typeof AliRtcPluginTrackType;
|
|
215
|
+
static AliRtcImageHolderPlugin: typeof AliRtcImageHolderPlugin;
|
|
216
216
|
static AliRtcLiveTranscodingParam: typeof AliRtcLiveTranscodingParam;
|
|
217
217
|
static AliRtcLiveTranscodingEncodeParam: typeof AliRtcLiveTranscodingEncodeParam;
|
|
218
218
|
static AliRtcLiveTranscodingMixParam: typeof AliRtcLiveTranscodingMixParam;
|
|
@@ -681,12 +681,12 @@ declare class AliRtcEngine_2 extends default_2<AliRtcEngineEventListener> {
|
|
|
681
681
|
* - 如果关闭推送音频流{@link publishLocalAudioStream},SDK在入会后不会打开音频采集
|
|
682
682
|
* @param {IAudioConstraints} audioConstraints 音频采集参数
|
|
683
683
|
*/
|
|
684
|
-
startAudioCapture(audioConstraints?:
|
|
684
|
+
startAudioCapture(audioConstraints?: MediaTrackConstraints): Promise<void>;
|
|
685
685
|
/**
|
|
686
686
|
* @brief 设置音频采集参数
|
|
687
687
|
* @param constraints 音频采集参数
|
|
688
688
|
*/
|
|
689
|
-
setAudioConstraints(constraints:
|
|
689
|
+
setAudioConstraints(constraints: MediaTrackConstraints): Promise<void>;
|
|
690
690
|
/**
|
|
691
691
|
* 关闭音频采集
|
|
692
692
|
* @note 调用此接口后,入会后、离会再入会,采集设备保持关闭状态
|
|
@@ -1599,6 +1599,27 @@ export declare enum AliRtcErrorCode {
|
|
|
1599
1599
|
ERR_SDK_CHANNEL_RELAY_TO_SELF_ERROR = 18874375
|
|
1600
1600
|
}
|
|
1601
1601
|
|
|
1602
|
+
export declare class AliRtcImageHolderPlugin extends AliRtcPlugin {
|
|
1603
|
+
private url;
|
|
1604
|
+
private image?;
|
|
1605
|
+
private canvas;
|
|
1606
|
+
private mediaStream?;
|
|
1607
|
+
private updateableManager;
|
|
1608
|
+
private updateable;
|
|
1609
|
+
private hasVideoTrack;
|
|
1610
|
+
constructor(url: string, fps?: number);
|
|
1611
|
+
get initOptions(): {
|
|
1612
|
+
imageUrl: string;
|
|
1613
|
+
};
|
|
1614
|
+
setOptions(options: ImageHolderPluginOptions): void;
|
|
1615
|
+
private drawImageToCanvas;
|
|
1616
|
+
start(): Promise<MediaStreamTrack>;
|
|
1617
|
+
stop(): void;
|
|
1618
|
+
isSupported(): boolean;
|
|
1619
|
+
shouldUpdate(_streamInfo: AliRtcLocalStreamInfo): boolean;
|
|
1620
|
+
process(streamInfo: AliRtcLocalStreamInfo): Promise<void>;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1602
1623
|
declare class AliRtcLiveTranscoding {
|
|
1603
1624
|
authInfo?: AliRtcAuthInfo;
|
|
1604
1625
|
private slsReporter;
|
|
@@ -1788,8 +1809,8 @@ export declare class AliRtcLocalStreamInfo extends default_2<AliRtcLocalStreamLi
|
|
|
1788
1809
|
private _previewStream?;
|
|
1789
1810
|
plugins: AliRtcPlugin[];
|
|
1790
1811
|
private _profileManager?;
|
|
1791
|
-
cameraVideoConstraints?:
|
|
1792
|
-
micAudioConstraints?:
|
|
1812
|
+
cameraVideoConstraints?: MediaTrackConstraints;
|
|
1813
|
+
micAudioConstraints?: MediaTrackConstraints;
|
|
1793
1814
|
private get profileManager();
|
|
1794
1815
|
get audioProfile(): AudioProfileKey | undefined;
|
|
1795
1816
|
constructor(type: AliRtcRawDataStreamType);
|
|
@@ -2521,6 +2542,10 @@ declare enum DisplayType {
|
|
|
2521
2542
|
WHEN_NO_VIDEO = 2
|
|
2522
2543
|
}
|
|
2523
2544
|
|
|
2545
|
+
declare interface ImageHolderPluginOptions {
|
|
2546
|
+
imageUrl: string;
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2524
2549
|
declare interface IResponse {
|
|
2525
2550
|
version: number;
|
|
2526
2551
|
code: number;
|
|
@@ -2706,12 +2731,12 @@ declare class LocalStreamManager extends default_2<LocalStreamManagerListener> {
|
|
|
2706
2731
|
* 设置 cameraVideoConstraints
|
|
2707
2732
|
* @param {IVideoConstraints} cameraVideoConstraints
|
|
2708
2733
|
*/
|
|
2709
|
-
setCameraVideoConstraints(cameraVideoConstraints:
|
|
2734
|
+
setCameraVideoConstraints(cameraVideoConstraints: MediaTrackConstraints): void;
|
|
2710
2735
|
/**
|
|
2711
2736
|
* 设置 micAudioConstraints
|
|
2712
2737
|
* @param {IAudioConstraints} micAudioConstraints
|
|
2713
2738
|
*/
|
|
2714
|
-
setMicAudioConstraints(micAudioConstraints:
|
|
2739
|
+
setMicAudioConstraints(micAudioConstraints: MediaTrackConstraints): void;
|
|
2715
2740
|
}
|
|
2716
2741
|
|
|
2717
2742
|
declare interface LocalStreamManagerListener {
|
|
@@ -3939,10 +3964,7 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
3939
3964
|
private getSubConfig;
|
|
3940
3965
|
private httpSubscribe;
|
|
3941
3966
|
private subscribeAdd;
|
|
3942
|
-
subscribeDelete(subscribeOptions: RemoteSubscribeOptions): Promise<
|
|
3943
|
-
url: string;
|
|
3944
|
-
stream: any;
|
|
3945
|
-
} | undefined>;
|
|
3967
|
+
subscribeDelete(subscribeOptions: RemoteSubscribeOptions): Promise<ISubDeleteResult | undefined>;
|
|
3946
3968
|
subscibeStop(streamUrl: string): Promise<void>;
|
|
3947
3969
|
subscribeAddDataChannel(streamUrl: string): Promise<any>;
|
|
3948
3970
|
subscribeStopDatachannel(streamUrl: string, datachannel: any): Promise<any>;
|
|
@@ -4154,6 +4176,7 @@ declare class SLSReporter {
|
|
|
4154
4176
|
reportPublishMonitor(callId: string, traceId: string, msid: string, track: MediaStreamTrack | undefined, stats: any[]): void;
|
|
4155
4177
|
reportSubscribeMonitor(callId: string, remoteId: string, traceId: string, msid: string, stats: any[]): void;
|
|
4156
4178
|
reportNetworkMonitor(candidates: any[]): void;
|
|
4179
|
+
reportLoopAudioDelay(ssrc: string, result: any): void;
|
|
4157
4180
|
/**
|
|
4158
4181
|
* 加入房间成功埋点
|
|
4159
4182
|
* @param {number} joinTime
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aliyun-rtc-sdk",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.3-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "rtc web sdk of aliyun",
|
|
6
6
|
"main": "dist/aliyun-rtc-sdk.umd.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@aliyun-sls/web-sts-plugin": "^0.3.5",
|
|
11
11
|
"@aliyun-sls/web-track-browser": "^0.3.5",
|
|
12
12
|
"aliyun-queen-engine": "^6.3.3",
|
|
13
|
-
"aliyun-rts-sdk": "2.
|
|
13
|
+
"aliyun-rts-sdk": "2.13.0",
|
|
14
14
|
"crypto-js": "^4.1.1",
|
|
15
15
|
"dateformat": "^5.0.3",
|
|
16
16
|
"eventemitter3": "^5.0.1",
|