Sfoglia il codice sorgente

chore. add returns annotation

matrixbirds 5 anni fa
parent
commit
6bc975c7fd
3 ha cambiato i file con 25 aggiunte e 18 eliminazioni
  1. 6
    6
      lib/RtcEngine.native.d.ts
  2. 6
    6
      lib/RtcEngine.native.js
  3. 13
    6
      src/RtcEngine.native.ts

+ 6
- 6
lib/RtcEngine.native.d.ts Vedi File

@@ -42,8 +42,8 @@ declare class RtcEngine {
42 42
      * It will occurs two events:
43 43
      * Occurs leaveChannel when achieve leaving stage
44 44
      * Occurs joinChannelSuccess when achieve joining stage
45
-     * @param channelName
46
-     * @param token
45
+     * @param channelName {@link string}
46
+     * @param token {@link string}
47 47
      */
48 48
     static switchChannel(channelName: string, token?: string): Promise<any>;
49 49
     /**
@@ -53,7 +53,7 @@ declare class RtcEngine {
53 53
      * It will occurs event:
54 54
      *  Occurs mediaRelayStateChanged
55 55
      *  Occurs receivedChannelMediaRelay when peer channel received this message
56
-     * @param config
56
+     * @param config {@link ChannelMediaConfiguration}
57 57
      */
58 58
     static startChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any>;
59 59
     /**
@@ -62,7 +62,7 @@ declare class RtcEngine {
62 62
      * This method will remove & update relay media stream across specified channels. (maximum support relay 4 channels)
63 63
      * It will occurs event:
64 64
      *  Occurs mediaRelayStateChanged
65
-     * @param config
65
+     * @param config {@link ChannelMediaConfiguration}
66 66
      */
67 67
     static removeChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any>;
68 68
     /**
@@ -71,7 +71,7 @@ declare class RtcEngine {
71 71
      * This method will update relay media stream across specified channels. (maximum support 4 channels)
72 72
      * It will occurs event:
73 73
      *  Occurs mediaRelayStateChanged
74
-     * @param config
74
+     * @param config {@link ChannelMediaConfiguration}
75 75
      */
76 76
     static updateChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any>;
77 77
     /**
@@ -80,7 +80,7 @@ declare class RtcEngine {
80 80
      * This method will stop relay media stream across specified channels.
81 81
      * It will occurs event:
82 82
      *  Occurs mediaRelayStateChanged
83
-     * @param config
83
+     * @param config {@link ChannelMediaConfiguration}
84 84
      */
85 85
     static stopChannelMediaRelay(): Promise<any>;
86 86
     /**

+ 6
- 6
lib/RtcEngine.native.js Vedi File

@@ -43,8 +43,8 @@ class RtcEngine {
43 43
      * It will occurs two events:
44 44
      * Occurs leaveChannel when achieve leaving stage
45 45
      * Occurs joinChannelSuccess when achieve joining stage
46
-     * @param channelName
47
-     * @param token
46
+     * @param channelName {@link string}
47
+     * @param token {@link string}
48 48
      */
49 49
     static switchChannel(channelName, token) {
50 50
         return Agora.switchChannel({ channelName, token });
@@ -56,7 +56,7 @@ class RtcEngine {
56 56
      * It will occurs event:
57 57
      *  Occurs mediaRelayStateChanged
58 58
      *  Occurs receivedChannelMediaRelay when peer channel received this message
59
-     * @param config
59
+     * @param config {@link ChannelMediaConfiguration}
60 60
      */
61 61
     static startChannelMediaRelay(config) {
62 62
         return Agora.startChannelMediaRelay(config);
@@ -67,7 +67,7 @@ class RtcEngine {
67 67
      * This method will remove & update relay media stream across specified channels. (maximum support relay 4 channels)
68 68
      * It will occurs event:
69 69
      *  Occurs mediaRelayStateChanged
70
-     * @param config
70
+     * @param config {@link ChannelMediaConfiguration}
71 71
      */
72 72
     static removeChannelMediaRelay(config) {
73 73
         return Agora.removeChannelMediaRelay(config);
@@ -78,7 +78,7 @@ class RtcEngine {
78 78
      * This method will update relay media stream across specified channels. (maximum support 4 channels)
79 79
      * It will occurs event:
80 80
      *  Occurs mediaRelayStateChanged
81
-     * @param config
81
+     * @param config {@link ChannelMediaConfiguration}
82 82
      */
83 83
     static updateChannelMediaRelay(config) {
84 84
         return Agora.updateChannelMediaRelay(config);
@@ -89,7 +89,7 @@ class RtcEngine {
89 89
      * This method will stop relay media stream across specified channels.
90 90
      * It will occurs event:
91 91
      *  Occurs mediaRelayStateChanged
92
-     * @param config
92
+     * @param config {@link ChannelMediaConfiguration}
93 93
      */
94 94
     static stopChannelMediaRelay() {
95 95
         return Agora.stopChannelMediaRelay();

+ 13
- 6
src/RtcEngine.native.ts Vedi File

@@ -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();