RtmpStreamPublishState enum

推流状态。

Inheritance
Available extensions
Annotations
  • @JsonEnum.new(alwaysCreate: true)

Values

rtmpStreamPublishStateIdle → const RtmpStreamPublishState

0:推流未开始或已结束。

rtmpStreamPublishStateConnecting → const RtmpStreamPublishState

1:正在连接推流服务器和 CDN 服务器。

rtmpStreamPublishStateRunning → const RtmpStreamPublishState

2:推流正在进行。成功推流后,会返回该状态。

rtmpStreamPublishStateRecovering → const RtmpStreamPublishState

3:正在恢复推流。当 CDN 出现异常,或推流短暂中断时,SDK 会自动尝试恢复推流,并返回该状态。 如成功恢复推流,则进入状态 rtmpStreamPublishStateRunning(2)。 如服务器出错或 60 秒内未成功恢复,则进入状态 rtmpStreamPublishStateFailure(4)。如果觉得 60 秒太长,也可以主动尝试重连。

rtmpStreamPublishStateFailure → const RtmpStreamPublishState

4:推流失败。失败后,你可以通过返回的错误码排查错误原因。

rtmpStreamPublishStateDisconnecting → const RtmpStreamPublishState

5:SDK 正在与推流服务器和 CDN 服务器断开连接。当你调用 stopRtmpStream 方法正常结束推流时,SDK 会依次报告推流状态为 rtmpStreamPublishStateDisconnecting 、 rtmpStreamPublishStateIdle 。

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
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<RtmpStreamPublishState>
A constant List of the values in this enum, in order of their declaration.