|
@@ -58,6 +58,7 @@ class RtcEngine {
|
58
|
58
|
* This method creates and start event observer. You should call this method once.
|
59
|
59
|
* @example `RtcEngine.init(option)`
|
60
|
60
|
* @param options Defines the property of the client, see {@link Option} for details.
|
|
61
|
+ * @returns any
|
61
|
62
|
*/
|
62
|
63
|
public static init(options: Option): void {
|
63
|
64
|
Agora.init(options);
|
|
@@ -72,6 +73,7 @@ class RtcEngine {
|
72
|
73
|
* @param uid
|
73
|
74
|
* @param token
|
74
|
75
|
* @param info
|
|
76
|
+ * @returns Promise<any>
|
75
|
77
|
*/
|
76
|
78
|
public static joinChannel(channelName: string, uid?: number, token?: string, info?: Object): Promise<any> {
|
77
|
79
|
return Agora.joinChannel({channelName, uid, token, info});
|
|
@@ -85,8 +87,9 @@ class RtcEngine {
|
85
|
87
|
* It will occurs two events:
|
86
|
88
|
* Occurs leaveChannel when achieve leaving stage
|
87
|
89
|
* Occurs joinChannelSuccess when achieve joining stage
|
88
|
|
- * @param channelName
|
89
|
|
- * @param token
|
|
90
|
+ * @param channelName {@link string}
|
|
91
|
+ * @param token {@link string}
|
|
92
|
+ * @returns Promise<any>
|
90
|
93
|
*/
|
91
|
94
|
public static switchChannel(channelName: string, token?: string): Promise<any> {
|
92
|
95
|
return Agora.switchChannel({channelName, token});
|
|
@@ -99,7 +102,8 @@ class RtcEngine {
|
99
|
102
|
* It will occurs event:
|
100
|
103
|
* Occurs mediaRelayStateChanged
|
101
|
104
|
* Occurs receivedChannelMediaRelay when peer channel received this message
|
102
|
|
- * @param config
|
|
105
|
+ * @param config {@link ChannelMediaConfiguration}
|
|
106
|
+ * @returns Promise<any>
|
103
|
107
|
*/
|
104
|
108
|
public static startChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any> {
|
105
|
109
|
return Agora.startChannelMediaRelay(config);
|
|
@@ -111,7 +115,8 @@ class RtcEngine {
|
111
|
115
|
* This method will remove & update relay media stream across specified channels. (maximum support relay 4 channels)
|
112
|
116
|
* It will occurs event:
|
113
|
117
|
* Occurs mediaRelayStateChanged
|
114
|
|
- * @param config
|
|
118
|
+ * @param config {@link ChannelMediaConfiguration}
|
|
119
|
+ * @returns Promise<any>
|
115
|
120
|
*/
|
116
|
121
|
public static removeChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any> {
|
117
|
122
|
return Agora.removeChannelMediaRelay(config);
|
|
@@ -123,7 +128,8 @@ class RtcEngine {
|
123
|
128
|
* This method will update relay media stream across specified channels. (maximum support 4 channels)
|
124
|
129
|
* It will occurs event:
|
125
|
130
|
* Occurs mediaRelayStateChanged
|
126
|
|
- * @param config
|
|
131
|
+ * @param config {@link ChannelMediaConfiguration}
|
|
132
|
+ * @returns Promise<any>
|
127
|
133
|
*/
|
128
|
134
|
public static updateChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any> {
|
129
|
135
|
return Agora.updateChannelMediaRelay(config);
|
|
@@ -135,7 +141,8 @@ class RtcEngine {
|
135
|
141
|
* This method will stop relay media stream across specified channels.
|
136
|
142
|
* It will occurs event:
|
137
|
143
|
* Occurs mediaRelayStateChanged
|
138
|
|
- * @param config
|
|
144
|
+ * @param config {@link ChannelMediaConfiguration}
|
|
145
|
+ * @returns Promise<any>
|
139
|
146
|
*/
|
140
|
147
|
public static stopChannelMediaRelay(): Promise<any> {
|
141
|
148
|
return Agora.stopChannelMediaRelay();
|