直播
时间戳校对方案
更新时间: 2021/11/04 14:13:41
CDN透传方案的时间戳校对
API介绍
- 查询透传时间戳
- 监听透传时间戳
API原型
/**
同步时间戳监听
@param interval 查询间隔,单位毫秒
@param callback 查询结果
*/
@property (nonatomic, readonly) NSTimeInterval currentPlaybackRealTime;
/**
真实时间戳监听
@param interval 查询间隔,单位毫秒
@param callback 查询结果
*/
- (void)setRealTimeListenerWithIntervalMS:(NSTimeInterval)intervalMS
callback:(NELPCurrentTimestampCallCB)callback;
参数介绍
参数 | 类型 | 说明 |
---|---|---|
currentPlaybackRealTime | NSTimeInterval | 推流端透传的时间戳 |
intervalMS | NSTimeInterval | 上报透传时间戳的间隔 |
callback | NELPCurrentTimestampCallCB | 上报的透传时间戳 |
示例
无
特殊说明
- 给用户提供两种不同的方式查询当前透传的时间戳。
- 为节省性能,监听方式建议在需要的时候开启,不需要的时候传入回调nil,进行关闭。
视频流同步方案的时间戳校对
API介绍
- 查询同步时间戳
- 监听同步时间戳
API原型
/**
同步时间戳监听
@param interval 查询间隔,单位毫秒
@param callback 查询结果
*/
@property (nonatomic, readonly) NSTimeInterval currentSyncTimestamp;
/**
同步时间戳监听
@param interval 查询间隔,单位毫秒
@param callback 查询结果
*/
- (void)setSyncTimestampListenerWithIntervalMS:(NSTimeInterval)intervalMS
callback:(NELPCurrentTimestampCallCB)callback;
参数介绍
参数 | 类型 | 说明 |
---|---|---|
currentPlaybackRealTime | NSTimeInterval | 推流端同步的时间戳 |
intervalMS | NSTimeInterval | 上报同步时间戳的间隔 |
callback | NELPCurrentTimestampCallCB | 上报的同步时间戳 |
示例
无
特殊说明
- 给用户提供两种不同的方式查询当前同步的时间戳。
- 为节省性能,监听方式建议在需要的时候开启,不需要的时候传入回调nil,进行关闭。
此文档是否对你有帮助?
有帮助
我要吐槽