@byteplus/rtc 4.63.3 → 4.65.1
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/extension-ainr/index.d.ts +76 -3
- package/extension-ainr/index.js +3 -4
- package/extension-ainr/index.umd.js +2 -3
- package/extension-beauty/index.js +2 -2
- package/extension-beauty/index.umd.js +2 -2
- package/index.d.ts +890 -96
- package/index.esm.min.js +2 -2
- package/index.min.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ declare const Config: {
|
|
|
71
71
|
HIDDEN_STATS: boolean;
|
|
72
72
|
UPLOAD_REMOTE_STATS: ExtendMediaType;
|
|
73
73
|
SDK_CODEC_NEGOTIATION: boolean;
|
|
74
|
+
AUDIO_CODEC: string;
|
|
74
75
|
};
|
|
75
76
|
declare const _default: VERTC;
|
|
76
77
|
declare enum AudioMixingError {
|
|
@@ -842,17 +843,27 @@ declare enum ErrorCode {
|
|
|
842
843
|
ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR = "ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR",
|
|
843
844
|
|
|
844
845
|
/**
|
|
845
|
-
* @brief Failed to change the simulcast settings. Ensure that the timing of calling [`setLocalSimulcastMode`](104478#rtcengine-setlocalsimulcastmode) is correct.
|
|
846
|
+
* @brief Failed to change the simulcast settings. Ensure that the timing of calling [`setLocalSimulcastMode`](docs-104478#rtcengine-setlocalsimulcastmode) is correct.
|
|
846
847
|
* You can change the resolution after publishing, but not the number of streams.
|
|
847
848
|
*/
|
|
848
849
|
SET_SIMULCAST_FAILED = "SET_SIMULCAST_FAILED",
|
|
849
850
|
|
|
850
851
|
/**
|
|
851
852
|
* @brief Mixed the deprecated methods of Simulcast feature with the current methods is forbidden. The deprecated methods will no longer be maintained in future versions and are expected to be removed after several updates. It is advised to switch to the current methods as soon as possible.
|
|
852
|
-
* + `setRemoteVideoConfig` is deprecated. Please use [`setRemoteSimulcastStreamType`](104478#rtcengine-setremotesimulcaststreamtype) instead.
|
|
853
|
-
* + `enableSimulcastMode` is deprecated. Please use [`setLocalSimulcastMode`](104478#rtcengine-setlocalsimulcastmode) instead.
|
|
853
|
+
* + `setRemoteVideoConfig` is deprecated. Please use [`setRemoteSimulcastStreamType`](docs-104478#rtcengine-setremotesimulcaststreamtype) instead.
|
|
854
|
+
* + `enableSimulcastMode` is deprecated. Please use [`setLocalSimulcastMode`](docs-104478#rtcengine-setlocalsimulcastmode) instead.
|
|
854
855
|
*/
|
|
855
|
-
MIXING_OLD_AND_NEW_APIS = "MIXING_OLD_AND_NEW_APIS"
|
|
856
|
+
MIXING_OLD_AND_NEW_APIS = "MIXING_OLD_AND_NEW_APIS",
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* @brief Failed to publish the WTN stream via [`startPushWTN`](docs-104478#wtnstream-startpushwtn).
|
|
860
|
+
*/
|
|
861
|
+
WTN_PUSH_FAILED = "WTN_PUSH_FAILED",
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* @brief Failed to subscribe to the WTN stream via [`startPlayWTN`](docs-104478#wtnstream-startplaywtn).
|
|
865
|
+
*/
|
|
866
|
+
WTN_PLAY_FAILED = "WTN_PLAY_FAILED"
|
|
856
867
|
}
|
|
857
868
|
declare enum ExtendMediaType {
|
|
858
869
|
NONE = 0
|
|
@@ -1240,8 +1251,10 @@ export declare enum ForwardStreamError {
|
|
|
1240
1251
|
* @brief The source room is set as the target room.
|
|
1241
1252
|
*/
|
|
1242
1253
|
FORWARD_STREAM_ERROR_REMOTE_KICKED = 1204,
|
|
1243
|
-
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1244
1256
|
* @hidden
|
|
1257
|
+
* @brief Server denies.
|
|
1245
1258
|
*/
|
|
1246
1259
|
FORWARD_STREAM_ERROR_NOT_SUPPORT = 1205
|
|
1247
1260
|
}
|
|
@@ -1408,12 +1421,12 @@ export declare enum PublicInterpolationMode {
|
|
|
1408
1421
|
}
|
|
1409
1422
|
|
|
1410
1423
|
/**
|
|
1411
|
-
* @brief
|
|
1424
|
+
* @brief Whether to inlcude audio or video in the WTN stream.
|
|
1412
1425
|
*/
|
|
1413
1426
|
export declare enum PublicStreamType {
|
|
1414
1427
|
|
|
1415
1428
|
/**
|
|
1416
|
-
* @brief
|
|
1429
|
+
* @brief Includes both audio and video.
|
|
1417
1430
|
*/
|
|
1418
1431
|
AUDIO_AND_VIDEO = 0,
|
|
1419
1432
|
|
|
@@ -1557,17 +1570,17 @@ export declare enum SUBTITLE_MODE {
|
|
|
1557
1570
|
export declare enum SimulcastStreamType {
|
|
1558
1571
|
|
|
1559
1572
|
/**
|
|
1560
|
-
* @brief
|
|
1573
|
+
* @brief High quality.
|
|
1561
1574
|
*/
|
|
1562
1575
|
VIDEO_STREAM_HIGH = "high",
|
|
1563
1576
|
|
|
1564
1577
|
/**
|
|
1565
|
-
* @brief
|
|
1578
|
+
* @brief Medium quality.
|
|
1566
1579
|
*/
|
|
1567
1580
|
VIDEO_STREAM_MID = "mid",
|
|
1568
1581
|
|
|
1569
1582
|
/**
|
|
1570
|
-
* @brief
|
|
1583
|
+
* @brief Low quality.
|
|
1571
1584
|
*/
|
|
1572
1585
|
VIDEO_STREAM_LOW = "low"
|
|
1573
1586
|
}
|
|
@@ -1640,8 +1653,8 @@ export declare enum SubscribeFallbackOption {
|
|
|
1640
1653
|
DISABLE = 0,
|
|
1641
1654
|
|
|
1642
1655
|
/**
|
|
1643
|
-
* @brief When the downstream network quality is bad, the video stream fallbacks to stream of lower resolution and then to voice only.
|
|
1644
|
-
* This setting takes effect only when the publisher enables simulcast mode
|
|
1656
|
+
* @brief When the downstream network quality is bad, the video stream fallbacks to stream of lower resolution and then to voice only.
|
|
1657
|
+
* This setting takes effect only when the publisher enables simulcast mode. See [Simulcasting](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-1359024) for fallback rules.
|
|
1645
1658
|
*/
|
|
1646
1659
|
VIDEO_STREAM_LOW = 1,
|
|
1647
1660
|
|
|
@@ -1776,6 +1789,7 @@ export declare enum UserOfflineReason {
|
|
|
1776
1789
|
}
|
|
1777
1790
|
|
|
1778
1791
|
/**
|
|
1792
|
+
* @hidden for internal use only
|
|
1779
1793
|
* @brief The preferred codec for the video stream.
|
|
1780
1794
|
*/
|
|
1781
1795
|
export declare enum VideoCodecType {
|
|
@@ -1793,7 +1807,11 @@ export declare enum VideoCodecType {
|
|
|
1793
1807
|
/**
|
|
1794
1808
|
* @brief VP8
|
|
1795
1809
|
*/
|
|
1796
|
-
VP8 = "vp8"
|
|
1810
|
+
VP8 = "vp8",
|
|
1811
|
+
/**
|
|
1812
|
+
* @hidden
|
|
1813
|
+
*/
|
|
1814
|
+
ByteVC1 = "ByteVC1"
|
|
1797
1815
|
}
|
|
1798
1816
|
|
|
1799
1817
|
/**
|
|
@@ -1836,7 +1854,7 @@ export declare enum VideoSimulcastMode {
|
|
|
1836
1854
|
VIDEO_ON_DEMAND = 1,
|
|
1837
1855
|
|
|
1838
1856
|
/**
|
|
1839
|
-
* @brief
|
|
1857
|
+
* @brief Simulcast. The publisher will publish streams in the qualities of the settings. The default is to publish 2 streams.
|
|
1840
1858
|
*/
|
|
1841
1859
|
VIDEO_ALWAYS_SIMULCAST = 2
|
|
1842
1860
|
}
|
|
@@ -1857,6 +1875,343 @@ export declare enum VideoSourceType {
|
|
|
1857
1875
|
VIDEO_SOURCE_TYPE_INTERNAL = 1
|
|
1858
1876
|
}
|
|
1859
1877
|
|
|
1878
|
+
/**
|
|
1879
|
+
* @brief Events related to playing WTN streams.
|
|
1880
|
+
*/
|
|
1881
|
+
export declare enum WTNPlayState {
|
|
1882
|
+
|
|
1883
|
+
/**
|
|
1884
|
+
* @brief Initial. Status changes from INIT to START after calling startPlayWtn.
|
|
1885
|
+
*/
|
|
1886
|
+
INIT = 0,
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* @brief Start.
|
|
1890
|
+
*/
|
|
1891
|
+
START = 1,
|
|
1892
|
+
|
|
1893
|
+
/**
|
|
1894
|
+
* @brief Success.
|
|
1895
|
+
*/
|
|
1896
|
+
SUCCESS = 2,
|
|
1897
|
+
|
|
1898
|
+
/**
|
|
1899
|
+
* @brief Stop.
|
|
1900
|
+
*/
|
|
1901
|
+
STOP = 3,
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* @brief Failed.
|
|
1905
|
+
*/
|
|
1906
|
+
FAIL = 4
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* @brief The reason why the play state of the WTN streams changes.
|
|
1911
|
+
*/
|
|
1912
|
+
export declare enum WTNPlayStateChangedReason {
|
|
1913
|
+
|
|
1914
|
+
/**
|
|
1915
|
+
* @brief Success.
|
|
1916
|
+
*/
|
|
1917
|
+
PLAY_SUCCESS = 0,
|
|
1918
|
+
|
|
1919
|
+
/**
|
|
1920
|
+
* @brief By calling startPlayWtn.
|
|
1921
|
+
*/
|
|
1922
|
+
START_PLAY = 1,
|
|
1923
|
+
|
|
1924
|
+
/**
|
|
1925
|
+
* @brief By calling stopPlayWtn.
|
|
1926
|
+
*/
|
|
1927
|
+
STOP_PLAY = 2,
|
|
1928
|
+
|
|
1929
|
+
/**
|
|
1930
|
+
* @brief The publisher stops publishing the wtn stream.
|
|
1931
|
+
*/
|
|
1932
|
+
REMOTE_STOP = 3,
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
* @brief The publishing was stopped accidentally.
|
|
1936
|
+
*/
|
|
1937
|
+
REMOTE_FAILURE = 4,
|
|
1938
|
+
|
|
1939
|
+
/**
|
|
1940
|
+
* @brief The stream has been forbidden.
|
|
1941
|
+
*/
|
|
1942
|
+
STREAM_BANNED = 5,
|
|
1943
|
+
|
|
1944
|
+
/**
|
|
1945
|
+
* @brief Your token has no subscribing permission.
|
|
1946
|
+
*/
|
|
1947
|
+
NO_PLAY_PERMISSION = 6,
|
|
1948
|
+
|
|
1949
|
+
/**
|
|
1950
|
+
* @brief The stream does not exist.
|
|
1951
|
+
*/
|
|
1952
|
+
STREAM_NOT_EXIST = 7,
|
|
1953
|
+
|
|
1954
|
+
/**
|
|
1955
|
+
* @brief Retry.
|
|
1956
|
+
*/
|
|
1957
|
+
IN_RETRY = 8,
|
|
1958
|
+
|
|
1959
|
+
/**
|
|
1960
|
+
* @brief Retry failed for three times.
|
|
1961
|
+
*/
|
|
1962
|
+
RETRY_FAIL = 9,
|
|
1963
|
+
|
|
1964
|
+
/**
|
|
1965
|
+
* @brief Internal error.
|
|
1966
|
+
*/
|
|
1967
|
+
INTERNAL = 10,
|
|
1968
|
+
|
|
1969
|
+
/**
|
|
1970
|
+
* @brief A single engine instance can only subscribe to up to 5 streams.
|
|
1971
|
+
*/
|
|
1972
|
+
OVER_CLIENT_SUBSCRIBE_STREAM_LIMIT = 1310,
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* @brief The number of users who are subscribed to the same stream has exceeded the limit.
|
|
1976
|
+
*/
|
|
1977
|
+
OVER_STREAM_SUBSCRIBE_USER_LIMIT = 1311,
|
|
1978
|
+
|
|
1979
|
+
/**
|
|
1980
|
+
* @brief The number of requests for subscribing to the same stream has exceeded the limit.
|
|
1981
|
+
*/
|
|
1982
|
+
OVER_STREAM_SUBSCRIBE_REQUES_TLIMIT = 1312
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
/**
|
|
1986
|
+
* @brief Status of the WTN streams task.
|
|
1987
|
+
*/
|
|
1988
|
+
export declare enum WTNPushState {
|
|
1989
|
+
|
|
1990
|
+
/**
|
|
1991
|
+
* @brief Initial. Status changes from INIT to START after calling startPushWtn.
|
|
1992
|
+
*/
|
|
1993
|
+
INIT = 0,
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* @brief Start.
|
|
1997
|
+
*/
|
|
1998
|
+
START = 1,
|
|
1999
|
+
|
|
2000
|
+
/**
|
|
2001
|
+
* @brief Success.
|
|
2002
|
+
*/
|
|
2003
|
+
SUCCESS = 2,
|
|
2004
|
+
|
|
2005
|
+
/**
|
|
2006
|
+
* @brief Stop.
|
|
2007
|
+
*/
|
|
2008
|
+
STOP = 3,
|
|
2009
|
+
|
|
2010
|
+
/**
|
|
2011
|
+
* @brief Failed.
|
|
2012
|
+
*/
|
|
2013
|
+
FAIL = 4
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
/**
|
|
2017
|
+
* @brief The reason why the status of the WTN streams task changes.
|
|
2018
|
+
*/
|
|
2019
|
+
export declare enum WTNPushStateChangedReason {
|
|
2020
|
+
|
|
2021
|
+
/**
|
|
2022
|
+
* @brief Success.
|
|
2023
|
+
*/
|
|
2024
|
+
PUSH_SUCCESS = 0,
|
|
2025
|
+
|
|
2026
|
+
/**
|
|
2027
|
+
* @brief By calling [startPushWTN](docs-104478#wtnstream-startpushwtn).
|
|
2028
|
+
*/
|
|
2029
|
+
START_PUSH = 1,
|
|
2030
|
+
|
|
2031
|
+
/**
|
|
2032
|
+
* @brief By calling [stopPushWTN](docs-104478#wtnstream-stoppushwtn).
|
|
2033
|
+
*/
|
|
2034
|
+
STOP_PUSH = 2,
|
|
2035
|
+
|
|
2036
|
+
/**
|
|
2037
|
+
* @brief Retry.
|
|
2038
|
+
*/
|
|
2039
|
+
IN_RETRY = 3,
|
|
2040
|
+
|
|
2041
|
+
/**
|
|
2042
|
+
* @brief Retry failed for three times.
|
|
2043
|
+
*/
|
|
2044
|
+
RETRY_FAIL = 4,
|
|
2045
|
+
|
|
2046
|
+
/**
|
|
2047
|
+
* @brief Your token has no publishing permission.
|
|
2048
|
+
*/
|
|
2049
|
+
NO_PUSH_PERMISSION = 5,
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* @brief Your stream_id has been occupied by another stream.
|
|
2053
|
+
*/
|
|
2054
|
+
STREAM_PUSH_BY_OTHER = 6
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* @brief Audio state of the remote WTN stream
|
|
2059
|
+
*/
|
|
2060
|
+
export declare enum WTNRemoteAudioState {
|
|
2061
|
+
|
|
2062
|
+
/**
|
|
2063
|
+
* @brief The init state of the remote WTN video. This state is reported in ReasonMute and ReasonRemotestop.
|
|
2064
|
+
*/
|
|
2065
|
+
STOPED = 0,
|
|
2066
|
+
|
|
2067
|
+
/**
|
|
2068
|
+
* @brief The local client has received the first audio package of the wtn stream.
|
|
2069
|
+
*/
|
|
2070
|
+
STARTING = 1,
|
|
2071
|
+
|
|
2072
|
+
/**
|
|
2073
|
+
* @brief The WTN stream is playing.
|
|
2074
|
+
*/
|
|
2075
|
+
DECODING = 2,
|
|
2076
|
+
|
|
2077
|
+
/**
|
|
2078
|
+
* @brief The WTN stream suffers from stutter.
|
|
2079
|
+
*/
|
|
2080
|
+
FROZEN = 3,
|
|
2081
|
+
|
|
2082
|
+
/**
|
|
2083
|
+
* @brief The WTN stream failed to play.
|
|
2084
|
+
*/
|
|
2085
|
+
FAILED = 4
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* @brief The reason why the status of the remote WTN audio changes.
|
|
2090
|
+
*/
|
|
2091
|
+
export declare enum WTNRemoteAudioStateChangeReason {
|
|
2092
|
+
|
|
2093
|
+
/**
|
|
2094
|
+
* @brief Internal error.
|
|
2095
|
+
*/
|
|
2096
|
+
INTERNAL = 0,
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* @brief Network congestion.
|
|
2100
|
+
*/
|
|
2101
|
+
NETWORK_CONGESTION = 1,
|
|
2102
|
+
|
|
2103
|
+
/**
|
|
2104
|
+
* @brief Network recovery.
|
|
2105
|
+
*/
|
|
2106
|
+
NETWORK_RECOVERY = 2,
|
|
2107
|
+
|
|
2108
|
+
/**
|
|
2109
|
+
* @brief The local client subscribed to the remote stream.
|
|
2110
|
+
*/
|
|
2111
|
+
UNMUTE = 3,
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* @brief The local client unsubscribed from the remote stream.
|
|
2115
|
+
*/
|
|
2116
|
+
MUTE = 4,
|
|
2117
|
+
|
|
2118
|
+
/**
|
|
2119
|
+
* @brief The remote stream started publishing.
|
|
2120
|
+
*/
|
|
2121
|
+
REMOTE_START = 5,
|
|
2122
|
+
|
|
2123
|
+
/**
|
|
2124
|
+
* @brief The remote stream stopped publishing.
|
|
2125
|
+
*/
|
|
2126
|
+
REMOTE_STOP = 6
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
/**
|
|
2130
|
+
* @brief Video state of the remote WTN stream.
|
|
2131
|
+
*/
|
|
2132
|
+
export declare enum WTNRemoteVideoState {
|
|
2133
|
+
|
|
2134
|
+
/**
|
|
2135
|
+
* @brief The init state of the remote WTN video. This state is reported in ReasonMute and ReasonRemotestop.
|
|
2136
|
+
*/
|
|
2137
|
+
STOPED = 0,
|
|
2138
|
+
|
|
2139
|
+
/**
|
|
2140
|
+
* @brief The local client has received the first video frame of the wtn stream.
|
|
2141
|
+
*/
|
|
2142
|
+
STARTING = 1,
|
|
2143
|
+
|
|
2144
|
+
/**
|
|
2145
|
+
* @brief The WTN stream is playing.
|
|
2146
|
+
*/
|
|
2147
|
+
DECODING = 2,
|
|
2148
|
+
|
|
2149
|
+
/**
|
|
2150
|
+
* @brief The WTN stream suffers from stutter.
|
|
2151
|
+
*/
|
|
2152
|
+
FROZEN = 3,
|
|
2153
|
+
|
|
2154
|
+
/**
|
|
2155
|
+
* @brief The WTN stream failed to play.
|
|
2156
|
+
*/
|
|
2157
|
+
FAILED = 4
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
/**
|
|
2161
|
+
* @brief The reason why the status of the remote WTN audio changes.
|
|
2162
|
+
*/
|
|
2163
|
+
export declare enum WTNRemoteVideoStateChangeReason {
|
|
2164
|
+
|
|
2165
|
+
/**
|
|
2166
|
+
* @brief Internal error.
|
|
2167
|
+
*/
|
|
2168
|
+
INTERNAL = 0,
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* @brief Network congestion.
|
|
2172
|
+
*/
|
|
2173
|
+
NETWORK_CONGESTION = 1,
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* @brief Network recovery.
|
|
2177
|
+
*/
|
|
2178
|
+
NETWORK_RECOVERY = 2,
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
* @brief The local client subscribed to the remote stream.
|
|
2182
|
+
*/
|
|
2183
|
+
UNMUTE = 3,
|
|
2184
|
+
|
|
2185
|
+
/**
|
|
2186
|
+
* @brief The local client unsubscribed from the remote stream.
|
|
2187
|
+
*/
|
|
2188
|
+
MUTE = 4,
|
|
2189
|
+
|
|
2190
|
+
/**
|
|
2191
|
+
* @brief The remote stream started publishing.
|
|
2192
|
+
*/
|
|
2193
|
+
REMOTE_START = 5,
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* @brief The remote stream stopped publishing.
|
|
2197
|
+
*/
|
|
2198
|
+
REMOTE_STOP = 6
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* @brief Events related to the WTN streams task.
|
|
2203
|
+
*/
|
|
2204
|
+
export declare enum WTNStreamEventsTypes {
|
|
2205
|
+
onWTNPushStateChanged = "onWTNPushStateChanged",
|
|
2206
|
+
onWTNPlayStateChanged = "onWTNPlayStateChanged",
|
|
2207
|
+
onWTNRemoteAudioStateChanged = "onWTNRemoteAudioStateChanged",
|
|
2208
|
+
onWTNRemoteVideoStateChanged = "onWTNRemoteVideoStateChanged",
|
|
2209
|
+
onWTNRemoteVideoStats = "onWTNRemoteVideoStats",
|
|
2210
|
+
onWTNRemoteAudioStats = "onWTNRemoteAudioStats",
|
|
2211
|
+
onWTNFirstRemoteVideoFrameDecoded = "onWTNFirstRemoteVideoFrameDecoded",
|
|
2212
|
+
onWTNSEIMessageReceived = "onWTNSEIMessageReceived"
|
|
2213
|
+
}
|
|
2214
|
+
|
|
1860
2215
|
/**
|
|
1861
2216
|
* @brief The object to be shared during screen-sharing in Electron.
|
|
1862
2217
|
*/
|
|
@@ -2087,7 +2442,7 @@ export interface CloudProxyInfo {
|
|
|
2087
2442
|
/**
|
|
2088
2443
|
* @brief The cloud proxy IP of the access
|
|
2089
2444
|
*/
|
|
2090
|
-
accessProxy: string;
|
|
2445
|
+
accessProxy: string | string[];
|
|
2091
2446
|
|
|
2092
2447
|
/**
|
|
2093
2448
|
* @brief The cloud proxy IP of RTC admin control
|
|
@@ -2333,7 +2688,7 @@ export interface IAudioMixingManager {
|
|
|
2333
2688
|
|
|
2334
2689
|
/**
|
|
2335
2690
|
* @brief Toggle the callbacks carrying the mixing audio frames.
|
|
2336
|
-
* @param
|
|
2691
|
+
* @param id Audio from microphone or device audio.
|
|
2337
2692
|
* You will get the callback carrying the audio data as soon as the audio mixing starts.
|
|
2338
2693
|
* @param callback The callback function to receive the audio frames. An empty value indicates disabling the callback.
|
|
2339
2694
|
* When the user disconnects, the audio data is empty.
|
|
@@ -2441,6 +2796,7 @@ export interface IEngineEvents {
|
|
|
2441
2796
|
|
|
2442
2797
|
/**
|
|
2443
2798
|
* @brief Callback on new media streams captured by camera/microphone in the room.
|
|
2799
|
+
* @param event
|
|
2444
2800
|
* @notes You will receive this callback after a remote user successfully publishes media streams captured by camera/microphone in the room with [publishStream](docs-104478#publishstream). Then you can choose whether to call [subscribeStream](docs-104478#subscribestream) to subscribe to the streams or not.
|
|
2445
2801
|
* @group Audio & Video Transport
|
|
2446
2802
|
* @order 60
|
|
@@ -2460,6 +2816,7 @@ export interface IEngineEvents {
|
|
|
2460
2816
|
|
|
2461
2817
|
/**
|
|
2462
2818
|
* @brief Callback on removal of remote media stream captured by camera/microphone.
|
|
2819
|
+
* @param event
|
|
2463
2820
|
* @notes You will receive this callback after a remote user successfully unpublishes media streams captured by camera/microphone in the room with [unpublishStream](docs-104478#unpublishstream). Then you can choose whether to call [unsubscribeStream](docs-104478#unsubscribestream) to unsubscribe from the streams or not.
|
|
2464
2821
|
* @group Audio & Video Transport
|
|
2465
2822
|
* @order 61
|
|
@@ -2484,6 +2841,7 @@ export interface IEngineEvents {
|
|
|
2484
2841
|
|
|
2485
2842
|
/**
|
|
2486
2843
|
* @brief Callback on new screen sharing media streams from remote users in the room.
|
|
2844
|
+
* @param event
|
|
2487
2845
|
* @notes You will receive this callback after a remote user successfully published screen sharing streams in the room with [publishScreen](docs-104478#publishscreen). Then you can choose whether to call [subscribeScreen](docs-104478#subscribescreen) to subscribe to the streams or not.
|
|
2488
2846
|
* @group Screen Sharing
|
|
2489
2847
|
* @order 30
|
|
@@ -2503,6 +2861,7 @@ export interface IEngineEvents {
|
|
|
2503
2861
|
|
|
2504
2862
|
/**
|
|
2505
2863
|
* @brief Callback on removal of screen sharing media streams from remote users in the room.
|
|
2864
|
+
* @param event
|
|
2506
2865
|
* @notes You will receive this callback after a remote user successfully unpublishes media streams captured by camera/microphone in the room with [unpublishScreen](docs-104478#unpublishscreen). Then you can choose whether to call [unsubscribeScreen](docs-104478#unsubscribescreen) to unsubscribe from the streams or not.
|
|
2507
2866
|
* @group Screen Sharing
|
|
2508
2867
|
* @order 31
|
|
@@ -2705,7 +3064,7 @@ export interface IEngineEvents {
|
|
|
2705
3064
|
/**
|
|
2706
3065
|
* @brief This 2 s periodical callback notifies information of the public stream after calling [startPlayPublicStream](docs-104478#startplaypublicstream).
|
|
2707
3066
|
* @param stats
|
|
2708
|
-
* @group
|
|
3067
|
+
* @group WTN stream
|
|
2709
3068
|
* @order 20
|
|
2710
3069
|
*/
|
|
2711
3070
|
[EngineEventsTypes.onPublicStreamStats]: (stats: PublicStreamStats) => void;
|
|
@@ -2745,7 +3104,7 @@ export interface IEngineEvents {
|
|
|
2745
3104
|
|
|
2746
3105
|
/**
|
|
2747
3106
|
* @brief After calling [enableAudioPropertiesReport](docs-104478#enableaudiopropertiesreport), you will periodically receive this callback for the information of the user with the highest voice volume.
|
|
2748
|
-
* @param
|
|
3107
|
+
* @param userInfo The information of the user with the highest voice volume.
|
|
2749
3108
|
* @group Audio Management
|
|
2750
3109
|
* @order 60
|
|
2751
3110
|
*/
|
|
@@ -2956,6 +3315,7 @@ export interface IEngineEvents {
|
|
|
2956
3315
|
|
|
2957
3316
|
/**
|
|
2958
3317
|
* @brief This callback is triggered when the token publishing permission expires. Call [updateToken](docs-104478#updatetoken) to update the Token.
|
|
3318
|
+
* @param e
|
|
2959
3319
|
* @group Room Management
|
|
2960
3320
|
* @order 51
|
|
2961
3321
|
*/
|
|
@@ -2984,6 +3344,7 @@ export interface IEngineEvents {
|
|
|
2984
3344
|
|
|
2985
3345
|
/**
|
|
2986
3346
|
* @brief This callback is triggered when the token subscription permission expires. Call [updateToken](docs-104478#updatetoken) to update the Token.
|
|
3347
|
+
* @param e
|
|
2987
3348
|
* @group Room Management
|
|
2988
3349
|
* @order 56
|
|
2989
3350
|
*/
|
|
@@ -3003,6 +3364,8 @@ export interface IEngineEvents {
|
|
|
3003
3364
|
/**
|
|
3004
3365
|
* @brief Receives the callback when you call [startCloudProxy](docs-104478#startcloudproxy) to start cloud proxy, and the SDK connects the proxy server successfully.
|
|
3005
3366
|
* @param event
|
|
3367
|
+
* @group Security and Encryption
|
|
3368
|
+
* @order 3
|
|
3006
3369
|
*/
|
|
3007
3370
|
[EngineEventsTypes.onCloudProxyConnected]: (event: CloudProxyConnectedEvent) => void;
|
|
3008
3371
|
|
|
@@ -3010,47 +3373,43 @@ export interface IEngineEvents {
|
|
|
3010
3373
|
* @brief Callback of the result of publishing the public stream.
|
|
3011
3374
|
* After calling [startPushPublicStream](docs-104478#startpushpublicstream), you will be informed of the result through this callback.
|
|
3012
3375
|
* @param event
|
|
3013
|
-
* @group
|
|
3376
|
+
* @group WTN stream
|
|
3014
3377
|
* @order 25
|
|
3015
3378
|
*/
|
|
3016
3379
|
[EngineEventsTypes.onPushPublicStreamResult]: (event: PublicStreamResultEvent) => void;
|
|
3017
3380
|
|
|
3018
3381
|
/**
|
|
3382
|
+
* @deprecated since 4.65, use [onWTNSEIMessageReceived](docs-104479#wtnstreamevents-onwtnseimessagereceived) instead.
|
|
3019
3383
|
* @brief Callback of the SEI carried by the public video stream.
|
|
3020
3384
|
* You will receive SEI by this callback if the public stream you subscribed to by calling [startPlayPublicStream](docs-104478#startplaypublicstream) is carrying SEI.
|
|
3021
3385
|
* @param event
|
|
3022
3386
|
* @notes When multiple streams in the public stream contain SEI:
|
|
3023
3387
|
* + You will receive SEI from all the video frames if the SEI do not have conflicts.
|
|
3024
3388
|
* + However, if SEI from video frames have conflicts, you will receive only one of them.
|
|
3025
|
-
* @group Public Stream
|
|
3026
|
-
* @order 30
|
|
3027
3389
|
*/
|
|
3028
3390
|
[EngineEventsTypes.onPublicStreamSEIMessageReceived]: (event: PublicStreamSEIMessageEvent) => void;
|
|
3029
3391
|
|
|
3030
3392
|
/**
|
|
3393
|
+
* @deprecated since 4.65, use [onWTNFirstRemoteVideoFrameDecoded](docs-104479#wtnstreamevents-onwtnfirstremotevideoframedecoded) instead.
|
|
3031
3394
|
* @brief Callback of the successful decoding of the first video frame of the public stream.
|
|
3032
3395
|
* Refer to [startPlayPublicStream](docs-104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
3033
3396
|
* @param event
|
|
3034
|
-
* @group Public Stream
|
|
3035
|
-
* @order 36
|
|
3036
3397
|
*/
|
|
3037
3398
|
[EngineEventsTypes.onFirstPublicStreamVideoFrameDecoded]: (event: PublicStreamVideoFirstFrameDecodedEvent) => void;
|
|
3038
3399
|
|
|
3039
3400
|
/**
|
|
3401
|
+
* @deprecated since 4.65.
|
|
3040
3402
|
* @brief Callback of the successful decoding of the first audio frame of the public stream.
|
|
3041
3403
|
* Refer to [startPlayPublicStream](docs-104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
3042
3404
|
* @param event
|
|
3043
|
-
* @group Public Stream
|
|
3044
|
-
* @order 35
|
|
3045
3405
|
*/
|
|
3046
3406
|
[EngineEventsTypes.onFirstPublicStreamAudioFrameDecoded]: (event: PublicStreamAudioFirstFrameDecodedEvent) => void;
|
|
3047
3407
|
|
|
3048
3408
|
/**
|
|
3409
|
+
* @deprecated since 4.65, use [onWTNRemoteVideoStateChanged](docs-104479#wtnstreamevents-onwtnremotevideostatechanged) instead.
|
|
3049
3410
|
* @brief Callback of the successful rendering of the first video frame of the public stream.
|
|
3050
3411
|
* Refer to [startPlayPublicStream](docs-104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
3051
3412
|
* @param event
|
|
3052
|
-
* @group Public Stream
|
|
3053
|
-
* @order 37
|
|
3054
3413
|
*/
|
|
3055
3414
|
[EngineEventsTypes.onFirstPublicStreamVideoFrameRendered]: (event: PublicStreamAudioFirstFrameDecodedEvent) => void;
|
|
3056
3415
|
|
|
@@ -3082,6 +3441,8 @@ export interface IEngineEvents {
|
|
|
3082
3441
|
|
|
3083
3442
|
/**
|
|
3084
3443
|
* @brief When the resolution of remote video changes, users who subscribed to the stream will receive this callback.
|
|
3444
|
+
* @param key Information of the remote stream
|
|
3445
|
+
* @param info Information of video frame
|
|
3085
3446
|
* @group Audio & Video Transport
|
|
3086
3447
|
* @order 90
|
|
3087
3448
|
*/
|
|
@@ -3144,6 +3505,7 @@ export interface IEngineEvents {
|
|
|
3144
3505
|
|
|
3145
3506
|
/**
|
|
3146
3507
|
* @brief The callback of the actual video capturing configuration.
|
|
3508
|
+
* @param e The actual video capturing configuration.
|
|
3147
3509
|
* @group Video Management
|
|
3148
3510
|
* @order 60
|
|
3149
3511
|
*/
|
|
@@ -3641,7 +4003,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3641
4003
|
/**
|
|
3642
4004
|
* @brief Play audio and video stream manually.
|
|
3643
4005
|
* Call this API when user need to take part in the audio and video reaction after calling [createEngine](docs-104478#createengine) and set to autoPlay to False.
|
|
3644
|
-
* @param userId The user ID or the
|
|
4006
|
+
* @param userId The user ID or the WTN stream ID. The empty value indicates the local stream. When you specify a WTN stream ID, the `mediaType` or `streamIndex` will not take effect.
|
|
3645
4007
|
* @param mediaType For audio or video. It defaults to `AUDIO_AND_VIDEO`. The local audio is not included. While the Audio selection is enabled, it can only be set to `VIDEO`.
|
|
3646
4008
|
* @param streamIndex Main stream or screen-sharing stream. By default, the action will apply to both the main stream and the screen-sharing stream.
|
|
3647
4009
|
* @param playerId Player ID. An empty value indicates the default player.
|
|
@@ -3655,7 +4017,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3655
4017
|
play: (userId?: string, mediaType?: MediaType, streamIndex?: StreamIndex, playerId?: string) => Promise<void>;
|
|
3656
4018
|
/**
|
|
3657
4019
|
* @brief Pause the specified media stream.
|
|
3658
|
-
* @param userId The user ID or the
|
|
4020
|
+
* @param userId The user ID or the WTN stream ID. The empty value indicates the local stream. When you specify a WTN stream ID, the `mediaType` or `streamIndex` will not take effect.
|
|
3659
4021
|
* @param mediaType For audio or video. It defaults to `AUDIO_AND_VIDEO`. The local audio is not included. While the Audio selection is enabled, it can only be set to `VIDEO`.
|
|
3660
4022
|
* @param streamIndex Main stream or screen-sharing stream. By default, the action will apply to both the main stream and the screen-sharing stream.
|
|
3661
4023
|
* @param playerId Player ID. An empty value indicates the default player.
|
|
@@ -3809,9 +4171,9 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3809
4171
|
sendSEIMessage: (streamIndex: StreamIndex, message: Uint8Array | string, repeatCount: number) => void;
|
|
3810
4172
|
|
|
3811
4173
|
/**
|
|
3812
|
-
* @brief
|
|
4174
|
+
* @brief Configures the encoding settings for the camera videos on the publisher side.
|
|
3813
4175
|
* @param descriptions The configurations of the video streams to be published.
|
|
3814
|
-
* @notes +
|
|
4176
|
+
* @notes + To publish Simulcast streams, enable and configure the Simulcast streams through [setLocalSimulcastMode](#rtcengine-setlocalsimulcastmode). When Simulcasting is enabled, calling this method configures the high-quality stream.
|
|
3815
4177
|
* + Before calling this method, the SDK defaults to publishing a stream with a resolution of 640 × 480 pixels, a frame rate of 15 FPS, and a maximum encoding bitrate of 600 Kbps.
|
|
3816
4178
|
* + You can call this method before or after publishing the video stream.
|
|
3817
4179
|
* + When using a mobile device to publish a video stream in portrait mode, the set resolution width and height are reversed in the actual streaming parameters. For example, when setting the sending resolution to 640 × 480 pixels, the actual streaming parameters are 480 × 640 pixels.
|
|
@@ -3849,13 +4211,13 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3849
4211
|
/**
|
|
3850
4212
|
* @brief Sets your expected quality level of the remote video stream that you want to subscribe to or have subscribed to.
|
|
3851
4213
|
* @param userId ID of the remote video stream publisher you expect to configure subscription parameters for.
|
|
3852
|
-
*
|
|
4214
|
+
* When the specified Simulcast stream is not published, the SDK will automatically subscribe to the next lower quality stream.
|
|
3853
4215
|
* @param streamType The preference for the quality of the subscribed stream.
|
|
3854
4216
|
* @return Refer to [MIXING_OLD_AND_NEW_APIS](docs-104480#errorcode) for the details of the error code.
|
|
3855
4217
|
* @notes + This API only works after the publisher calls [setLocalSimulcastMode](#setLocalSimulcastMode) to enable publishing multiple video streams, in which case the subscriber will receive a stream that is closest to the set configuration.
|
|
3856
4218
|
* + If you don't call this API after the publisher enables the function of publishing multiple streams, you will receive the highest-quality video stream by default.
|
|
3857
4219
|
* + You can call this method before or after joining a room.
|
|
3858
|
-
*
|
|
4220
|
+
* + Refer to [Simulcasting](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-1359024) for more information.
|
|
3859
4221
|
* @group Audio & Video Transport
|
|
3860
4222
|
* @order 25
|
|
3861
4223
|
*/
|
|
@@ -3877,7 +4239,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3877
4239
|
|
|
3878
4240
|
/**
|
|
3879
4241
|
* @valid since V4.63
|
|
3880
|
-
* @brief
|
|
4242
|
+
* @brief Enables the Simulcast feature and configures the lower-quality camera videos for the stream publisher.
|
|
3881
4243
|
* @param mode Whether to publish lower-quality streams and how many of them to be published. By default, it is set to Single, where the publisher sends the video in a single profile.
|
|
3882
4244
|
* This parameter must be set before joining a room.
|
|
3883
4245
|
* @param streamConfig The specification of the lower quality stream(s).
|
|
@@ -3888,9 +4250,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3888
4250
|
* - For the stream below 180P in resolution, publishing is limited to a single stream only.
|
|
3889
4251
|
* - For the stream falls between 180P and 540P in resolution, you can publish an additional lower-quality stream.
|
|
3890
4252
|
* @return Refer to [SET_SIMULCAST_FAILED](docs-104480#errorcode) and [MIXING_OLD_AND_NEW_APIS](docs-104480#errorcode) for the details of the error code.
|
|
3891
|
-
* @note - The
|
|
3892
|
-
*
|
|
3893
|
-
* - Refer to [Simulcasting](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-70139) for more information.
|
|
4253
|
+
* @note - The method applies to the camera video only.
|
|
4254
|
+
* - Refer to [Simulcasting](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-1359024) for more information.
|
|
3894
4255
|
* @group Audio & Video Transport
|
|
3895
4256
|
* @order 20
|
|
3896
4257
|
*/
|
|
@@ -3925,7 +4286,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3925
4286
|
* @param transcode Configurations to be set when pushing media streams to CDN.
|
|
3926
4287
|
* @return
|
|
3927
4288
|
* @notes + After calling this API, you will receive the pushing a mixed stream to CDN events via [onStreamMixingEvent](docs-104479#onstreammixingevent).
|
|
3928
|
-
* + If you have subscribed to the push-to-CDN server callback in the [console](https://console.byteplus.com/rtc/cloudRTC?tab=callback), calling this API will receive a [TranscodeStarted](https://docs.byteplus.com/en/byteplus-rtc/docs
|
|
4289
|
+
* + If you have subscribed to the push-to-CDN server callback in the [console](https://console.byteplus.com/rtc/cloudRTC?tab=callback), calling this API will receive a [TranscodeStarted](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-75125#transcodestarted) server callback notification. When calling this API repeatedly, subsequent calls to this API will trigger both [TranscodeStarted](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-75125#transcodestarted) and [TranscodeUpdated](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-75125#transcodeupdated) callbacks.
|
|
3929
4290
|
* + Call [stopLiveTranscoding](#stoplivetranscoding) to stop pushing mixed streams to CDN.
|
|
3930
4291
|
* @group Push to CDN
|
|
3931
4292
|
* @order 5
|
|
@@ -4032,6 +4393,14 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4032
4393
|
*/
|
|
4033
4394
|
getAudioMixingManager: () => IAudioMixingManager;
|
|
4034
4395
|
|
|
4396
|
+
/**
|
|
4397
|
+
* @brief Creates a WTN stream manager object
|
|
4398
|
+
* @return WTN stream manager object
|
|
4399
|
+
* @group WTN stream
|
|
4400
|
+
* @order 0
|
|
4401
|
+
*/
|
|
4402
|
+
getWTNStreamManager: () => IWTNStream;
|
|
4403
|
+
|
|
4035
4404
|
/**
|
|
4036
4405
|
* @brief Configure the internal audio capture. Different browser has its own default settings.
|
|
4037
4406
|
* @param config Configuration of the internal audio capture such as, disabling audio 3A processing. Refer to [MediaTrackConstraints](https://developer.mozilla.org/zh-CN/docs/Web/API/MediaTrackConstraints) for more details.
|
|
@@ -4186,57 +4555,60 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4186
4555
|
* + Start pre-call network detection after starting cloud proxy.
|
|
4187
4556
|
* + After starting cloud proxy and connects the cloud proxy server successfully, receives [onCloudProxyConnected](docs-104479#oncloudproxyconnected).
|
|
4188
4557
|
* + To stop cloud proxy, call [stopCloudProxy](#stopcloudproxy).
|
|
4558
|
+
* @group Security and Encryption
|
|
4559
|
+
* @order 1
|
|
4189
4560
|
*/
|
|
4190
4561
|
startCloudProxy: (cloudProxyInfo: CloudProxyInfo) => void;
|
|
4191
4562
|
|
|
4192
4563
|
/**
|
|
4193
4564
|
* @brief Stop cloud proxy
|
|
4194
4565
|
* @notes To start cloud proxy, call [startCloudProxy](#startcloudproxy).
|
|
4566
|
+
* @group Security and Encryption
|
|
4567
|
+
* @order 2
|
|
4195
4568
|
*/
|
|
4196
4569
|
stopCloudProxy: () => void;
|
|
4197
4570
|
|
|
4198
4571
|
/**
|
|
4199
|
-
* @brief Starts publishing a public media stream.
|
|
4200
|
-
* @param publicStreamId The
|
|
4201
|
-
* @param publicStreamParam The
|
|
4202
|
-
* A
|
|
4203
|
-
* If the designated media stream is not published yet, the
|
|
4204
|
-
* @return `REPEAT_PUSH`: Publish a
|
|
4205
|
-
* @notes + Users with the same `appID` can call [
|
|
4206
|
-
* + You cannot update the parameters of the
|
|
4572
|
+
* @brief Starts publishing a public media stream after the user joins a room.
|
|
4573
|
+
* @param publicStreamId The WTN stream's ID. The string must conform to the regular expression: `[a-zA-Z0-9_@\-\.]{1,128}`.
|
|
4574
|
+
* @param publicStreamParam The WTN stream's parameters.
|
|
4575
|
+
* A WTN stream can contain several media streams and will appears as the designated layout.
|
|
4576
|
+
* If the designated media stream is not published yet, the WTN stream will automatically update once the media stream is published.
|
|
4577
|
+
* @return `REPEAT_PUSH`: Publish a WTN stream repeatedly.
|
|
4578
|
+
* @notes + Users with the same `appID` can call [startPlayWTN](docs-104478#wtnstream-startplaywtn) to subscribe to and play the WTN stream despite whether he/she has join the room.
|
|
4579
|
+
* + You cannot update the parameters of the WTN stream by repeatedly calling this API with the same stream ID by the same user. Call [updatePublicStreamParam](#updatepublicstreamparam) to update the parameters instead.
|
|
4207
4580
|
* + Users with different `userID` can call this API with the same stream ID to update the parameters.
|
|
4208
|
-
* + Call this API with different stream ID to publish multiple
|
|
4209
|
-
* + Call [stopPushPublicStream](#stoppushpublicstream) to stop publishing the
|
|
4210
|
-
* @group
|
|
4211
|
-
* @order
|
|
4581
|
+
* + Call this API with different stream ID to publish multiple WTN streams.
|
|
4582
|
+
* + Call [stopPushPublicStream](#stoppushpublicstream) to stop publishing the WTN stream.
|
|
4583
|
+
* @group WTN stream
|
|
4584
|
+
* @order 4
|
|
4212
4585
|
*/
|
|
4213
4586
|
startPushPublicStream: (publicStreamId: string, publicStreamParam: PublicStreamConfig) => Promise<void>;
|
|
4214
4587
|
|
|
4215
4588
|
/**
|
|
4216
|
-
* @brief Update the properties of the
|
|
4217
|
-
*
|
|
4218
|
-
*
|
|
4219
|
-
*
|
|
4220
|
-
* @
|
|
4221
|
-
* @
|
|
4222
|
-
* @
|
|
4223
|
-
* @order 1
|
|
4589
|
+
* @brief Update the properties of the WTN stream published by the current user via [startPushPublicStream](104478#rtcengine-startpushpublicstream).
|
|
4590
|
+
* @param publicStreamId The WTN stream's ID.
|
|
4591
|
+
* The WTN stream must be published by the current user.
|
|
4592
|
+
* @param publicStreamParam The WTN stream's parameters.
|
|
4593
|
+
* @return `REPEAT_PLAY`: Subscribe to a WTN stream repeatedly.
|
|
4594
|
+
* @group WTN stream
|
|
4595
|
+
* @order 5
|
|
4224
4596
|
*/
|
|
4225
4597
|
updatePublicStreamParam: (publicStreamId: string, publicStreamParam: Partial<PublicStreamConfig>) => Promise<void>;
|
|
4226
4598
|
|
|
4227
4599
|
/**
|
|
4228
|
-
* @
|
|
4229
|
-
* @
|
|
4230
|
-
*
|
|
4231
|
-
* @param publicStreamId The public stream's ID.
|
|
4232
|
-
* The public stream must be published by the current user.
|
|
4600
|
+
* @brief Stops publishing the WTN stream published by the current user via [startPushPublicStream](104478#rtcengine-startpushpublicstream).
|
|
4601
|
+
* @param publicStreamId The WTN stream's ID.
|
|
4602
|
+
* The WTN stream must be published by the current user.
|
|
4233
4603
|
* @return
|
|
4234
|
-
* @
|
|
4235
|
-
* @
|
|
4604
|
+
* @notes To stop publishing a WTN stream initiated by [startPlayWTN](docs-104478#wtnstream-startplaywtn), call [stopPlayWTN](docs-104478#wtnstream-stopplaywtn).
|
|
4605
|
+
* @group WTN stream
|
|
4606
|
+
* @order 6
|
|
4236
4607
|
*/
|
|
4237
4608
|
stopPushPublicStream: (publicStreamId: string) => Promise<void>;
|
|
4238
4609
|
|
|
4239
4610
|
/**
|
|
4611
|
+
* @deprecated since 4.65, use [startPlayWTN](docs-104478#wtnstream-startplaywtn) instead.
|
|
4240
4612
|
* @brief Subscribes to a designated public stream.
|
|
4241
4613
|
* You can call this API to subscribe to a public stream whether you joined the room or not.
|
|
4242
4614
|
* @param publicStreamId The public stream's ID.
|
|
@@ -4246,27 +4618,23 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4246
4618
|
* + After calling this API, you will receive [onFirstPublicStreamVideoFrameDecoded](docs-104479#onfirstpublicstreamvideoframedecoded) and [onFirstPublicStreamAudioFrameDecoded](docs-104479#onfirstpublicstreamaudioframedecoded) once the first frame has been decoded.
|
|
4247
4619
|
* + If the public stream contains SEI message, you will receive the message by be informed through [onPublicStreamSEIMessageReceived](docs-104479#onpublicstreamseimessagereceived).
|
|
4248
4620
|
* + Call [stopPlayPublicStream](#stopplaypublicstream) to unsubscribing from the public stream.
|
|
4249
|
-
* @group Public Stream
|
|
4250
|
-
* @order 5
|
|
4251
4621
|
*/
|
|
4252
4622
|
startPlayPublicStream: (publicStreamId: string) => Promise<void>;
|
|
4253
4623
|
|
|
4254
4624
|
/**
|
|
4625
|
+
* @deprecated since 4.65, use [stopPlayWTN](docs-104478#wtnstream-stopplaywtn) instead.
|
|
4255
4626
|
* @brief Unsubscribes from a designated public stream.
|
|
4256
4627
|
* Call [startPlayPublicStream](docs-104478#startplaypublicstream) to subscribe to the public stream.
|
|
4257
4628
|
* @param publicStreamId The public stream's ID.
|
|
4258
4629
|
* @return
|
|
4259
|
-
* @group Public Stream
|
|
4260
|
-
* @order 6
|
|
4261
4630
|
*/
|
|
4262
4631
|
stopPlayPublicStream: (publicStreamId: string) => Promise<void>;
|
|
4263
4632
|
|
|
4264
4633
|
/**
|
|
4634
|
+
* @deprecated since 4.65, use [setWTNRemoteVideoPlayer](docs-104478#wtnstream-setwtnremotevideoplayer) instead.
|
|
4265
4635
|
* @brief Sets the player information and rendering mode for the public stream.
|
|
4266
4636
|
* @param publicStreamId The public stream's ID.
|
|
4267
4637
|
* @param videoPlayerOption Player information and rendering mode.
|
|
4268
|
-
* @group Public Stream
|
|
4269
|
-
* @order 10
|
|
4270
4638
|
*/
|
|
4271
4639
|
setPublicStreamVideoPlayer: (publicStreamId: string, videoPlayerOption: Omit<VideoPlayerOption, "userId" | "playerId">) => void;
|
|
4272
4640
|
|
|
@@ -4298,7 +4666,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4298
4666
|
* @param option Fallback options for subscribed media stream
|
|
4299
4667
|
* @return + `true` Success
|
|
4300
4668
|
* + `false` Failure
|
|
4301
|
-
* @notes +
|
|
4669
|
+
* @notes + Prerequisite: The local user has joined a room. And Simulcast has been enabled via [setLocalSimulcastMode](#rtcengine-setlocalsimulcastmode). After joining the room, changing the option will not take effect.
|
|
4302
4670
|
* + After you enable the fallback, you will receive [onSimulcastSubscribeFallback](docs-104479#onsimulcastsubscribefallback) and [onRemoteVideoSizeChanged](docs-104479#onremotevideosizechanged) when the resolution of your subscribed stream is lowered or restored.
|
|
4303
4671
|
* + You can set media stream fallback using API or cloud configuration. The latter takes a higher priority.
|
|
4304
4672
|
* @group Audio & Video Transport
|
|
@@ -4430,12 +4798,12 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4430
4798
|
getRemoteStreamTrack: (userId: string, streamIndex: StreamIndex, type: "video" | "audio") => MediaStreamTrack | undefined;
|
|
4431
4799
|
|
|
4432
4800
|
/**
|
|
4433
|
-
* @brief Get the [MediaStreamTrack](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack) of the audios or videos from the subscribed
|
|
4434
|
-
* @param id ID of the
|
|
4801
|
+
* @brief Get the [MediaStreamTrack](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack) of the audios or videos from the subscribed WTN stream.
|
|
4802
|
+
* @param id ID of the WTN stream
|
|
4435
4803
|
* @param type Video or audio
|
|
4436
|
-
* @return `undefined` for the MediaStreamTrack does not exist. For example, the
|
|
4437
|
-
* @notes + Call this API after you start playing the
|
|
4438
|
-
* + Callback of the MediaStreamTrack will inform you the event of `ended` that the
|
|
4804
|
+
* @return `undefined` for the MediaStreamTrack does not exist. For example, the WTN stream does not exist.
|
|
4805
|
+
* @notes + Call this API after you start playing the WTN stream by calling [startPlayWTN](docs-104478#wtnstream-startplaywtn).
|
|
4806
|
+
* + Callback of the MediaStreamTrack will inform you the event of `ended` that the WTN stream stops, probably caused by the API call of [stopPlayWTN](104478#wtnstream-stopplaywtn).
|
|
4439
4807
|
* @group Custom Stream Processing
|
|
4440
4808
|
* @order 30
|
|
4441
4809
|
*/
|
|
@@ -4456,7 +4824,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4456
4824
|
|
|
4457
4825
|
/**
|
|
4458
4826
|
* @brief Take a snapshot of the remote video.
|
|
4459
|
-
* @param id The index of the user's stream or the index of the
|
|
4827
|
+
* @param id The index of the user's stream or the index of the WTN stream.
|
|
4460
4828
|
* @param streamIndex The specified video stream.
|
|
4461
4829
|
* @param playerId Player ID. An empty value indicates the default player. If the default player does not exist by then, the call will not take effect.
|
|
4462
4830
|
* @return `STREAM_NOT_EXIST`: The target stream does not exist. Please enter the correct ID or make sure that the target stream is in the room.
|
|
@@ -4563,14 +4931,13 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4563
4931
|
setPlaybackVolume: (userId: string, streamIndex: StreamIndex, volume: number) => void;
|
|
4564
4932
|
|
|
4565
4933
|
/**
|
|
4566
|
-
* @
|
|
4567
|
-
* @
|
|
4934
|
+
* @deprecated since 4.65, use [setWTNRemoteAudioPlaybackVolume](docs-104478#wtnstream-setwtnremoteaudioplaybackvolume) instead.
|
|
4935
|
+
* @brief Adjust audio playback volume of a WTN stream.
|
|
4936
|
+
* @param publicStreamId The Id of a specified WTN stream.
|
|
4568
4937
|
* @param volume The percentage of playback volume to the original volume in range of [0, 400]. The default value is 100%.
|
|
4569
4938
|
* For better call quality, it is recommended to set the value in range of [0, 100].
|
|
4570
4939
|
* @notes + It is recommended to set the playback volume after the playing has started.
|
|
4571
4940
|
* + If the playing has not yet started when you call this API, the setting will take effect after it starts.
|
|
4572
|
-
* @group Public Stream
|
|
4573
|
-
* @order 15
|
|
4574
4941
|
*/
|
|
4575
4942
|
setPublicStreamVolume: (publicStreamId: string, volume: number) => void;
|
|
4576
4943
|
|
|
@@ -4774,7 +5141,7 @@ export interface IVERTC {
|
|
|
4774
5141
|
/**
|
|
4775
5142
|
* @brief Call this API to enumerate media devices and their IDs, such as microphones, cameras, and headsets.
|
|
4776
5143
|
* Call this API to get deviceId used to specify the device when calling [setAudioPlaybackDevice](docs-104478#setaudioplaybackdevice), [startVideoCapture](docs-104478#startvideocapture), and [startAudioCapture](docs-104478#startaudiocapture).
|
|
4777
|
-
* @return A list of all media devices.
|
|
5144
|
+
* @return A list of all media devices. See [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo).
|
|
4778
5145
|
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on via [enableDevices](docs-104478#vertc-enabledevices) before calling this API.
|
|
4779
5146
|
* @group Device Management
|
|
4780
5147
|
* @order 0
|
|
@@ -4812,7 +5179,7 @@ export interface IVERTC {
|
|
|
4812
5179
|
/**
|
|
4813
5180
|
* @brief Call this API to enumerate microphone devices.
|
|
4814
5181
|
* Call this API to get Device IDs used to specify the device when calling [startAudioCapture](docs-104478#startaudiocapture) and [setAudioCaptureDevice](docs-104478#setaudiocapturedevice).
|
|
4815
|
-
* @return A list including all microphone devices.
|
|
5182
|
+
* @return A list including all microphone devices. See [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo).
|
|
4816
5183
|
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on [enableDevices](docs-104478#vertc-enabledevices) before calling this API.
|
|
4817
5184
|
* @group Device Management
|
|
4818
5185
|
* @order 10
|
|
@@ -4822,7 +5189,7 @@ export interface IVERTC {
|
|
|
4822
5189
|
/**
|
|
4823
5190
|
* @brief Call this API to enumerate audio and video devices and their IDs, such as microphones, cameras, and headsets.
|
|
4824
5191
|
* Call this API to get Device IDs used to specify the device when calling [startVideoCapture](docs-104478#startvideocapture) and [setVideoCaptureDevice](docs-104478#setvideocapturedevice).
|
|
4825
|
-
* @return A list including all camera devices.
|
|
5192
|
+
* @return A list including all camera devices. See [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo).
|
|
4826
5193
|
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on [enableDevices](docs-104478#vertc-enabledevices) before calling this API.
|
|
4827
5194
|
* @group Device Management
|
|
4828
5195
|
* @order 11
|
|
@@ -4832,7 +5199,7 @@ export interface IVERTC {
|
|
|
4832
5199
|
/**
|
|
4833
5200
|
* @brief Call this API to enumerate audio playback devices and their IDs, such as speakers and headsets.
|
|
4834
5201
|
* Call this API to get Device IDs used to specify the device when calling [setAudioPlaybackDevice](docs-104478#setaudioplaybackdevice).
|
|
4835
|
-
* @return A list including all audio playback devices.
|
|
5202
|
+
* @return A list including all audio playback devices. See [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo).
|
|
4836
5203
|
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on [enableDevices](docs-104478#vertc-enabledevices) before calling this API.
|
|
4837
5204
|
* @group Device Management
|
|
4838
5205
|
* @order 12
|
|
@@ -4902,6 +5269,255 @@ export interface IVERTC {
|
|
|
4902
5269
|
getElectronScreenSources: (type?: ScreenSourceType) => Promise<ElectronDesktopCapturerSource[]>;
|
|
4903
5270
|
}
|
|
4904
5271
|
|
|
5272
|
+
/**
|
|
5273
|
+
* @id WTNstream
|
|
5274
|
+
* @list overview
|
|
5275
|
+
* @detail api
|
|
5276
|
+
*/
|
|
5277
|
+
export interface IWTNStream extends EnhancedEventEmitter<IWTNStreamEvents> {
|
|
5278
|
+
|
|
5279
|
+
/**
|
|
5280
|
+
* @valid since 4.65
|
|
5281
|
+
* @brief Starts publishing a WTN stream without joining a room.
|
|
5282
|
+
* @param token Dynamic key. It is used for authentication and verification of users publishing a WTN stream.
|
|
5283
|
+
* When testing, you can use the console to generate temporary tokens where you can set any value for RoomId. The official launch requires the use of the key SDK to generate and issue tokens at your server level. See [Use Token to complete authentication](docs-70121) for token validity and generation method.
|
|
5284
|
+
* Apps with different AppIDs are not interoperable.
|
|
5285
|
+
* Make sure that the AppID used to generate the Token is the same as the AppID used to create the engine, otherwise it will fail.
|
|
5286
|
+
* @param streamId The WTN stream's ID. The string must conform to the regular expression: `[a-zA-Z0-9_@\-\.]{1,128}`.
|
|
5287
|
+
* @param videoMute Whether to disable video. `true`: Disable video. `false`: Enable video.
|
|
5288
|
+
* @param audioMute Whether to disable audio. `true`: Disable audio. `false`: Enable audio.
|
|
5289
|
+
* @return You will also receive the [onWTNPushStateChanged](docs-104479#wtnstreamevents-onwtnpushstatechanged) callback.
|
|
5290
|
+
* @notes + Users with the same `appID` can call [startPlayWTN](#startplaywtn) to subscribe to and play the WTN stream despite whether he/she has join the room.
|
|
5291
|
+
* + Users with different `userID` can call this API with the same stream ID to update the parameters.
|
|
5292
|
+
* + Call this API with different stream ID to publish multiple WTN streams.
|
|
5293
|
+
* + Call [stopPushWTN](#stopPushWTN) to stop publishing the WTN stream.
|
|
5294
|
+
* @group WTN stream
|
|
5295
|
+
* @order 1
|
|
5296
|
+
*/
|
|
5297
|
+
startPushWTN: (token: string | null, streamId: string, videoMute: boolean, audioMute: boolean) => Promise<void>;
|
|
5298
|
+
|
|
5299
|
+
/**
|
|
5300
|
+
* @valid since 4.65
|
|
5301
|
+
* @brief Stops publishing the WTN stream which was published via [startPushWTN](docs-104478#wtnstream-startpushwtn).
|
|
5302
|
+
* @param streamId The WTN stream's ID.
|
|
5303
|
+
* The WTN stream must be published by the current user.
|
|
5304
|
+
* @return You will also receive the [onWTNPushStateChanged](docs-104479#wtnstreamevents-onwtnpushstatechanged) callback.
|
|
5305
|
+
* @notes To stop publishing a WTN stream initiated by [startPushPublicStream](docs-104478#rtcengine-startpushpublicstream), call [stopPushPublicStream](104478#rtcengine-stoppushpublicstream).
|
|
5306
|
+
* @group WTN stream
|
|
5307
|
+
* @order 2
|
|
5308
|
+
*/
|
|
5309
|
+
stopPushWTN: (streamId: string) => Promise<void>;
|
|
5310
|
+
|
|
5311
|
+
/**
|
|
5312
|
+
* @valid since 4.65
|
|
5313
|
+
* @brief Pauses/Resumes to publish the audio of a WTN stream.
|
|
5314
|
+
* @param streamId The WTN stream's ID. The local user has published the WTN stream via [startPushWTN](docs-104478#wtnstream-startpushwtn).
|
|
5315
|
+
* @param mute Whether to exclude audio.
|
|
5316
|
+
* - `true`: Exclude
|
|
5317
|
+
* - `false`: Include
|
|
5318
|
+
* @return You will also receive the [onWTNPushStateChanged](docs-104479#wtnstreamevents-onwtnpushstatechanged) callback.
|
|
5319
|
+
* @group WTN stream
|
|
5320
|
+
* @order 4
|
|
5321
|
+
*/
|
|
5322
|
+
muteWTNLocalAudio: (streamId: string, mute: boolean) => Promise<void>;
|
|
5323
|
+
|
|
5324
|
+
/**
|
|
5325
|
+
* @valid since 4.65
|
|
5326
|
+
* @brief Pauses/Resumes to publish the video of a WTN stream.
|
|
5327
|
+
* @param streamId The WTN stream's ID. The local user has published the WTN stream via [startPushWTN](docs-104478#wtnstream-startpushwtn).
|
|
5328
|
+
* @param mute Whether to exclude video.
|
|
5329
|
+
* - `true`: Exclude
|
|
5330
|
+
* - `false`: Include
|
|
5331
|
+
* @return You will also receive the [onWTNPushStateChanged](docs-104479#wtnstreamevents-onwtnpushstatechanged) callback.
|
|
5332
|
+
* @group WTN stream
|
|
5333
|
+
* @order 3
|
|
5334
|
+
*/
|
|
5335
|
+
muteWTNLocalVideo: (streamId: string, mute: boolean) => Promise<void>;
|
|
5336
|
+
|
|
5337
|
+
/**
|
|
5338
|
+
* @valid since 4.65
|
|
5339
|
+
* @brief Sends SEI via a WTN stream.
|
|
5340
|
+
* @param streamId The WTN stream's ID. The local user has published the WTN stream via [startPushWTN](docs-104478#wtnstream-startpushwtn).
|
|
5341
|
+
* @param sei SEI message.
|
|
5342
|
+
* @param repeatCount The number of times the SEI message is sent. The value range is [0, max{29, %{video frame rate}-1}]. The recommended range is [2,4]. <br>
|
|
5343
|
+
* After calling this interface, the SEI data will be added to the consecutive `repeat_count+1` video frames starting from the current video frame.
|
|
5344
|
+
* @note
|
|
5345
|
+
* - The number of SEI messages sent per second should not exceed the current video frame rate.
|
|
5346
|
+
* - The video frame only carries SEI data received within the previous 2s.
|
|
5347
|
+
* - After the message is successfully sent, the remote will receive the [onWTNSEIMessageReceived](docs-104479#wtnstreamevents-onwtnseimessagereceived) callback.
|
|
5348
|
+
* - If the call fails, neither the local nor the remote will receive the callback.
|
|
5349
|
+
* @group WTN stream
|
|
5350
|
+
* @order 7
|
|
5351
|
+
*/
|
|
5352
|
+
sendWTNSEIMessage: (streamId: string, sei: Uint8Array, repeatCount: number) => void;
|
|
5353
|
+
|
|
5354
|
+
/**
|
|
5355
|
+
* @valid since 4.65
|
|
5356
|
+
* @brief Subscribes to a designated WTN stream.
|
|
5357
|
+
* You can call this API to subscribe to a WTN stream whether you joined the room or not.
|
|
5358
|
+
* @param token Dynamic key. It is used for authentication and verification of users publishing a WTN stream.
|
|
5359
|
+
* When testing, you can use the console to generate temporary tokens. The official launch requires the use of the key SDK to generate and issue tokens at your server level. See [Use Token to complete authentication](docs-70121) for token validity and generation method.
|
|
5360
|
+
* Apps with different AppIDs are not interoperable.
|
|
5361
|
+
* Make sure that the AppID used to generate the Token is the same as the AppID used to create the engine, otherwise it will fail.
|
|
5362
|
+
* @param streamId The WTN stream's ID. The WTN stream can be published by calling [startPushWTN](docs-104478#startpushwtn) or [startPushPublicStream](docs-104478#startpushpublicstream).
|
|
5363
|
+
* If the designated stream is not published when you call this API, you will receive the WTN stream once it is published.
|
|
5364
|
+
* @param videoMute Whether to disable video. `true`: Disable video. `false`: Enable video.
|
|
5365
|
+
* @param audioMute Whether to disable audio. `true`: Disable audio. `false`: Enable audio.
|
|
5366
|
+
* @return
|
|
5367
|
+
* @notes + Before calling this API, we recommend that you call [setPublicStreamVideoPlayer](#setpublicstreamvideoplayer) first to set the player information and rendering mode for the WTN stream.
|
|
5368
|
+
* + After calling this API, you will receive [onFirstPublicStreamVideoFrameDecoded](docs-104479#onfirstpublicstreamvideoframedecoded) and [onFirstPublicStreamAudioFrameDecoded](docs-104479#onfirstpublicstreamaudioframedecoded) once the first frame has been decoded.
|
|
5369
|
+
* + If the WTN stream contains SEI message, you will receive the message by be informed through [onPublicStreamSEIMessageReceived](docs-104479#onpublicstreamseimessagereceived).
|
|
5370
|
+
* + Call [stopPlayPublicStream](#stopplaypublicstream) to unsubscribing from the WTN stream.
|
|
5371
|
+
* @group WTN stream
|
|
5372
|
+
* @order 10
|
|
5373
|
+
*/
|
|
5374
|
+
startPlayWTN: (token: string | null, streamId: string, videoMute: boolean, audioMute: boolean) => Promise<void>;
|
|
5375
|
+
|
|
5376
|
+
/**
|
|
5377
|
+
* @valid since 4.65
|
|
5378
|
+
* @brief Unsubscribes from a designated WTN stream.
|
|
5379
|
+
* @param streamId The WTN stream's ID.
|
|
5380
|
+
* @return
|
|
5381
|
+
* @notes Call [startPlayPublicStream](#startplaypublicstream) to subscribe to the WTN stream.
|
|
5382
|
+
* @group WTN stream
|
|
5383
|
+
* @order 12
|
|
5384
|
+
*/
|
|
5385
|
+
stopPlayWTN: (streamId: string) => Promise<void>;
|
|
5386
|
+
|
|
5387
|
+
/**
|
|
5388
|
+
* @valid since 4.65
|
|
5389
|
+
* @brief Pauses/Resumes to subscribe to the audio of a WTN stream.
|
|
5390
|
+
* @param streamId The WTN stream's ID. The local user has subscribe to the WTN stream via [startPlayWTN](#startplaywtn).
|
|
5391
|
+
* @param mute Whether to exclude audio.
|
|
5392
|
+
* - `true`: Exclude
|
|
5393
|
+
* - `false`: Include
|
|
5394
|
+
* @return
|
|
5395
|
+
* @group WTN stream
|
|
5396
|
+
* @order 13
|
|
5397
|
+
*/
|
|
5398
|
+
muteWTNRemoteAudio: (streamId: string, mute: boolean) => Promise<void>;
|
|
5399
|
+
|
|
5400
|
+
/**
|
|
5401
|
+
* @valid since 4.65
|
|
5402
|
+
* @brief Pauses/Resumes to subscribe to the video of a WTN stream.
|
|
5403
|
+
* @param streamId The WTN stream's ID. The local user has subscribe to the WTN stream via [startPlayWTN](#startplaywtn).
|
|
5404
|
+
* @param mute Whether to exclude video.
|
|
5405
|
+
* - `true`: Exclude
|
|
5406
|
+
* - `false`: Include
|
|
5407
|
+
* @return
|
|
5408
|
+
* @notes You can use this method to pause/resume the audio of a WTN stream after you have subscribed to the WTN stream via [startPlayWTN](#startplaywtn).
|
|
5409
|
+
* @group WTN stream
|
|
5410
|
+
* @order 13
|
|
5411
|
+
*/
|
|
5412
|
+
muteWTNRemoteVideo: (streamId: string, mute: boolean) => Promise<void>;
|
|
5413
|
+
|
|
5414
|
+
/**
|
|
5415
|
+
* @valid since 4.65.
|
|
5416
|
+
* @brief Sets the player information and rendering mode for the WTN stream.
|
|
5417
|
+
* @param streamId The WTN stream's ID.
|
|
5418
|
+
* @param videoPlayerOption Player information and rendering mode.
|
|
5419
|
+
* @group WTN stream
|
|
5420
|
+
* @order 9
|
|
5421
|
+
*/
|
|
5422
|
+
setWTNRemoteVideoPlayer: (streamId: string, videoPlayerOption: Omit<VideoPlayerOption, "userId" | "playerId">) => HTMLVideoElement | undefined;
|
|
5423
|
+
|
|
5424
|
+
/**
|
|
5425
|
+
* @valid since 4.65.
|
|
5426
|
+
* @brief Adjust audio playback volume of a WTN stream.
|
|
5427
|
+
* @param streamId The Id of a specified WTN stream.
|
|
5428
|
+
* @param volume The percentage of playback volume to the original volume in range of [0, 400]. The default value is 100%.
|
|
5429
|
+
* For better call quality, it is recommended to set the value in range of [0, 100].
|
|
5430
|
+
* @notes + It is recommended to set the playback volume after the playing has started.
|
|
5431
|
+
* + If the playing has not yet started when you call this API, the setting will take effect after it starts.
|
|
5432
|
+
* @group WTN stream
|
|
5433
|
+
* @order 20
|
|
5434
|
+
*/
|
|
5435
|
+
setWTNRemoteAudioPlaybackVolume: (streamId: string, volume: number) => void;
|
|
5436
|
+
}
|
|
5437
|
+
|
|
5438
|
+
/**
|
|
5439
|
+
* @id WTNstreamEvents
|
|
5440
|
+
* @list overview
|
|
5441
|
+
* @detail callback
|
|
5442
|
+
*/
|
|
5443
|
+
export interface IWTNStreamEvents {
|
|
5444
|
+
|
|
5445
|
+
/**
|
|
5446
|
+
* @brief Callback of the result of publishing the WTN stream.
|
|
5447
|
+
* After calling [startPushWTN](docs-104478#wtnstream-startpushwtn), you will be informed of the result through this callback.
|
|
5448
|
+
* @param event
|
|
5449
|
+
* @group WTN stream
|
|
5450
|
+
* @order 26
|
|
5451
|
+
*/
|
|
5452
|
+
[WTNStreamEventsTypes.onWTNPushStateChanged]: (event: onWTNPushStateChangedEvent) => void;
|
|
5453
|
+
|
|
5454
|
+
/**
|
|
5455
|
+
* @brief Callback of the result of subscribing to the WTN stream.
|
|
5456
|
+
* After calling [startPlayWTN](docs-104478#wtnstream-startplaywtn), you will be informed of the result through this callback.
|
|
5457
|
+
* @param event
|
|
5458
|
+
* @group WTN stream
|
|
5459
|
+
* @order 26
|
|
5460
|
+
*/
|
|
5461
|
+
[WTNStreamEventsTypes.onWTNPlayStateChanged]: (event: onWTNPlayStateChangedEvent) => void;
|
|
5462
|
+
|
|
5463
|
+
/**
|
|
5464
|
+
* @brief Callback of the subscription state of to the audio of the WTN stream.
|
|
5465
|
+
* After calling [startPlayWTN](docs-104478#wtnstream-startplaywtn), you will be informed of the result through this callback.
|
|
5466
|
+
* @param event
|
|
5467
|
+
* @group WTN stream
|
|
5468
|
+
* @order 27
|
|
5469
|
+
*/
|
|
5470
|
+
[WTNStreamEventsTypes.onWTNRemoteAudioStateChanged]: (event: onWTNRemoteAudioStateChangedEvent) => void;
|
|
5471
|
+
|
|
5472
|
+
/**
|
|
5473
|
+
* @brief Callback of the subscription state of to the video of the WTN stream.
|
|
5474
|
+
* After calling [startPlayWTN](docs-104478#wtnstream-startplaywtn), you will be informed of the result through this callback.
|
|
5475
|
+
* @param event
|
|
5476
|
+
* @group WTN stream
|
|
5477
|
+
* @order 28
|
|
5478
|
+
*/
|
|
5479
|
+
[WTNStreamEventsTypes.onWTNRemoteVideoStateChanged]: (event: onWTNRemoteVideoStateChangedEvent) => void;
|
|
5480
|
+
|
|
5481
|
+
/**
|
|
5482
|
+
* @brief Callback carrying the video statistics of the WTN stream.
|
|
5483
|
+
* You can receive this callback every 2 seconds after subscribing to the video of a WTN stream via [startPlayWTN](docs-104478#wtnstream-startplaywtn).
|
|
5484
|
+
* @param event
|
|
5485
|
+
* @group WTN stream
|
|
5486
|
+
* @order 30
|
|
5487
|
+
*/
|
|
5488
|
+
[WTNStreamEventsTypes.onWTNRemoteVideoStats]: (event: onWTNRemoteVideoStatsEvent) => void;
|
|
5489
|
+
|
|
5490
|
+
/**
|
|
5491
|
+
* @brief Callback carrying the audio statistics of the WTN stream.
|
|
5492
|
+
* You can receive this callback every 2 seconds after subscribing to the audio of a WTN stream via [startPlayWTN](docs-104478#wtnstream-startplaywtn).
|
|
5493
|
+
* @param event
|
|
5494
|
+
* @group WTN stream
|
|
5495
|
+
* @order 31
|
|
5496
|
+
*/
|
|
5497
|
+
[WTNStreamEventsTypes.onWTNRemoteAudioStats]: (event: onWTNRemoteAudioStatsEvent) => void;
|
|
5498
|
+
|
|
5499
|
+
/**
|
|
5500
|
+
* @brief Callback of the successful decoding of the first video frame of the WTN stream.
|
|
5501
|
+
* Refer to [startPlayWTN](docs-104478#wtnstream-startplaywtn) for details about subscribing to a WTN stream.
|
|
5502
|
+
* @param event
|
|
5503
|
+
* @group WTN stream
|
|
5504
|
+
* @order 36
|
|
5505
|
+
*/
|
|
5506
|
+
[WTNStreamEventsTypes.onWTNFirstRemoteVideoFrameDecoded]: (event: onWTNFirstRemoteVideoFrameDecodedEvent) => void;
|
|
5507
|
+
|
|
5508
|
+
/**
|
|
5509
|
+
* @brief Callback of the SEI carried by the public video stream.
|
|
5510
|
+
* You will receive SEI by this callback if the WTN stream you subscribed to by calling [startPlayWTN](docs-104478#wtnstream-startplaywtn) is carrying SEI.
|
|
5511
|
+
* @param event
|
|
5512
|
+
* @notes When multiple streams in the WTN stream contain SEI:
|
|
5513
|
+
* + You will receive SEI from all the video frames if the SEI do not have conflicts.
|
|
5514
|
+
* + However, if SEI from video frames have conflicts, you will receive only one of them.
|
|
5515
|
+
* @group WTN stream
|
|
5516
|
+
* @order 40
|
|
5517
|
+
*/
|
|
5518
|
+
[WTNStreamEventsTypes.onWTNSEIMessageReceived]: (event: onWTNSEIMessageReceivedEvent) => void;
|
|
5519
|
+
}
|
|
5520
|
+
|
|
4905
5521
|
/**
|
|
4906
5522
|
* @brief Initial publish state
|
|
4907
5523
|
*/
|
|
@@ -5436,7 +6052,7 @@ export interface PublicStreamAudioFirstFrameDecodedEvent {
|
|
|
5436
6052
|
}
|
|
5437
6053
|
|
|
5438
6054
|
/**
|
|
5439
|
-
* @brief Configurations of the
|
|
6055
|
+
* @brief Configurations of the WTN stream.
|
|
5440
6056
|
*/
|
|
5441
6057
|
export interface PublicStreamConfig {
|
|
5442
6058
|
|
|
@@ -5447,13 +6063,13 @@ export interface PublicStreamConfig {
|
|
|
5447
6063
|
|
|
5448
6064
|
/**
|
|
5449
6065
|
* @brief Width, unit: px.
|
|
5450
|
-
* Valid for even numbers only. Assigning an odd number will lead to a failure of publishing a
|
|
6066
|
+
* Valid for even numbers only. Assigning an odd number will lead to a failure of publishing a WTN stream.
|
|
5451
6067
|
*/
|
|
5452
6068
|
width?: number;
|
|
5453
6069
|
|
|
5454
6070
|
/**
|
|
5455
6071
|
* @brief Height, unit: px.
|
|
5456
|
-
* Valid for even numbers only. Assigning an odd number will lead to a failure of publishing a
|
|
6072
|
+
* Valid for even numbers only. Assigning an odd number will lead to a failure of publishing a WTN stream.
|
|
5457
6073
|
*/
|
|
5458
6074
|
height?: number;
|
|
5459
6075
|
|
|
@@ -5469,7 +6085,7 @@ export interface PublicStreamConfig {
|
|
|
5469
6085
|
};
|
|
5470
6086
|
|
|
5471
6087
|
/**
|
|
5472
|
-
* @brief The layout mode of the
|
|
6088
|
+
* @brief The layout mode of the WTN stream.
|
|
5473
6089
|
*/
|
|
5474
6090
|
layout?: {
|
|
5475
6091
|
|
|
@@ -5489,7 +6105,7 @@ export interface PublicStreamConfig {
|
|
|
5489
6105
|
backgroundImage?: string;
|
|
5490
6106
|
|
|
5491
6107
|
/**
|
|
5492
|
-
* @brief Layout configuration of the
|
|
6108
|
+
* @brief Layout configuration of the WTN stream
|
|
5493
6109
|
*/
|
|
5494
6110
|
regions?: PublicStreamLayoutRegion[];
|
|
5495
6111
|
};
|
|
@@ -6045,6 +6661,7 @@ export interface ScreenConfig {
|
|
|
6045
6661
|
/**
|
|
6046
6662
|
* @brief The ID of the object to be shared during screen-sharing in Electron.
|
|
6047
6663
|
* You can get the ID from [getElectronScreenSources](docs-104478#vertc-getelectronscreensources).
|
|
6664
|
+
* If you don't specify this parameter, the SDK will pop up a default selection box for the user to select the screen-sharing source.
|
|
6048
6665
|
*/
|
|
6049
6666
|
sourceId?: string;
|
|
6050
6667
|
}
|
|
@@ -6109,6 +6726,7 @@ export interface SetParamInterface {
|
|
|
6109
6726
|
SIGNAL_CROP_JOINROOM: boolean;
|
|
6110
6727
|
VIDEO_STALL_DATA: number;
|
|
6111
6728
|
AUDIO_STALL_DATA: number;
|
|
6729
|
+
IOS_SAFARI_ORIENTATION: boolean;
|
|
6112
6730
|
BLACK_FRAME_LIFETIME: number;
|
|
6113
6731
|
FALLBACK_ENCODE_CODEC: string;
|
|
6114
6732
|
SEI_TIME_OUT: number;
|
|
@@ -6116,8 +6734,15 @@ export interface SetParamInterface {
|
|
|
6116
6734
|
/** 是否开启提前建连 */
|
|
6117
6735
|
PRE_ICE: boolean;
|
|
6118
6736
|
STATS_LOOP_INTERVAL: number;
|
|
6119
|
-
|
|
6737
|
+
HIDDEN_STATS: boolean;
|
|
6738
|
+
UPLOAD_REMOTE_STATS: string | ExtendMediaType;
|
|
6120
6739
|
SDK_CODEC_NEGOTIATION: boolean;
|
|
6740
|
+
AINR_CACHE_TIME: number;
|
|
6741
|
+
AINR_DUMP_TIME: number;
|
|
6742
|
+
AINR_ENABLE_DUMP: boolean;
|
|
6743
|
+
AINR_OVERLOAD_THRESHOLD: number;
|
|
6744
|
+
AINR_URLS: string;
|
|
6745
|
+
AUDIO_CODEC: string;
|
|
6121
6746
|
}
|
|
6122
6747
|
|
|
6123
6748
|
/**
|
|
@@ -6386,6 +7011,12 @@ export interface VideoEncoderConfig {
|
|
|
6386
7011
|
* @notes This property is not supported on Firefox. See [contentHint browser compatibility](https://caniuse.com/?search=contentHint).
|
|
6387
7012
|
*/
|
|
6388
7013
|
contentHint?: "text" | "motion" | "detail";
|
|
7014
|
+
|
|
7015
|
+
/**
|
|
7016
|
+
* @hidden for internal use only
|
|
7017
|
+
* @brief The preferred codec for the video stream. The default value is `'auto'`, no preference. By default, the SDK will automatically match the best codec based on the current video resolution and device performance.
|
|
7018
|
+
*/
|
|
7019
|
+
preferCodecName?: VideoCodecType;
|
|
6389
7020
|
}
|
|
6390
7021
|
|
|
6391
7022
|
/**
|
|
@@ -6409,7 +7040,7 @@ export interface VideoPlayerOption {
|
|
|
6409
7040
|
* + 26 lowercase letters a~ z
|
|
6410
7041
|
* + 10 numbers 0~ 9
|
|
6411
7042
|
* + underscore "_", at character "@", minus, number "-"
|
|
6412
|
-
* This property does not apply to the
|
|
7043
|
+
* This property does not apply to the WTN stream.
|
|
6413
7044
|
*/
|
|
6414
7045
|
userId: string;
|
|
6415
7046
|
|
|
@@ -6421,7 +7052,7 @@ export interface VideoPlayerOption {
|
|
|
6421
7052
|
|
|
6422
7053
|
/**
|
|
6423
7054
|
* @brief Player ID. An empty value indicates the default player.
|
|
6424
|
-
* This property does not apply to the
|
|
7055
|
+
* This property does not apply to the WTN stream.
|
|
6425
7056
|
*/
|
|
6426
7057
|
playerId?: string;
|
|
6427
7058
|
}
|
|
@@ -6677,6 +7308,169 @@ export interface onVideoFirstFrameRenderedEvent {
|
|
|
6677
7308
|
*/
|
|
6678
7309
|
playerId?: string;
|
|
6679
7310
|
}
|
|
7311
|
+
|
|
7312
|
+
/**
|
|
7313
|
+
* @brief SEI messages carried by the WTN stream.
|
|
7314
|
+
*/
|
|
7315
|
+
export interface onWTNFirstRemoteVideoFrameDecodedEvent {
|
|
7316
|
+
|
|
7317
|
+
/**
|
|
7318
|
+
* @brief WTN stream ID.
|
|
7319
|
+
*/
|
|
7320
|
+
streamId: string;
|
|
7321
|
+
}
|
|
7322
|
+
|
|
7323
|
+
/**
|
|
7324
|
+
* @brief The state of the WTN stream playing.
|
|
7325
|
+
*/
|
|
7326
|
+
export interface onWTNPlayStateChangedEvent {
|
|
7327
|
+
|
|
7328
|
+
/**
|
|
7329
|
+
* @brief WTN stream ID.
|
|
7330
|
+
*/
|
|
7331
|
+
streamId: string;
|
|
7332
|
+
|
|
7333
|
+
/**
|
|
7334
|
+
* @brief The original state of the WTN stream playing.
|
|
7335
|
+
*/
|
|
7336
|
+
oldState: WTNPlayState;
|
|
7337
|
+
|
|
7338
|
+
/**
|
|
7339
|
+
* @brief The new state of the WTN stream playing.
|
|
7340
|
+
*/
|
|
7341
|
+
newState: WTNPlayState;
|
|
7342
|
+
|
|
7343
|
+
/**
|
|
7344
|
+
* @brief The reason why the playing state changed.
|
|
7345
|
+
*/
|
|
7346
|
+
reason: WTNPlayStateChangedReason;
|
|
7347
|
+
|
|
7348
|
+
/**
|
|
7349
|
+
* @brief The time elapsed since the WTN stream playing state changed.
|
|
7350
|
+
*/
|
|
7351
|
+
elapse: number;
|
|
7352
|
+
}
|
|
7353
|
+
|
|
7354
|
+
/**
|
|
7355
|
+
* @brief The result of the WTN stream task.
|
|
7356
|
+
*/
|
|
7357
|
+
export interface onWTNPushStateChangedEvent {
|
|
7358
|
+
|
|
7359
|
+
/**
|
|
7360
|
+
* @brief WTN stream ID.
|
|
7361
|
+
*/
|
|
7362
|
+
streamId: string;
|
|
7363
|
+
|
|
7364
|
+
/**
|
|
7365
|
+
* @brief The original state of the WTN stream publishing task.
|
|
7366
|
+
*/
|
|
7367
|
+
oldState: WTNPushState;
|
|
7368
|
+
|
|
7369
|
+
/**
|
|
7370
|
+
* @brief The new state of the WTN stream publishing task.
|
|
7371
|
+
*/
|
|
7372
|
+
newState: WTNPushState;
|
|
7373
|
+
|
|
7374
|
+
/**
|
|
7375
|
+
* @brief The reason why the WTN stream publishing task state changed.
|
|
7376
|
+
*/
|
|
7377
|
+
reason: WTNPushStateChangedReason;
|
|
7378
|
+
|
|
7379
|
+
/**
|
|
7380
|
+
* @brief The time elapsed since the WTN stream publishing task state changed.
|
|
7381
|
+
*/
|
|
7382
|
+
elapse: number;
|
|
7383
|
+
}
|
|
7384
|
+
|
|
7385
|
+
/**
|
|
7386
|
+
* @brief The state of the remote WTN stream audio changed.
|
|
7387
|
+
*/
|
|
7388
|
+
export interface onWTNRemoteAudioStateChangedEvent {
|
|
7389
|
+
|
|
7390
|
+
/**
|
|
7391
|
+
* @brief WTN stream ID.
|
|
7392
|
+
*/
|
|
7393
|
+
streamId: string;
|
|
7394
|
+
|
|
7395
|
+
/**
|
|
7396
|
+
* @brief The state of the WTN stream audio changed.
|
|
7397
|
+
*/
|
|
7398
|
+
state: WTNRemoteAudioState;
|
|
7399
|
+
|
|
7400
|
+
/**
|
|
7401
|
+
* @brief The reason why the status of the remote WTN audio changes.
|
|
7402
|
+
*/
|
|
7403
|
+
reason: WTNRemoteAudioStateChangeReason;
|
|
7404
|
+
}
|
|
7405
|
+
|
|
7406
|
+
/**
|
|
7407
|
+
* @brief The statistics of the audio of the WTN stream.
|
|
7408
|
+
*/
|
|
7409
|
+
export interface onWTNRemoteAudioStatsEvent {
|
|
7410
|
+
|
|
7411
|
+
/**
|
|
7412
|
+
* @brief WTN stream ID.
|
|
7413
|
+
*/
|
|
7414
|
+
streamId: string;
|
|
7415
|
+
|
|
7416
|
+
/**
|
|
7417
|
+
* @brief The statistics of the audio of the WTN stream.
|
|
7418
|
+
*/
|
|
7419
|
+
audioStats: RemoteAudioStats;
|
|
7420
|
+
}
|
|
7421
|
+
|
|
7422
|
+
/**
|
|
7423
|
+
* @brief The state of the WTN stream video changed.
|
|
7424
|
+
*/
|
|
7425
|
+
export interface onWTNRemoteVideoStateChangedEvent {
|
|
7426
|
+
|
|
7427
|
+
/**
|
|
7428
|
+
* @brief WTN stream ID.
|
|
7429
|
+
*/
|
|
7430
|
+
streamId: string;
|
|
7431
|
+
|
|
7432
|
+
/**
|
|
7433
|
+
* @brief The state of the WTN stream video.
|
|
7434
|
+
*/
|
|
7435
|
+
state: WTNRemoteVideoState;
|
|
7436
|
+
|
|
7437
|
+
/**
|
|
7438
|
+
* @brief The reason why the WTN stream video state changed.
|
|
7439
|
+
*/
|
|
7440
|
+
reason: WTNRemoteVideoStateChangeReason;
|
|
7441
|
+
}
|
|
7442
|
+
|
|
7443
|
+
/**
|
|
7444
|
+
* @brief The statistics of the video of the WTN stream.
|
|
7445
|
+
*/
|
|
7446
|
+
export interface onWTNRemoteVideoStatsEvent {
|
|
7447
|
+
|
|
7448
|
+
/**
|
|
7449
|
+
* @brief WTN stream ID.
|
|
7450
|
+
*/
|
|
7451
|
+
streamId: string;
|
|
7452
|
+
|
|
7453
|
+
/**
|
|
7454
|
+
* @brief The statistics of the video of the WTN stream.
|
|
7455
|
+
*/
|
|
7456
|
+
videoStats: RemoteVideoStats;
|
|
7457
|
+
}
|
|
7458
|
+
|
|
7459
|
+
/**
|
|
7460
|
+
* @brief SEI messages carried by the WTN stream.
|
|
7461
|
+
*/
|
|
7462
|
+
export interface onWTNSEIMessageReceivedEvent {
|
|
7463
|
+
|
|
7464
|
+
/**
|
|
7465
|
+
* @brief WTN stream ID.
|
|
7466
|
+
*/
|
|
7467
|
+
streamId: string;
|
|
7468
|
+
|
|
7469
|
+
/**
|
|
7470
|
+
* @brief SEI.
|
|
7471
|
+
*/
|
|
7472
|
+
sei: Uint8Array;
|
|
7473
|
+
}
|
|
6680
7474
|
export type CoreSetParamterInterface = {
|
|
6681
7475
|
[P in keyof CoreConfigType]: CoreConfigType[P] extends number ? number | string : CoreConfigType[P];
|
|
6682
7476
|
};
|
|
@@ -6693,12 +7487,12 @@ export type PublicStreamLayoutRegion = Omit<LiveTranscodeLayoutRegion, "isLocalU
|
|
|
6693
7487
|
roomId: string;
|
|
6694
7488
|
|
|
6695
7489
|
/**
|
|
6696
|
-
* @brief Media type of the
|
|
7490
|
+
* @brief Media type of the WTN stream.
|
|
6697
7491
|
*/
|
|
6698
7492
|
mediaType?: PublicStreamType;
|
|
6699
7493
|
|
|
6700
7494
|
/**
|
|
6701
|
-
* @brief Configurations on how to crop the
|
|
7495
|
+
* @brief Configurations on how to crop the WTN stream
|
|
6702
7496
|
*/
|
|
6703
7497
|
sourceCrop?: {
|
|
6704
7498
|
|