quickvo-sdk-js 1.3.1 → 1.4.0
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/enums/iceState.d.ts +16 -0
- package/dist/enums/notifyName.d.ts +3 -2
- package/dist/index.js +18405 -17709
- package/dist/index.umd.cjs +4 -4
- package/dist/protos/compiled.d.ts +242 -0
- package/dist/room/CallsWebSocket.d.ts +13 -2
- package/dist/room/P2P.d.ts +102 -19
- package/dist/room/PrResolves.d.ts +9 -0
- package/dist/room/RoomBase.d.ts +8 -0
- package/dist/room/RoomCalls.d.ts +7 -3
- package/dist/room/RoomMedias.d.ts +1 -1
- package/dist/room/RoomPeer.d.ts +5 -9
- package/dist/types.d.ts +2 -0
- package/package.json +2 -2
|
@@ -773,6 +773,9 @@ export namespace com {
|
|
|
773
773
|
|
|
774
774
|
/** Track simulcast */
|
|
775
775
|
simulcast?: (string|null);
|
|
776
|
+
|
|
777
|
+
/** Track lastRetry */
|
|
778
|
+
lastRetry?: (boolean|null);
|
|
776
779
|
}
|
|
777
780
|
|
|
778
781
|
/** Represents a Track. */
|
|
@@ -811,6 +814,9 @@ export namespace com {
|
|
|
811
814
|
/** Track simulcast. */
|
|
812
815
|
public simulcast?: (string|null);
|
|
813
816
|
|
|
817
|
+
/** Track lastRetry. */
|
|
818
|
+
public lastRetry?: (boolean|null);
|
|
819
|
+
|
|
814
820
|
/**
|
|
815
821
|
* Creates a new Track instance using the specified properties.
|
|
816
822
|
* @param [properties] Properties to set
|
|
@@ -1763,6 +1769,9 @@ export namespace com {
|
|
|
1763
1769
|
|
|
1764
1770
|
/** SubscribeReq session */
|
|
1765
1771
|
session?: (string|null);
|
|
1772
|
+
|
|
1773
|
+
/** SubscribeReq isLastSub */
|
|
1774
|
+
isLastSub?: (boolean|null);
|
|
1766
1775
|
}
|
|
1767
1776
|
|
|
1768
1777
|
/** Represents a SubscribeReq. */
|
|
@@ -1780,6 +1789,9 @@ export namespace com {
|
|
|
1780
1789
|
/** SubscribeReq session. */
|
|
1781
1790
|
public session?: (string|null);
|
|
1782
1791
|
|
|
1792
|
+
/** SubscribeReq isLastSub. */
|
|
1793
|
+
public isLastSub?: (boolean|null);
|
|
1794
|
+
|
|
1783
1795
|
/**
|
|
1784
1796
|
* Creates a new SubscribeReq instance using the specified properties.
|
|
1785
1797
|
* @param [properties] Properties to set
|
|
@@ -5625,6 +5637,15 @@ export namespace com {
|
|
|
5625
5637
|
|
|
5626
5638
|
/** ReportP2PReq reason */
|
|
5627
5639
|
reason?: (string|null);
|
|
5640
|
+
|
|
5641
|
+
/** ReportP2PReq pushUserIds */
|
|
5642
|
+
pushUserIds?: (string[]|null);
|
|
5643
|
+
|
|
5644
|
+
/** ReportP2PReq origin */
|
|
5645
|
+
origin?: (string|null);
|
|
5646
|
+
|
|
5647
|
+
/** ReportP2PReq connectedTime */
|
|
5648
|
+
connectedTime?: (string|null);
|
|
5628
5649
|
}
|
|
5629
5650
|
|
|
5630
5651
|
/** Represents a ReportP2PReq. */
|
|
@@ -5645,6 +5666,15 @@ export namespace com {
|
|
|
5645
5666
|
/** ReportP2PReq reason. */
|
|
5646
5667
|
public reason?: (string|null);
|
|
5647
5668
|
|
|
5669
|
+
/** ReportP2PReq pushUserIds. */
|
|
5670
|
+
public pushUserIds: string[];
|
|
5671
|
+
|
|
5672
|
+
/** ReportP2PReq origin. */
|
|
5673
|
+
public origin: string;
|
|
5674
|
+
|
|
5675
|
+
/** ReportP2PReq connectedTime. */
|
|
5676
|
+
public connectedTime?: (string|null);
|
|
5677
|
+
|
|
5648
5678
|
/**
|
|
5649
5679
|
* Creates a new ReportP2PReq instance using the specified properties.
|
|
5650
5680
|
* @param [properties] Properties to set
|
|
@@ -5940,6 +5970,218 @@ export namespace com {
|
|
|
5940
5970
|
*/
|
|
5941
5971
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
5942
5972
|
}
|
|
5973
|
+
|
|
5974
|
+
/** Properties of a CheckSessionReq. */
|
|
5975
|
+
interface ICheckSessionReq {
|
|
5976
|
+
|
|
5977
|
+
/** CheckSessionReq session */
|
|
5978
|
+
session?: (string|null);
|
|
5979
|
+
|
|
5980
|
+
/** CheckSessionReq tracks */
|
|
5981
|
+
tracks?: (com.quick.voice.proto.ITrack[]|null);
|
|
5982
|
+
}
|
|
5983
|
+
|
|
5984
|
+
/** Represents a CheckSessionReq. */
|
|
5985
|
+
class CheckSessionReq implements ICheckSessionReq {
|
|
5986
|
+
|
|
5987
|
+
/**
|
|
5988
|
+
* Constructs a new CheckSessionReq.
|
|
5989
|
+
* @param [properties] Properties to set
|
|
5990
|
+
*/
|
|
5991
|
+
constructor(properties?: com.quick.voice.proto.ICheckSessionReq);
|
|
5992
|
+
|
|
5993
|
+
/** CheckSessionReq session. */
|
|
5994
|
+
public session: string;
|
|
5995
|
+
|
|
5996
|
+
/** CheckSessionReq tracks. */
|
|
5997
|
+
public tracks: com.quick.voice.proto.ITrack[];
|
|
5998
|
+
|
|
5999
|
+
/**
|
|
6000
|
+
* Creates a new CheckSessionReq instance using the specified properties.
|
|
6001
|
+
* @param [properties] Properties to set
|
|
6002
|
+
* @returns CheckSessionReq instance
|
|
6003
|
+
*/
|
|
6004
|
+
public static create(properties?: com.quick.voice.proto.ICheckSessionReq): com.quick.voice.proto.CheckSessionReq;
|
|
6005
|
+
|
|
6006
|
+
/**
|
|
6007
|
+
* Encodes the specified CheckSessionReq message. Does not implicitly {@link com.quick.voice.proto.CheckSessionReq.verify|verify} messages.
|
|
6008
|
+
* @param message CheckSessionReq message or plain object to encode
|
|
6009
|
+
* @param [writer] Writer to encode to
|
|
6010
|
+
* @returns Writer
|
|
6011
|
+
*/
|
|
6012
|
+
public static encode(message: com.quick.voice.proto.ICheckSessionReq, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
6013
|
+
|
|
6014
|
+
/**
|
|
6015
|
+
* Encodes the specified CheckSessionReq message, length delimited. Does not implicitly {@link com.quick.voice.proto.CheckSessionReq.verify|verify} messages.
|
|
6016
|
+
* @param message CheckSessionReq message or plain object to encode
|
|
6017
|
+
* @param [writer] Writer to encode to
|
|
6018
|
+
* @returns Writer
|
|
6019
|
+
*/
|
|
6020
|
+
public static encodeDelimited(message: com.quick.voice.proto.ICheckSessionReq, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
6021
|
+
|
|
6022
|
+
/**
|
|
6023
|
+
* Decodes a CheckSessionReq message from the specified reader or buffer.
|
|
6024
|
+
* @param reader Reader or buffer to decode from
|
|
6025
|
+
* @param [length] Message length if known beforehand
|
|
6026
|
+
* @returns CheckSessionReq
|
|
6027
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6028
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6029
|
+
*/
|
|
6030
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): com.quick.voice.proto.CheckSessionReq;
|
|
6031
|
+
|
|
6032
|
+
/**
|
|
6033
|
+
* Decodes a CheckSessionReq message from the specified reader or buffer, length delimited.
|
|
6034
|
+
* @param reader Reader or buffer to decode from
|
|
6035
|
+
* @returns CheckSessionReq
|
|
6036
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6037
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6038
|
+
*/
|
|
6039
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): com.quick.voice.proto.CheckSessionReq;
|
|
6040
|
+
|
|
6041
|
+
/**
|
|
6042
|
+
* Verifies a CheckSessionReq message.
|
|
6043
|
+
* @param message Plain object to verify
|
|
6044
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
6045
|
+
*/
|
|
6046
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
6047
|
+
|
|
6048
|
+
/**
|
|
6049
|
+
* Creates a CheckSessionReq message from a plain object. Also converts values to their respective internal types.
|
|
6050
|
+
* @param object Plain object
|
|
6051
|
+
* @returns CheckSessionReq
|
|
6052
|
+
*/
|
|
6053
|
+
public static fromObject(object: { [k: string]: any }): com.quick.voice.proto.CheckSessionReq;
|
|
6054
|
+
|
|
6055
|
+
/**
|
|
6056
|
+
* Creates a plain object from a CheckSessionReq message. Also converts values to other types if specified.
|
|
6057
|
+
* @param message CheckSessionReq
|
|
6058
|
+
* @param [options] Conversion options
|
|
6059
|
+
* @returns Plain object
|
|
6060
|
+
*/
|
|
6061
|
+
public static toObject(message: com.quick.voice.proto.CheckSessionReq, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
6062
|
+
|
|
6063
|
+
/**
|
|
6064
|
+
* Converts this CheckSessionReq to JSON.
|
|
6065
|
+
* @returns JSON object
|
|
6066
|
+
*/
|
|
6067
|
+
public toJSON(): { [k: string]: any };
|
|
6068
|
+
|
|
6069
|
+
/**
|
|
6070
|
+
* Gets the default type url for CheckSessionReq
|
|
6071
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
6072
|
+
* @returns The default type url
|
|
6073
|
+
*/
|
|
6074
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
6075
|
+
}
|
|
6076
|
+
|
|
6077
|
+
/** Properties of a CheckSessionRsq. */
|
|
6078
|
+
interface ICheckSessionRsq {
|
|
6079
|
+
|
|
6080
|
+
/** CheckSessionRsq sessionIsValid */
|
|
6081
|
+
sessionIsValid?: (boolean|null);
|
|
6082
|
+
|
|
6083
|
+
/** CheckSessionRsq tracks */
|
|
6084
|
+
tracks?: (com.quick.voice.proto.ITrack[]|null);
|
|
6085
|
+
|
|
6086
|
+
/** CheckSessionRsq session */
|
|
6087
|
+
session?: (string|null);
|
|
6088
|
+
}
|
|
6089
|
+
|
|
6090
|
+
/** Represents a CheckSessionRsq. */
|
|
6091
|
+
class CheckSessionRsq implements ICheckSessionRsq {
|
|
6092
|
+
|
|
6093
|
+
/**
|
|
6094
|
+
* Constructs a new CheckSessionRsq.
|
|
6095
|
+
* @param [properties] Properties to set
|
|
6096
|
+
*/
|
|
6097
|
+
constructor(properties?: com.quick.voice.proto.ICheckSessionRsq);
|
|
6098
|
+
|
|
6099
|
+
/** CheckSessionRsq sessionIsValid. */
|
|
6100
|
+
public sessionIsValid: boolean;
|
|
6101
|
+
|
|
6102
|
+
/** CheckSessionRsq tracks. */
|
|
6103
|
+
public tracks: com.quick.voice.proto.ITrack[];
|
|
6104
|
+
|
|
6105
|
+
/** CheckSessionRsq session. */
|
|
6106
|
+
public session: string;
|
|
6107
|
+
|
|
6108
|
+
/**
|
|
6109
|
+
* Creates a new CheckSessionRsq instance using the specified properties.
|
|
6110
|
+
* @param [properties] Properties to set
|
|
6111
|
+
* @returns CheckSessionRsq instance
|
|
6112
|
+
*/
|
|
6113
|
+
public static create(properties?: com.quick.voice.proto.ICheckSessionRsq): com.quick.voice.proto.CheckSessionRsq;
|
|
6114
|
+
|
|
6115
|
+
/**
|
|
6116
|
+
* Encodes the specified CheckSessionRsq message. Does not implicitly {@link com.quick.voice.proto.CheckSessionRsq.verify|verify} messages.
|
|
6117
|
+
* @param message CheckSessionRsq message or plain object to encode
|
|
6118
|
+
* @param [writer] Writer to encode to
|
|
6119
|
+
* @returns Writer
|
|
6120
|
+
*/
|
|
6121
|
+
public static encode(message: com.quick.voice.proto.ICheckSessionRsq, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
6122
|
+
|
|
6123
|
+
/**
|
|
6124
|
+
* Encodes the specified CheckSessionRsq message, length delimited. Does not implicitly {@link com.quick.voice.proto.CheckSessionRsq.verify|verify} messages.
|
|
6125
|
+
* @param message CheckSessionRsq message or plain object to encode
|
|
6126
|
+
* @param [writer] Writer to encode to
|
|
6127
|
+
* @returns Writer
|
|
6128
|
+
*/
|
|
6129
|
+
public static encodeDelimited(message: com.quick.voice.proto.ICheckSessionRsq, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
6130
|
+
|
|
6131
|
+
/**
|
|
6132
|
+
* Decodes a CheckSessionRsq message from the specified reader or buffer.
|
|
6133
|
+
* @param reader Reader or buffer to decode from
|
|
6134
|
+
* @param [length] Message length if known beforehand
|
|
6135
|
+
* @returns CheckSessionRsq
|
|
6136
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6137
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6138
|
+
*/
|
|
6139
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): com.quick.voice.proto.CheckSessionRsq;
|
|
6140
|
+
|
|
6141
|
+
/**
|
|
6142
|
+
* Decodes a CheckSessionRsq message from the specified reader or buffer, length delimited.
|
|
6143
|
+
* @param reader Reader or buffer to decode from
|
|
6144
|
+
* @returns CheckSessionRsq
|
|
6145
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6146
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6147
|
+
*/
|
|
6148
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): com.quick.voice.proto.CheckSessionRsq;
|
|
6149
|
+
|
|
6150
|
+
/**
|
|
6151
|
+
* Verifies a CheckSessionRsq message.
|
|
6152
|
+
* @param message Plain object to verify
|
|
6153
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
6154
|
+
*/
|
|
6155
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
6156
|
+
|
|
6157
|
+
/**
|
|
6158
|
+
* Creates a CheckSessionRsq message from a plain object. Also converts values to their respective internal types.
|
|
6159
|
+
* @param object Plain object
|
|
6160
|
+
* @returns CheckSessionRsq
|
|
6161
|
+
*/
|
|
6162
|
+
public static fromObject(object: { [k: string]: any }): com.quick.voice.proto.CheckSessionRsq;
|
|
6163
|
+
|
|
6164
|
+
/**
|
|
6165
|
+
* Creates a plain object from a CheckSessionRsq message. Also converts values to other types if specified.
|
|
6166
|
+
* @param message CheckSessionRsq
|
|
6167
|
+
* @param [options] Conversion options
|
|
6168
|
+
* @returns Plain object
|
|
6169
|
+
*/
|
|
6170
|
+
public static toObject(message: com.quick.voice.proto.CheckSessionRsq, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
6171
|
+
|
|
6172
|
+
/**
|
|
6173
|
+
* Converts this CheckSessionRsq to JSON.
|
|
6174
|
+
* @returns JSON object
|
|
6175
|
+
*/
|
|
6176
|
+
public toJSON(): { [k: string]: any };
|
|
6177
|
+
|
|
6178
|
+
/**
|
|
6179
|
+
* Gets the default type url for CheckSessionRsq
|
|
6180
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
6181
|
+
* @returns The default type url
|
|
6182
|
+
*/
|
|
6183
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
6184
|
+
}
|
|
5943
6185
|
}
|
|
5944
6186
|
}
|
|
5945
6187
|
}
|
|
@@ -18,9 +18,20 @@ export interface CallsWebSocketOptions {
|
|
|
18
18
|
export declare class CallsWebSocket {
|
|
19
19
|
#private;
|
|
20
20
|
prws: PrWebSocket;
|
|
21
|
-
|
|
21
|
+
activeTimeStamp: number;
|
|
22
22
|
constructor(_options?: CallsWebSocketOptions);
|
|
23
|
+
/**
|
|
24
|
+
* fetchUrl
|
|
25
|
+
*/
|
|
26
|
+
getUrl: (env?: "local" | "dev" | "prod") => Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* afreshSend
|
|
29
|
+
*/
|
|
30
|
+
afreshSends: () => void;
|
|
23
31
|
clearEvents: (sns?: string[]) => void;
|
|
32
|
+
/**
|
|
33
|
+
* checkActivity
|
|
34
|
+
*/
|
|
24
35
|
/**
|
|
25
36
|
* 连接
|
|
26
37
|
* @returns
|
|
@@ -34,7 +45,7 @@ export declare class CallsWebSocket {
|
|
|
34
45
|
* 发送消息
|
|
35
46
|
* @param message Message
|
|
36
47
|
*/
|
|
37
|
-
sendMessage: <T = any>(_message: Message,
|
|
48
|
+
sendMessage: <T = any>(_message: Message, onback?: boolean) => Promise<SendMessageRevolve<T>>;
|
|
38
49
|
/**
|
|
39
50
|
* 触发广播事件
|
|
40
51
|
* @param event 事件名称
|
package/dist/room/P2P.d.ts
CHANGED
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
import { K_mediaType } from '../enums/mediaType';
|
|
2
|
+
import { PrResolves } from './PrResolves';
|
|
3
|
+
import { UserTrack } from '../types';
|
|
2
4
|
export declare class P2P {
|
|
3
5
|
#private;
|
|
6
|
+
prResolves: PrResolves;
|
|
4
7
|
phoneyStreams: Map<K_mediaType, MediaStream>;
|
|
5
8
|
recv_peer_ins: RTCPeerConnection;
|
|
6
|
-
recv_offer: RTCSessionDescriptionInit;
|
|
7
9
|
recv_icecandidates: RTCIceCandidate[];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
recv_candidate_collected: boolean;
|
|
11
|
+
recv_transceiverMap: Map<"microphoneCamera_audio" | "microphoneCamera_video" | "screenSharing_video" | "screenSharing_audio", RTCRtpTransceiver>;
|
|
12
|
+
recvPeerNetwork: {
|
|
13
|
+
inboundBytes: number;
|
|
14
|
+
outboundBytes: number;
|
|
15
|
+
lostRate: string;
|
|
16
|
+
roundTripTime: string;
|
|
17
|
+
jitter: string;
|
|
18
|
+
};
|
|
10
19
|
send_peer_ins: RTCPeerConnection;
|
|
11
|
-
send_offer: RTCSessionDescriptionInit;
|
|
12
20
|
send_icecandidates: RTCIceCandidate[];
|
|
13
|
-
|
|
21
|
+
send_candidate_collected: boolean;
|
|
22
|
+
send_transceiverMap: Map<"microphoneCamera_audio" | "microphoneCamera_video" | "screenSharing_video" | "screenSharing_audio", RTCRtpTransceiver>;
|
|
23
|
+
sendPeerNetwork: {
|
|
24
|
+
inboundBytes: number;
|
|
25
|
+
outboundBytes: number;
|
|
26
|
+
lostRate: string;
|
|
27
|
+
roundTripTime: string;
|
|
28
|
+
jitter: string;
|
|
29
|
+
};
|
|
14
30
|
tracks: MediaStreamTrack[];
|
|
31
|
+
reports: any[];
|
|
32
|
+
getPeerStatsTimer: number;
|
|
15
33
|
constructor(phoneyStreams: Map<K_mediaType, MediaStream>);
|
|
34
|
+
getPhoneyStreams: (mediaType: K_mediaType) => MediaStream;
|
|
16
35
|
/**
|
|
17
36
|
* sendIceConnected
|
|
18
37
|
*/
|
|
@@ -21,41 +40,65 @@ export declare class P2P {
|
|
|
21
40
|
* recvIceConnected
|
|
22
41
|
*/
|
|
23
42
|
recvIceConnected: () => Promise<unknown>;
|
|
24
|
-
getOffer: () => RTCSessionDescriptionInit;
|
|
25
|
-
getIcecandidates: () => RTCIceCandidate[];
|
|
26
43
|
/**
|
|
27
|
-
*
|
|
44
|
+
* sendCandidateCollected
|
|
28
45
|
*/
|
|
29
|
-
|
|
46
|
+
sendCandidateCollected: () => Promise<unknown>;
|
|
47
|
+
/**
|
|
48
|
+
* recvCandidateCollected
|
|
49
|
+
*/
|
|
50
|
+
recvCandidateCollected: () => Promise<unknown>;
|
|
51
|
+
/**
|
|
52
|
+
* getSendIcecandidates
|
|
53
|
+
*/
|
|
54
|
+
getSendIcecandidates: () => Promise<RTCIceCandidate[]>;
|
|
55
|
+
/**
|
|
56
|
+
* getRecvIcecandidates
|
|
57
|
+
*/
|
|
58
|
+
getRecvIcecandidates: () => Promise<RTCIceCandidate[]>;
|
|
59
|
+
/**
|
|
60
|
+
* setOffered
|
|
61
|
+
*/
|
|
62
|
+
setOffered: () => Promise<unknown>;
|
|
30
63
|
/**
|
|
31
64
|
* initSender
|
|
32
65
|
*/
|
|
33
66
|
initSenderPc: () => Promise<void>;
|
|
34
67
|
/**
|
|
35
|
-
*
|
|
68
|
+
* clearSenderPc
|
|
36
69
|
*/
|
|
37
|
-
|
|
70
|
+
clearSenderPc: () => Promise<void>;
|
|
38
71
|
/**
|
|
39
|
-
*
|
|
72
|
+
* initRecvPc
|
|
40
73
|
*/
|
|
41
|
-
|
|
74
|
+
initRecvPc: () => Promise<void>;
|
|
42
75
|
/**
|
|
43
|
-
*
|
|
76
|
+
* clearSenderPc
|
|
44
77
|
*/
|
|
45
|
-
|
|
78
|
+
clearRecvPc: () => Promise<void>;
|
|
46
79
|
/**
|
|
47
|
-
*
|
|
80
|
+
* initSenders
|
|
48
81
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
82
|
+
initSenders: (tracks?: {
|
|
83
|
+
mid: string;
|
|
84
|
+
type: number;
|
|
85
|
+
}[]) => Promise<void>;
|
|
51
86
|
/**
|
|
52
87
|
* addSenders
|
|
53
88
|
*/
|
|
54
89
|
addSenders: (mediaTypes?: K_mediaType[]) => Promise<("microphoneCamera_audio" | "microphoneCamera_video" | "screenSharing_video" | "screenSharing_audio")[]>;
|
|
90
|
+
/**
|
|
91
|
+
* addRecvs
|
|
92
|
+
*/
|
|
93
|
+
addRecvs: (mediaTypes?: K_mediaType[]) => Promise<("microphoneCamera_audio" | "microphoneCamera_video" | "screenSharing_video" | "screenSharing_audio")[]>;
|
|
55
94
|
/**
|
|
56
95
|
* getSenderTracks
|
|
57
96
|
*/
|
|
58
|
-
getSenderTracks: (mediaTypes?: K_mediaType[]) => Promise<
|
|
97
|
+
getSenderTracks: (mediaTypes?: K_mediaType[]) => Promise<UserTrack[]>;
|
|
98
|
+
/**
|
|
99
|
+
* getRecvTracks
|
|
100
|
+
*/
|
|
101
|
+
getRecvTracks: (mediaTypes?: K_mediaType[]) => Promise<{
|
|
59
102
|
type: number;
|
|
60
103
|
enabled: boolean;
|
|
61
104
|
trackName: string;
|
|
@@ -63,8 +106,48 @@ export declare class P2P {
|
|
|
63
106
|
mid: string | null;
|
|
64
107
|
key: string;
|
|
65
108
|
}[]>;
|
|
109
|
+
/**
|
|
110
|
+
* createOffer
|
|
111
|
+
*/
|
|
112
|
+
createOffer: () => Promise<RTCSessionDescriptionInit>;
|
|
113
|
+
/**
|
|
114
|
+
* setOffer
|
|
115
|
+
*/
|
|
116
|
+
setOffer: (offer: RTCSessionDescriptionInit) => Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* createAnswer
|
|
119
|
+
*/
|
|
120
|
+
createAnswer: () => Promise<RTCSessionDescriptionInit>;
|
|
121
|
+
/**
|
|
122
|
+
* addCandidates
|
|
123
|
+
*/
|
|
124
|
+
addCandidates: (remote_candidates: RTCIceCandidate[]) => Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* setAnswer
|
|
127
|
+
*/
|
|
128
|
+
setAnswer: (answer: RTCSessionDescriptionInit, answer_candidates: RTCIceCandidateInit[]) => Promise<void>;
|
|
66
129
|
/**
|
|
67
130
|
* getTrack
|
|
68
131
|
*/
|
|
69
132
|
getTrack: (mediaType: K_mediaType) => MediaStreamTrack | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* getSendPeerNetwork
|
|
135
|
+
*/
|
|
136
|
+
getSendPeerNetwork: () => {
|
|
137
|
+
inboundBytes: number;
|
|
138
|
+
outboundBytes: number;
|
|
139
|
+
lostRate: string;
|
|
140
|
+
roundTripTime: string;
|
|
141
|
+
jitter: string;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* getRecvPeerNetwork
|
|
145
|
+
*/
|
|
146
|
+
getRecvPeerNetwork: () => {
|
|
147
|
+
inboundBytes: number;
|
|
148
|
+
outboundBytes: number;
|
|
149
|
+
lostRate: string;
|
|
150
|
+
roundTripTime: string;
|
|
151
|
+
jitter: string;
|
|
152
|
+
};
|
|
70
153
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type Resolve = Map<string, Function>;
|
|
2
|
+
export declare class PrResolves {
|
|
3
|
+
resolvesMap: Map<string, Resolve>;
|
|
4
|
+
index: number;
|
|
5
|
+
constructor();
|
|
6
|
+
add: (eventKey: string, checkFun?: Function) => Promise<unknown>;
|
|
7
|
+
emit: (eventKey: string) => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
package/dist/room/RoomBase.d.ts
CHANGED
|
@@ -6,11 +6,14 @@ import { NetworkQualityTester } from './NetworkQualityTester';
|
|
|
6
6
|
import { StreamRecorder } from './StreamRecorder';
|
|
7
7
|
import { PrAsyncQueue } from 'pr-async-queue';
|
|
8
8
|
import { P2P } from './P2P';
|
|
9
|
+
import { K_iceState } from '../enums/iceState';
|
|
10
|
+
import { PrResolves } from './PrResolves';
|
|
9
11
|
type Options = QuickOptions & RoomOptions & CallsWebSocketOptions & {
|
|
10
12
|
earlyId?: string;
|
|
11
13
|
};
|
|
12
14
|
export declare class RoomBase {
|
|
13
15
|
options: Options;
|
|
16
|
+
prResolves: PrResolves;
|
|
14
17
|
sdk_service_version: string;
|
|
15
18
|
sdk_session: string;
|
|
16
19
|
prohibitNotify: boolean;
|
|
@@ -18,6 +21,7 @@ export declare class RoomBase {
|
|
|
18
21
|
isInRoom: boolean;
|
|
19
22
|
asyncQueue: PrAsyncQueue;
|
|
20
23
|
roomState: K_roomState;
|
|
24
|
+
iceState: K_iceState;
|
|
21
25
|
createAt: number;
|
|
22
26
|
cwsIns: CallsWebSocket;
|
|
23
27
|
peerIns: RTCPeerConnection;
|
|
@@ -67,6 +71,10 @@ export declare class RoomBase {
|
|
|
67
71
|
* setRoomState
|
|
68
72
|
*/
|
|
69
73
|
setRoomState: (state: K_roomState) => void;
|
|
74
|
+
/**
|
|
75
|
+
* setIceState
|
|
76
|
+
*/
|
|
77
|
+
setIceState: (state: K_iceState) => void;
|
|
70
78
|
/**
|
|
71
79
|
* setOptions
|
|
72
80
|
*/
|
package/dist/room/RoomCalls.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
18
18
|
* @param mediaDeviceKind "audioinput" | "audiooutput" | "videoinput"
|
|
19
19
|
* @param deviceId string
|
|
20
20
|
*/
|
|
21
|
-
setMediaDeviceKind: (mediaDeviceKind: MediaDeviceKind, deviceId: string) => Promise<
|
|
21
|
+
setMediaDeviceKind: (mediaDeviceKind: MediaDeviceKind, deviceId: string) => Promise<unknown>;
|
|
22
22
|
/**
|
|
23
23
|
* changeScreenSharing
|
|
24
24
|
* @param mediaDeviceKind "audioinput" | "audiooutput" | "videoinput"
|
|
@@ -126,6 +126,10 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
126
126
|
* setSession
|
|
127
127
|
*/
|
|
128
128
|
setSession: () => void;
|
|
129
|
+
/**
|
|
130
|
+
* wsConnected
|
|
131
|
+
*/
|
|
132
|
+
cwsConnected: () => Promise<unknown>;
|
|
129
133
|
p2p: {
|
|
130
134
|
/**
|
|
131
135
|
* open
|
|
@@ -142,10 +146,10 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
142
146
|
/**
|
|
143
147
|
* reportP2PConnect
|
|
144
148
|
*/
|
|
145
|
-
reportP2PConnect: (
|
|
149
|
+
reportP2PConnect: (remoteUserId: string, sendUserId: string, code: 0 | 1 | 2 | 3, reason?: string, pushUserIds?: string[], connectedTime?: number) => Promise<import('..').SendMessageRevolve<any>>;
|
|
146
150
|
/**
|
|
147
151
|
* close
|
|
148
152
|
*/
|
|
149
|
-
close: (
|
|
153
|
+
close: (userId: string, mediaTypes?: K_mediaType[]) => Promise<void>;
|
|
150
154
|
};
|
|
151
155
|
}
|
|
@@ -27,7 +27,7 @@ export declare class RoomMedias extends RoomBase {
|
|
|
27
27
|
/**
|
|
28
28
|
* initUserMediaStreamContext
|
|
29
29
|
*/
|
|
30
|
-
initUserMediaStreamContext: (userId: string, mediaType: K_mediaType, stream: MediaStream) => Promise<void>;
|
|
30
|
+
initUserMediaStreamContext: (userId: string, mediaType: K_mediaType, stream: MediaStream, clear: boolean) => Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* getUserMediaStreamContext
|
|
33
33
|
*/
|
package/dist/room/RoomPeer.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export declare class RoomPeer extends RoomUsers {
|
|
|
6
6
|
#private;
|
|
7
7
|
getPeerStatsTimer: number;
|
|
8
8
|
reports: any[];
|
|
9
|
-
candidates: any[];
|
|
10
9
|
peerNetwork: {
|
|
11
10
|
inboundBytes: number;
|
|
12
11
|
outboundBytes: number;
|
|
@@ -34,14 +33,7 @@ export declare class RoomPeer extends RoomUsers {
|
|
|
34
33
|
/**
|
|
35
34
|
* getSenderTracks
|
|
36
35
|
*/
|
|
37
|
-
getSenderTracks: (mediaTypes?: K_mediaType[]) => Promise<
|
|
38
|
-
type: number;
|
|
39
|
-
enabled: boolean;
|
|
40
|
-
trackName: string;
|
|
41
|
-
location: string;
|
|
42
|
-
mid: string | null;
|
|
43
|
-
key: string;
|
|
44
|
-
}[]>;
|
|
36
|
+
getSenderTracks: (mediaTypes?: K_mediaType[]) => Promise<UserTrack[]>;
|
|
45
37
|
/**
|
|
46
38
|
* addSenders
|
|
47
39
|
*/
|
|
@@ -50,6 +42,10 @@ export declare class RoomPeer extends RoomUsers {
|
|
|
50
42
|
* removeSenders
|
|
51
43
|
*/
|
|
52
44
|
removeSenders: (mediaTypes?: K_mediaType[]) => Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* stopSenders
|
|
47
|
+
*/
|
|
48
|
+
stopSenders: (mediaTypes?: K_mediaType[]) => void;
|
|
53
49
|
/**
|
|
54
50
|
* onSubscribeUserTracks
|
|
55
51
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -104,6 +104,7 @@ export interface UserTrack {
|
|
|
104
104
|
* 唯一key 每次轨道变化均会改变
|
|
105
105
|
*/
|
|
106
106
|
key: string;
|
|
107
|
+
origin: 'sfu' | 'p2p';
|
|
107
108
|
}
|
|
108
109
|
/**
|
|
109
110
|
* 数据通道
|
|
@@ -126,6 +127,7 @@ export type Event = {
|
|
|
126
127
|
* 当前事件的发送的消息
|
|
127
128
|
*/
|
|
128
129
|
message: Message;
|
|
130
|
+
send: Function;
|
|
129
131
|
/**
|
|
130
132
|
* 当前事件的成功回调
|
|
131
133
|
* @param msg 事件完整消息
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickvo-sdk-js",
|
|
3
3
|
"description": "提供快捷接入单对单、单对多、群体会议、舞台会议等音视频功能。",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"pr-async-queue": "^0.1.3",
|
|
24
24
|
"pr-audio-stream": "^0.1.1",
|
|
25
25
|
"pr-nat-type": "^0.1.2",
|
|
26
|
-
"pr-tools": "^1.
|
|
26
|
+
"pr-tools": "^1.6.0",
|
|
27
27
|
"pr-ws": "^0.3.2",
|
|
28
28
|
"sdp-transform": "^2.15.0",
|
|
29
29
|
"webm-duration-fix": "^1.0.4"
|