Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: add @event
  • Loading branch information
LichKing-2234 committed Oct 21, 2020
commit 61110ab173b207306daf21f326667a8eb3f97f04
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log
package-lock.json
yarn.lock

# BUCK
buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore
docs/api/
gitpull.sh
gitpush.sh

# Expo
.expo/*
Expand Down
5 changes: 1 addition & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
.idea/
docs/
lib/**/*.map
lib/**/*.tsbuildinfo
samples/
example/
src/
12 changes: 6 additions & 6 deletions src/common/RtcChannel.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ export default class RtcChannel implements RtcChannelInterface {
* @param options The channel media options.
*/
joinChannel(
token: string | null,
optionalInfo: string | null,
token: string | undefined | null,
optionalInfo: string | undefined | null,
optionalUid: number,
options: ChannelMediaOptions
): Promise<void> {
Expand Down Expand Up @@ -254,7 +254,7 @@ export default class RtcChannel implements RtcChannelInterface {
* @param options The channel media options.
*/
joinChannelWithUserAccount(
token: string | null,
token: string | undefined | null,
userAccount: string,
options: ChannelMediaOptions
): Promise<void> {
Expand Down Expand Up @@ -830,14 +830,14 @@ interface RtcChannelInterface
setClientRole(role: ClientRole): Promise<void>;

joinChannel(
token: string | null,
optionalInfo: string | null,
token: string | undefined | null,
optionalInfo: string | undefined | null,
optionalUid: number,
options: ChannelMediaOptions
): Promise<void>;

joinChannelWithUserAccount(
token: string | null,
token: string | undefined | null,
userAccount: string,
options: ChannelMediaOptions
): Promise<void>;
Expand Down
20 changes: 13 additions & 7 deletions src/common/RtcEngine.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ export default class RtcEngine implements RtcEngineInterface {
* If necessary, the uid can be converted to a 64-bit integer through “uid&0xffffffffL”.
*/
joinChannel(
token: string | null,
token: string | undefined | null,
channelName: string,
optionalInfo: string | null,
optionalInfo: string | undefined | null,
optionalUid: number
): Promise<void> {
return RtcEngine._callMethod('joinChannel', {
Expand Down Expand Up @@ -339,7 +339,10 @@ export default class RtcEngine implements RtcEngineInterface {
* - The space character.
* - Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
*/
switchChannel(token: string | null, channelName: string): Promise<void> {
switchChannel(
token: string | undefined | null,
channelName: string
): Promise<void> {
return RtcEngine._callMethod('switchChannel', { token, channelName });
}

Expand Down Expand Up @@ -549,7 +552,7 @@ export default class RtcEngine implements RtcEngineInterface {
* - Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
*/
joinChannelWithUserAccount(
token: string | null,
token: string | undefined | null,
channelName: string,
userAccount: string
): Promise<void> {
Expand Down Expand Up @@ -2517,13 +2520,16 @@ interface RtcEngineInterface
setClientRole(role: ClientRole): Promise<void>;

joinChannel(
token: string | null,
token: string | undefined | null,
channelName: string,
optionalInfo: string | null,
optionalInfo: string | undefined | null,
optionalUid: number
): Promise<void>;

switchChannel(token: string | null, channelName: string): Promise<void>;
switchChannel(
token: string | undefined | null,
channelName: string
): Promise<void>;

leaveChannel(): Promise<void>;

Expand Down
24 changes: 24 additions & 0 deletions src/common/RtcEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,8 @@ export interface RtcEngineEvents {
* - The local client enables the audio module and calls [`joinChannel`]{@link joinChannel} successfully.
* - The local client calls [`muteLocalAudioStream(true)`]{@link RtcEngine.muteLocalAudioStream} and [`muteLocalAudioStream(false)`]{@link RtcEngine.muteLocalAudioStream} in sequence.
* - The local client calls [`disableAudio`]{@link RtcEngine.disableAudio} and [`enableAudio`]{@link RtcEngine.enableAudio} in sequence.
*
* @event FirstLocalAudioFramePublished
*/
FirstLocalAudioFramePublished: ElapsedCallback;

Expand All @@ -1322,6 +1324,8 @@ export interface RtcEngineEvents {
* - The local client enables the video module and calls [`joinChannel`]{@link joinChannel} successfully.
* - The local client calls [`muteLocalVideoStream(true)`]{@link RtcEngine.muteLocalVideoStream} and [`muteLocalVideoStream(false)`]{@link RtcEngine.muteLocalVideoStream} in sequence.
* - The local client calls [`disableVideo`]{@link RtcEngine.disableVideo} and [`enableVideo`]{@link RtcEngine.enableVideo} in sequence.
*
* @event FirstLocalVideoFramePublished
*/
FirstLocalVideoFramePublished: ElapsedCallback;

Expand All @@ -1331,6 +1335,8 @@ export interface RtcEngineEvents {
* @since v3.1.2.
*
* This callback indicates the publishing state change of the local audio stream.
*
* @event AudioPublishStateChanged
*/
AudioPublishStateChanged: StreamPublishStateCallback;

Expand All @@ -1340,6 +1346,8 @@ export interface RtcEngineEvents {
* @since v3.1.2.
*
* This callback indicates the publishing state change of the local video stream.
*
* @event VideoPublishStateChanged
*/
VideoPublishStateChanged: StreamPublishStateCallback;

Expand All @@ -1349,6 +1357,8 @@ export interface RtcEngineEvents {
* @since v3.1.2.
*
* This callback indicates the subscribing state change of a remote audio stream.
*
* @event AudioSubscribeStateChanged
*/
AudioSubscribeStateChanged: StreamSubscribeStateCallback;

Expand All @@ -1358,13 +1368,17 @@ export interface RtcEngineEvents {
* @since v3.1.2.
*
* This callback indicates the subscribing state change of a remote video stream.
*
* @event VideoSubscribeStateChanged
*/
VideoSubscribeStateChanged: StreamSubscribeStateCallback;

/**
* Reports events during the RTMP streaming.
*
* @since v3.1.2.
*
* @event RtmpStreamingEvent
*/
RtmpStreamingEvent: RtmpStreamingEventCallback;
}
Expand Down Expand Up @@ -1673,6 +1687,8 @@ export interface RtcChannelEvents {
* @since v3.1.2.
*
* This callback indicates the publishing state change of the local audio stream.
*
* @event AudioPublishStateChanged
*/
AudioPublishStateChanged: StreamPublishStateCallback;

Expand All @@ -1682,6 +1698,8 @@ export interface RtcChannelEvents {
* @since v3.1.2.
*
* This callback indicates the publishing state change of the local video stream.
*
* @event VideoPublishStateChanged
*/
VideoPublishStateChanged: StreamPublishStateCallback;

Expand All @@ -1691,6 +1709,8 @@ export interface RtcChannelEvents {
* @since v3.1.2.
*
* This callback indicates the subscribing state change of a remote audio stream.
*
* @event AudioSubscribeStateChanged
*/
AudioSubscribeStateChanged: StreamSubscribeStateCallback;

Expand All @@ -1700,13 +1720,17 @@ export interface RtcChannelEvents {
* @since v3.1.2.
*
* This callback indicates the subscribing state change of a remote video stream.
*
* @event VideoSubscribeStateChanged
*/
VideoSubscribeStateChanged: StreamSubscribeStateCallback;

/**
* Reports events during the RTMP streaming.
*
* @since v3.1.2.
*
* @event RtmpStreamingEvent
*/
RtmpStreamingEvent: RtmpStreamingEventCallback;
}
7 changes: 5 additions & 2 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"mode": "file",
"out": "docs/api"
"inputFiles": ["./lib/typescript/src"],
"mode": "file",
"out": "docs/api",
"includeDeclarations": true,
"excludeExternals": true
}