TRTC Constants
Example
// Usage:
TRTC.TYPE.SCENE_LIVE
Members
(static) SCENE_LIVE
- Default Value:
-
- 'live'
Live streaming scene
(static) SCENE_RTC
- Default Value:
-
- 'rtc'
RTC scene
(static) ROLE_ANCHOR
- Default Value:
-
- 'anchor'
Anchor role
(static) ROLE_AUDIENCE
- Default Value:
-
- 'audience'
Audience role
(static) STREAM_TYPE_MAIN
- Default Value:
-
- 'main'
Main stream
- TRTC has a main video stream (main stream) and an sub video stream (sub stream)
- The camera is published through the main stream, and the screen sharing is published through the sub stream.
- The main video stream includes: high-definition large picture and low-definition small picture. By default, TRTC.startRemoteVideo plays the high-definition large picture, and the low-definition small picture can be played through the small parameter. Refer to: Enable small stream function.
(static) STREAM_TYPE_SUB
- Default Value:
-
- 'sub'
Sub stream
(static) AUDIO_PROFILE_STANDARD
- Default Value:
-
- 'standard'
Standard audio quality
Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
---|---|---|---|
TRTC.TYPE.AUDIO_PROFILE_STANDARD | 48000 | Mono | 40 |
TRTC.TYPE.AUDIO_PROFILE_HIGH | 48000 | Mono | 128 |
TRTC.TYPE.AUDIO_PROFILE_STANDARD_STEREO | 48000 | Stereo | 64 |
TRTC.TYPE.AUDIO_PROFILE_HIGH_STEREO | 48000 | Stereo | 192 |
(static) AUDIO_PROFILE_STANDARD_STEREO
- Default Value:
-
- 'standard-stereo'
Standard stereo audio quality
Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
---|---|---|---|
TRTC.TYPE.AUDIO_PROFILE_STANDARD | 48000 | Mono | 40 |
TRTC.TYPE.AUDIO_PROFILE_HIGH | 48000 | Mono | 128 |
TRTC.TYPE.AUDIO_PROFILE_STANDARD_STEREO | 48000 | Stereo | 64 |
TRTC.TYPE.AUDIO_PROFILE_HIGH_STEREO | 48000 | Stereo | 192 |
(static) AUDIO_PROFILE_HIGH
- Default Value:
-
- 'high'
High audio quality
Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
---|---|---|---|
TRTC.TYPE.AUDIO_PROFILE_STANDARD | 48000 | Mono | 40 |
TRTC.TYPE.AUDIO_PROFILE_HIGH | 48000 | Mono | 128 |
TRTC.TYPE.AUDIO_PROFILE_STANDARD_STEREO | 48000 | Stereo | 64 |
TRTC.TYPE.AUDIO_PROFILE_HIGH_STEREO | 48000 | Stereo | 192 |
(static) AUDIO_PROFILE_HIGH_STEREO
- Default Value:
-
- 'high-stereo'
High-quality stereo audio
Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
---|---|---|---|
TRTC.TYPE.AUDIO_PROFILE_STANDARD | 48000 | Mono | 40 |
TRTC.TYPE.AUDIO_PROFILE_HIGH | 48000 | Mono | 128 |
TRTC.TYPE.AUDIO_PROFILE_STANDARD_STEREO | 48000 | Stereo | 64 |
TRTC.TYPE.AUDIO_PROFILE_HIGH_STEREO | 48000 | Stereo | 192 |
(static) QOS_PREFERENCE_SMOOTH
- Default Value:
-
- 'smooth'
When the network is weak, the video encoding strategy takes 'smooth' first, i.e., the priority is to preserve frame rate.
Default 'smooth' first for camera, 'default' clear first for screen sharing
(static) QOS_PREFERENCE_CLEAR
- Default Value:
-
- 'clear'
When the network is weak, the video encoding strategy takes 'clear' first, i.e., the priority is to preserve resolution.
Default 'smooth' first for camera, 'default' clear first for screen sharing