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