Browse Source

chore. add returns annotation

matrixbirds 5 years ago
parent
commit
6bc975c7fd
3 changed files with 25 additions and 18 deletions
  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 View File

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

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

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

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

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