TRTCRoleType enum

Role

The role is applicable only to live streaming scenarios (TRTCAppScene.live and TRTCAppScene.voiceChatRoom). Users are divided into two roles:

  • Anchor:

    • Can publish their audio/video streams.
    • There is a limit on the number of anchors. Up to 50 anchors are allowed to publish streams at the same time in one room.
  • Audience:

    • Can only listen to or watch audio/video streams of anchors in the room.
    • If they want to publish their streams, they need to switch to the "anchor" role first through switchRole.
    • One room can sustain up to 100,000 concurrent online users in the audience role.
Inheritance
Annotations
  • @JsonEnum(alwaysCreate: true)

Constructors

TRTCRoleType()
const

Values

anchor → const TRTCRoleType
  • An anchor can publish their audio/video streams. There is a limit on the number of anchors.
  • Up to 50 anchors are allowed to publish streams at the same time in one room.
audience → const TRTCRoleType
  • Audience can only listen to or watch audio/video streams of anchors in the room.
  • If they want to publish their streams, they need to switch to the "anchor" role first through switchRole .
  • One room can sustain up to 100,000 concurrent online users in the audience role.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<TRTCRoleType>
A constant List of the values in this enum, in order of their declaration.