public static class com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerResolution
直播播放器的清晰度档位。
类型 | 默认值 | 名称 |
|---|---|---|
String | "origin" | |
String | "uhd" | |
String | "hd" | |
String | "sd" | |
String | "ld" | |
String | VeLivePlayerResolutionOrigin |
返回 | 名称 |
|---|---|
VeLivePlayerResolution |
public static final String com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerResolution.VeLivePlayerResolutionOrigin = "origin"
原始流。
public static final String com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerResolution.VeLivePlayerResolutionUHD = "uhd"
UHD 超高清。
public static final String com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerResolution.VeLivePlayerResolutionHD = "hd"
HD 高清。
public static final String com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerResolution.VeLivePlayerResolutionSD = "sd"
SD 标清。
public static final String com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerResolution.VeLivePlayerResolutionLD = "ld"
LD 低清。
public String com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerResolution.resolutionStr = VeLivePlayerResolutionOrigin
创建对象时传入的初始分辨率档位。
public com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerResolution.VeLivePlayerResolution(String res)
构造方法。
传入参数
参数名 | 类型 | 说明 |
|---|---|---|
res | String | 分辨率档位。 |
public final class com.ss.videoarch.liveplayer.VeLivePlayerConfiguration
播放器初始化相关配置。
类型 | 默认值 | 名称 |
|---|---|---|
boolean | false | |
boolean | false | |
boolean | true | |
int | 5_000 | |
int | 5_000 | |
int | 5 | |
boolean | false | |
boolean | false | |
int | 5 | |
long | 10_000 |
public boolean com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.enableSei = false
是否开启字符串 SEI 消息的解析,默认值为 false。
public boolean com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.enableBinarySei = false
是否开启二进制 SEI 消息的解析,默认值为 false。
注意
二进制 SEI 开启后,字符串 SEI 的回调将不再发送。
public boolean com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.enableHardwareDecode = true
是否开启硬件解码功能,默认值为 true。开启硬件解码后,如果出现硬件解码启动失败或硬件解码失败的情况,播放器内部会自动切换为软解。
public int com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.networkTimeoutMs = 5_000
网络超时时间,单位为 ms,默认值为 5000。播放器发起网络请求,如果超过了该时间仍未收到服务器响应,则认为网络请求失败。
public int com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.retryIntervalTimeMs = 5_000
重试时间间隔。单位为 ms,默认值为 5000。如果需要为每个流单独设置重试间隔,可以设置 retryIntervalTimeMs。
public int com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.retryMaxCount = 5
在网络连接错误的情况下,播放器的最大重试次数。默认值为 5。如果取值为 0,表示关闭播放器内部重试。如果需要为每个流单独设置最大重试次数,可以设置 retryMaxCount。
public boolean com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.enableLiveDNS = false
是否开启本地 DNS 预解析,默认值为 false。开启本地 DNS 预解析可以缩短启播时间。如果本地 DNS 预解析出现异常,可能会影响播放器的正常使用。
public boolean com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.enableStatisticsCallback = false
是否开启播放信息周期性回调。默认值为 false。周期性回调参数详细说明请参见 VeLivePlayerStatistics 。当 enableStatisticsCallback 为 true,且 statisticsCallbackInterval 大于 0 时,播放器会在指定的时间间隔内,周期性地回调播放器状态信息。
public int com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.statisticsCallbackInterval = 5
播放信息周期性回调的时间间隔,单位为 s,默认值为 5。当 enableStatisticsCallback 为 true,且 statisticsCallbackInterval 大于 0 时,播放器会在指定的时间间隔内,周期性地回调播放器状态信息。
public long com.ss.videoarch.liveplayer.VeLivePlayerConfiguration.stallRetryTimeout = 10_000
卡顿超时停止重试阈值。当卡顿时长超过该阈值时,播放器将不再进行重试。单位为 ms。默认值为 10000,即 10 秒。
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerFormat
直播播放格式。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerFormatFLV | 0 | FLV 格式。 |
VeLivePlayerFormatHLS | 1 | HLS 格式。 |
VeLivePlayerFormatRTM | 2 | RTM 格式。 |
VeLivePlayerFormatCMAF | 3 | CMAF 格式 |
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerProtocol
直播播放传输协议。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerProtocolTCP | 0 | TCP 协议。 |
VeLivePlayerProtocolQUIC | 1 | QUIC 协议。 |
VeLivePlayerProtocolTLS | 2 | TLS 协议。 |
VeLivePlayerProtocolHTTP2 | 3 | HTTP/2 协议。 |
VeLivePlayerProtocolDefault | 4 | 默认值。播放器将根据拉流地址自动识别网络协议。目前仅支持自动识别 TCP 和 TLS 协议。如需使用 QUIC 或 HTTP/2 协议,请使用对应取值。 |
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerMirror
视频镜像。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerMirrorNone | 0 | 关闭镜像。 |
VeLivePlayerMirrorHorizontal | 1 | 水平镜像。 |
VeLivePlayerMirrorVertical | 2 | 垂直镜像。 |
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerVideoBufferType
视频数据封装格式。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerVideoBufferTypeUnknown | 0 | 未知格式。 |
VeLivePlayerVideoBufferTypeByteBuffer | 1 | ByteBuffer 格式。 |
VeLivePlayerVideoBufferTypeByteArray | 2 | ByteArray 格式。 |
VeLivePlayerVideoBufferTypeTexture | 3 | 纹理格式。 |
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerStatus
直播播放器状态。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerStatusStopped | 0 | 停止播放状态。 |
VeLivePlayerStatusPaused | 1 | 暂停播放状态。 |
VeLivePlayerStatusPrepared | 2 | 播放器准备完成,等待渲染。 |
VeLivePlayerStatusPlaying | 3 | 正在播放,即首帧渲染完成且播放器未发生错误。 |
VeLivePlayerStatusError | 4 | 播放器发生错误。 |
VeLivePlayerStatusStalled | 5 | 播放器发生卡顿。 |
public class com.ss.videoarch.liveplayer.log.VeLivePlayerLogConfig
日志配置。
类型 | 默认值 | 名称 |
|---|---|---|
VeLivePlayerLogLevel | VeLivePlayerLogLevel.VeLivePlayerLogLevelVerbose |
public VeLivePlayerLogLevel com.ss.videoarch.liveplayer.log.VeLivePlayerLogConfig.logLevel = VeLivePlayerLogLevel.VeLivePlayerLogLevelVerbose
允许写入的日志等级,默认为 VeLivePlayerLogLevelDebug,详情请参见 VeLivePlayerLogLevel。
public class com.ss.videoarch.liveplayer.VeLivePlayerStreamData
播放地址相关配置。
类型 | 默认值 | 名称 |
|---|---|---|
boolean | false | |
boolean | false | |
VeLivePlayerResolution | new VeLivePlayerResolution(VeLivePlayerResolution.VeLivePlayerResolutionOrigin) | |
VeLivePlayerFormat | VeLivePlayerFormat.VeLivePlayerFormatFLV | |
VeLivePlayerProtocol | VeLivePlayerProtocol.VeLivePlayerProtocolTCP | |
List | null | |
List | null | |
boolean | false |
public boolean com.ss.videoarch.liveplayer.VeLivePlayerStreamData.enableABR = false
是否打开 ABR 平滑切档功能,默认为 false。
public boolean com.ss.videoarch.liveplayer.VeLivePlayerStreamData.enableMainBackupSwitch = false
是否打开主备切换,默认为 false。
public VeLivePlayerResolution com.ss.videoarch.liveplayer.VeLivePlayerStreamData.defaultResolution = new VeLivePlayerResolution(VeLivePlayerResolution.VeLivePlayerResolutionOrigin)
播放器的默认清晰度档位,默认使用原始流清晰度。详情请参见 VeLivePlayerResolution。
public VeLivePlayerFormat com.ss.videoarch.liveplayer.VeLivePlayerStreamData.defaultFormat = VeLivePlayerFormat.VeLivePlayerFormatFLV
播放器的默认播放格式,默认值为 FLV。详情请参见 VeLivePlayerFormat。
public VeLivePlayerProtocol com.ss.videoarch.liveplayer.VeLivePlayerStreamData.defaultProtocol = VeLivePlayerProtocol.VeLivePlayerProtocolTCP
播放器的默认播放传输层协议,默认值为 TCP。详情请参见 VeLivePlayerProtocol。
public List<VeLivePlayerStream> com.ss.videoarch.liveplayer.VeLivePlayerStreamData.mainStreamList = null
主路流地址列表,详情请参见 VeLivePlayerStream。
public List<VeLivePlayerStream> com.ss.videoarch.liveplayer.VeLivePlayerStreamData.backupStreamList = null
备路流地址列表。详情请参见 VeLivePlayerStream。
public boolean com.ss.videoarch.liveplayer.VeLivePlayerStreamData.enableSmoothSwitchResolution = false
是否开启平滑切换清晰度功能。默认值为 false。开启后,在调用 switchResolution 手动切换清晰度时,SDK 会尝试进行平滑过渡,避免出现黑屏或卡顿。取值如下:
true:开启。false:关闭。public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerResolutionSwitchReason
直播播放器清晰度档位变化原因。
类型 | 值 | 说明 |
|---|---|---|
VeLiveplayerResolutionSwitchByAuto | 0 | ABR 自动切档。 |
VeLiveplayerResolutionSwitchByManual | 1 | 调用 switchResolution 手动切换档位导致的分辨率变化。 |
public static class com.ss.videoarch.liveplayer.VeLivePlayerError.VeLivePlayerSupportResolutionSwitchError
清晰度档位切换错误。
类型 | 默认值 | 名称 |
|---|---|---|
int | 0 | |
int | -1 | |
int | -2 | |
int | -3 | |
int | -4 | |
int | -5 | |
int | -6 |
public static final int com.ss.videoarch.liveplayer.VeLivePlayerError.VeLivePlayerSupportResolutionSwitchError.VeLivePlayerNoError = 0
没有错误。
public static final int com.ss.videoarch.liveplayer.VeLivePlayerError.VeLivePlayerSupportResolutionSwitchError.VeLivePlayerErrorInvalidRes = -1
清晰度档位无效。
public static final int com.ss.videoarch.liveplayer.VeLivePlayerError.VeLivePlayerSupportResolutionSwitchError.VeLivePlayerErrorSameRes = -2
和当前清晰度档位相同。
public static final int com.ss.videoarch.liveplayer.VeLivePlayerError.VeLivePlayerSupportResolutionSwitchError.VeLivePlayerErrorStatusInvalid = -3
播放器状态为非 prepare 状态。
public static final int com.ss.videoarch.liveplayer.VeLivePlayerError.VeLivePlayerSupportResolutionSwitchError.VeLivePlayerErrorResNotFound = -4
没有找到对应清晰度档位。
public static final int com.ss.videoarch.liveplayer.VeLivePlayerError.VeLivePlayerSupportResolutionSwitchError.VeLivePlayerErrorFormatNotSupport = -5
当前播放格式不支持该档位。
public static final int com.ss.videoarch.liveplayer.VeLivePlayerError.VeLivePlayerSupportResolutionSwitchError.VeLivePlayerErrorConfigNotSupport = -6
当前播放配置不支持该档位。
public static class com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream
流地址信息。
类型 | 默认值 | 名称 |
|---|---|---|
String | null | |
VeLivePlayerResolution | new VeLivePlayerResolution(VeLivePlayerResolution.VeLivePlayerResolutionOrigin) | |
long |
| |
VeLivePlayerFormat | VeLivePlayerFormat.VeLivePlayerFormatFLV | |
VeLivePlayerStreamType | VeLivePlayerStreamType.VeLivePlayerStreamTypeMain | |
int | 0 | |
int | -1 | |
int | -1 | |
VeLivePlayerProtocol | VeLivePlayerProtocol.VeLivePlayerProtocolDefault |
public String com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream.url = null
播放地址。
public VeLivePlayerResolution com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream.resolution = new VeLivePlayerResolution(VeLivePlayerResolution.VeLivePlayerResolutionOrigin)
清晰度档位。详情请参见 VeLivePlayerResolution。
public long com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream.bitrate
播放码率,单位为 kbps。
public VeLivePlayerFormat com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream.format = VeLivePlayerFormat.VeLivePlayerFormatFLV
播放格式。详情请参见 VeLivePlayerFormat。
public VeLivePlayerStreamType com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream.streamType = VeLivePlayerStreamType.VeLivePlayerStreamTypeMain
播放流类型为主路或备路。详情请参见 VeLivePlayerStreamType。
public int com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream.priority = 0
流的优先级。取值必须为 0(默认值)或正整数。取值越大,优先级越高。
public int com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream.retryMaxCount = -1
流的最大重试次数,即总播放尝试次数(包含首次尝试)。例如,若取值为 3,则在首次播放失败后,播放器最多会再重试 2 次。取值如下:
-1(默认值):使用 VeLivePlayerConfiguration 中 retryMaxCount 的取值。0:不会尝试播放当前流。> 0:具体次数。public int com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream.retryIntervalTimeMs = -1
重试时间间隔。单位为 ms,默认值为 -1。若取值为 -1,则使用 VeLivePlayerConfiguration 中 retryIntervalTimeMs 的取值。
public VeLivePlayerProtocol com.ss.videoarch.liveplayer.VeLivePlayerStreamData.VeLivePlayerStream.protocol = VeLivePlayerProtocol.VeLivePlayerProtocolDefault
传输协议,详情请参见 VeLivePlayerProtocol。
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerFillMode
直播播放器画面的填充模式。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerFillModeAspectFit | 0 | 显示完整的视频帧。视频帧等比缩放,直至视频帧恰好在画布上全部显示。如果视频帧长宽比例与画布不同,视窗上未被视频帧填满区域将填充为黑色。 |
VeLivePlayerFillModeFullFill | 1 | 视频帧自适应画布。视频帧非等比缩放,直至填满画布。在此过程中,视频帧的长宽比例可能会发生变化。 |
VeLivePlayerFillModeAspectFill | 2 | 视频填满画布。视频帧等比缩放,直至填满画布,超出屏幕的部分将被裁剪,画面可能不完整。 |
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerPixelFormat
视频帧像素格式。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerPixelFormatUnknown | 0 | 未知格式。 |
VeLivePlayerPixelFormatRGBA32 | 1 | RGBA8888 格式。 |
VeLivePlayerPixelFormatTexture | 2 | 纹理格式。 |
VeLivePlayerPixelFormatI420 | 3 | YUV420P 格式。 |
public class com.ss.videoarch.liveplayer.VeLivePlayerStatistics
播放周期性统计信息。
类型 | 默认值 | 名称 |
|---|---|---|
String |
| |
boolean |
| |
String |
| |
long |
| |
long |
| |
long |
| |
int |
| |
int |
| |
float |
| |
long |
| |
long |
| |
long |
| |
VeLivePlayerFormat |
| |
VeLivePlayerProtocol |
|
public String com.ss.videoarch.liveplayer.VeLivePlayerStatistics.url
当前直播的播放地址。
public boolean com.ss.videoarch.liveplayer.VeLivePlayerStatistics.isHardwareDecode
是否使用硬件解码。
public String com.ss.videoarch.liveplayer.VeLivePlayerStatistics.videoCodec
视频的编码类型。
public long com.ss.videoarch.liveplayer.VeLivePlayerStatistics.stallTimeMs
从当前视频开始播放起,累计的卡顿时长,单位为 ms。
public long com.ss.videoarch.liveplayer.VeLivePlayerStatistics.bandwidthEstimation
带宽预测 ,单位为 kbps
public long com.ss.videoarch.liveplayer.VeLivePlayerStatistics.delayMs
当前播放延时,单位为 ms。
public int com.ss.videoarch.liveplayer.VeLivePlayerStatistics.width
当前播放视频的宽度,单位为 px。
public int com.ss.videoarch.liveplayer.VeLivePlayerStatistics.height
当前播放视频的高度,单位为 px。
public float com.ss.videoarch.liveplayer.VeLivePlayerStatistics.fps
当前播放视频的帧率,单位为 fps。
public long com.ss.videoarch.liveplayer.VeLivePlayerStatistics.bitrate
实时下载的码率,单位为 kbps。
public long com.ss.videoarch.liveplayer.VeLivePlayerStatistics.videoBufferMs
视频播放的缓冲区 buffer 大小,单位为 ms。
public long com.ss.videoarch.liveplayer.VeLivePlayerStatistics.audioBufferMs
音频播放的缓冲区 buffer 大小,单位为 ms。
public VeLivePlayerFormat com.ss.videoarch.liveplayer.VeLivePlayerStatistics.format
当前播放的视频格式。详见 VeLivePlayerFormat。
public VeLivePlayerProtocol com.ss.videoarch.liveplayer.VeLivePlayerStatistics.protocol
当前播放的传输协议。详见 VeLivePlayerProtocol。
public class com.ss.videoarch.liveplayer.VeLivePlayerVideoFrame
视频帧数据。
类型 | 默认值 | 名称 |
|---|---|---|
VeLivePlayerVideoBufferType |
| |
VeLivePlayerPixelFormat |
| |
int |
| |
int |
| |
long |
| |
VeLivePlayerVideoTexture | null | |
ByteBuffer | null | |
byte[] | null |
public VeLivePlayerVideoBufferType com.ss.videoarch.liveplayer.VeLivePlayerVideoFrame.bufferType
视频帧数据封装格式。详情请参见 VeLivePlayerVideoBufferType。
public VeLivePlayerPixelFormat com.ss.videoarch.liveplayer.VeLivePlayerVideoFrame.pixelFormat
视频帧像素格式。详情请参见 VeLivePlayerPixelFormat。
public int com.ss.videoarch.liveplayer.VeLivePlayerVideoFrame.width
视频宽度,单位为 px。
public int com.ss.videoarch.liveplayer.VeLivePlayerVideoFrame.height
视频高度,单位为 px。
public long com.ss.videoarch.liveplayer.VeLivePlayerVideoFrame.pts
视频帧的渲染时间戳。单位为 ms。
public VeLivePlayerVideoTexture com.ss.videoarch.liveplayer.VeLivePlayerVideoFrame.texture = null
OpenGL 渲染的视频纹理数据。如果将 VeLivePlayerPixelFormat 设置为VeLivePlayerPixelFormatTexture,并将 VeLivePlayerVideoBufferType 设置为VeLivePlayerVideoBufferTypeTexture,SDK 会返回此视频数据类型。有关详细信息,请参阅VeLivePlayerVideoTexture。
public ByteBuffer com.ss.videoarch.liveplayer.VeLivePlayerVideoFrame.buffer = null
ByteBuffer 格式的视频数据。如果将 VeLivePlayerPixelFormat设置为VeLivePlayerPixelFormatRGBA32,并将 VeLivePlayerVideoBufferType 设置为VeLivePlayerVideoBufferTypeByteBuffer,则 SDK 会返回此视频数据类型。
public byte [] com.ss.videoarch.liveplayer.VeLivePlayerVideoFrame.data = null
ByteArray 格式的视频数据。如果将 VeLivePlayerPixelFormat 设置为“VeLivePlayerPixelFormatRGBA32”,并将 VeLivePlayerVideoBufferType 设置为“VeLivePlayerVideoBufferTypeByteArray”,则 SDK 会返回这种视频数据类型。
public class com.ss.videoarch.liveplayer.VeLivePlayerVideoTexture
播放器视频纹理格式。
类型 | 默认值 | 名称 |
|---|---|---|
int |
| |
EGLContext |
|
public int com.ss.videoarch.liveplayer.VeLivePlayerVideoTexture.texId
视频纹理 ID。
public EGLContext com.ss.videoarch.liveplayer.VeLivePlayerVideoTexture.eglContext
OpenGL ES 图形上下文环境,用于自定义渲染。将 EGLContext 绑定到 GLSurfaceView 或 TextureView 上,您可以在被绑定的 View 上进行自定义的 OpenGL ES 渲染。
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerStreamType
直播播放流类型。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerStreamTypeMain | 0 | 主路流。 |
VeLivePlayerStreamTypeBackup | 1 | 备路流。 |
public class com.ss.videoarch.liveplayer.VeLivePlayerProperty
高级配置。
类型 | 默认值 | 名称 |
|---|---|---|
String | "VeLivePlayerKeySetParamsLowLatencyFLV" | |
String | "VeLivePlayerKeySetParamsHttpHeaders" | |
String | "VeLivePlayerKeySetParamsRemoveQueryParams" |
public static final String com.ss.videoarch.liveplayer.VeLivePlayerProperty.VeLivePlayerKeySetParamsLowLatencyFLV = "VeLivePlayerKeySetParamsLowLatencyFLV"
设置 FLV 低延时(延时 2-3 秒)参数配置。具体使用方法,详见 FLV 低延时。
public static final String com.ss.videoarch.liveplayer.VeLivePlayerProperty.VeLivePlayerKeySetParamsHttpHeaders = "VeLivePlayerKeySetParamsHttpHeaders"
设置播放器发起 HTTP 请求时携带的自定义请求头。常用于传递鉴权令牌(Token)、Cookie 或业务追踪标识等额外信息。具体使用方法,详见自定义 HTTP 请求头。
public static final String com.ss.videoarch.liveplayer.VeLivePlayerProperty.VeLivePlayerKeySetParamsRemoveQueryParams = "VeLivePlayerKeySetParamsRemoveQueryParams"
设置是否去除 SDK 自动拼接到拉流地址中的 Query 参数,默认值为 false。开启后,实际请求地址会去除 SDK 自动拼接的 Query 参数,并保留原始拉流地址中已有的 Query 参数。具体使用方法,详见去除 SDK 自动拼接的 Query 参数。
true:去除 SDK 自动拼接的 Query 参数。false:保留 SDK 自动拼接的 Query 参数。public enum com.ss.videoarch.liveplayer.log.VeLivePlayerLogConfig.VeLivePlayerLogLevel
直播播放器日志打印级别。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerLogLevelVerbose | 0 | 输出 VERBOSE、DEBUG、INFO、WARNING 和 ERROR 级别的日志。 |
VeLivePlayerLogLevelDebug | 1 | 输出 DEBUG、INFO、WARNING 和 ERROR 级别的日志。 |
VeLivePlayerLogLevelInfo | 2 | 输出 INFO、WARNING 和 ERROR 级别的日志。 |
VeLivePlayerLogLevelWarn | 3 | 输出 WARNING 和 ERROR 级别的日志。 |
VeLivePlayerLogLevelError | 4 | 输出 ERROR 级别的日志。 |
VeLivePlayerLogLevelNone | 5 | 关闭日志打印。 |
public class com.ss.videoarch.liveplayer.VeLivePlayerAudioFrame
音频帧数据。
类型 | 默认值 | 名称 |
|---|---|---|
VeLivePlayerAudioBufferType |
| |
int |
| |
int |
| |
int |
| |
long |
| |
byte[] | null | |
ByteBuffer[] | null | |
int |
|
public VeLivePlayerAudioBufferType com.ss.videoarch.liveplayer.VeLivePlayerAudioFrame.bufferType
音频帧数据封装格式,详情请参见 VeLivePlayerAudioBufferType。
public int com.ss.videoarch.liveplayer.VeLivePlayerAudioFrame.sampleRate
音频采样率,单位为 Hz。
public int com.ss.videoarch.liveplayer.VeLivePlayerAudioFrame.channels
声道数。
public int com.ss.videoarch.liveplayer.VeLivePlayerAudioFrame.bitDepth
音频位深度。
public long com.ss.videoarch.liveplayer.VeLivePlayerAudioFrame.pts
音频渲染时间戳。单位为 ms。
public byte [] com.ss.videoarch.liveplayer.VeLivePlayerAudioFrame.bufferArray = null
PCM 音频数据。byte[]类型
public ByteBuffer [] com.ss.videoarch.liveplayer.VeLivePlayerAudioFrame.buffer = null
PCM 音频数据。ByteBuffer[]类型
public int com.ss.videoarch.liveplayer.VeLivePlayerAudioFrame.samples
音频采样点个数。
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerAudioBufferType
音频数据封装格式。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerAudioBufferTypeUnknown | 0 | 未知格式。 |
VeLivePlayerAudioBufferTypeByteArray | 1 | ByteArray 格式。 |
public enum com.ss.videoarch.liveplayer.VeLivePlayerDef.VeLivePlayerRotation
视频顺时针旋转角度。
类型 | 值 | 说明 |
|---|---|---|
VeLivePlayerRotation0 | 0 | 关闭旋转。 |
VeLivePlayerRotation90 | 1 | 顺时针旋转 90 度。 |
VeLivePlayerRotation180 | 2 | 顺时针旋转 180 度。 |
VeLivePlayerRotation270 | 3 | 顺时针旋转 270 度。 |
public class com.ss.videoarch.liveplayer.hls.VeLivePlayerStreamInfo
HLS 视频流信息。
| 名称 | 类型 | 默认值 |
|---|---|---|
| width | int | - |
| height | int | - |
| bandwidth | int | - |
| url | String | - |
| 名称 | 返回 |
|---|---|
| toString | String |
public int com.ss.videoarch.liveplayer.hls.VeLivePlayerStreamInfo.width
视频宽度,单位为 px。
public int com.ss.videoarch.liveplayer.hls.VeLivePlayerStreamInfo.height
视频高度,单位为 px。
public int com.ss.videoarch.liveplayer.hls.VeLivePlayerStreamInfo.bandwidth
流带宽,单位为比特/秒(bps)。
public String com.ss.videoarch.liveplayer.hls.VeLivePlayerStreamInfo.url
HLS 协议的视频流播放地址。
public String com.ss.videoarch.liveplayer.hls.VeLivePlayerStreamInfo.toString()
将 HLS 视频流信息转换为字符串。
返回值
包含 HLS 流的视频宽度、视频高度、流带宽和播放地址的字符串。