question
stringlengths
1
57
tag
stringclasses
18 values
response
stringlengths
112
68.3k
content
stringlengths
238
68.5k
__index_level_0__
int64
0
12k
QNLiveStreamingListener
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLiveStreamingListener # QNLiveStreamingListener 最近更新时间: 2022-05-12 20:09:53 在 CDN 转推中,通过设置该回调来监听 CDN 流的状态。可通过调用 [QNRTCClient.setLiveStreamingListener](https://developer.qiniu.com/rtc/8658/QNLiveStreamingListener/8684) 接口传入。 Index Core Methods * onStarted * onStopped * onTranscodingTracksUpdated * onError Core Methods onStarted * void onStarted(String streamID) * 转推任务成功创建时触发此回调 > 仅自定义合流转推任务会触发此回调,默认合流任务不会触发 Parameters * streamID: String 转推成功的 streamID onStopped * void onStopped(String streamID) * 转推任务成功停止时触发此回调 > 仅自定义合流转推任务会触发此回调,默认合流任务不会触发 Parameters * streamID: String 停止转推的 streamID onTranscodingTracksUpdated * void onTranscodingTracksUpdated(String streamID) * 转推任务合流布局更新时触发此回调 Parameters * streamID: String 布局更新的 streamID onError * void onError(String streamID, [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/8658/QNLiveStreamingListener/8657/QNLiveStreamingErrorInfo) errorInfo) * 转推任务出错时触发此回调 Parameters * streamID: String 出现错误的 streamID * errorInfo: [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/8658/QNLiveStreamingListener/8657/QNLiveStreamingErrorInfo) 详细错误原因 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLiveStreamingListener # QNLiveStreamingListener 最近更新时间: 2022-05-12 20:09:53 在 CDN 转推中,通过设置该回调来监听 CDN 流的状态。可通过调用 [QNRTCClient.setLiveStreamingListener](https://developer.qiniu.com/rtc/8658/QNLiveStreamingListener/8684) 接口传入。 Index Core Methods * onStarted * onStopped * onTranscodingTracksUpdated * onError Core Methods onStarted * void onStarted(String streamID) * 转推任务成功创建时触发此回调 > 仅自定义合流转推任务会触发此回调,默认合流任务不会触发 Parameters * streamID: String 转推成功的 streamID onStopped * void onStopped(String streamID) * 转推任务成功停止时触发此回调 > 仅自定义合流转推任务会触发此回调,默认合流任务不会触发 Parameters * streamID: String 停止转推的 streamID onTranscodingTracksUpdated * void onTranscodingTracksUpdated(String streamID) * 转推任务合流布局更新时触发此回调 Parameters * streamID: String 布局更新的 streamID onError * void onError(String streamID, [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/8658/QNLiveStreamingListener/8657/QNLiveStreamingErrorInfo) errorInfo) * 转推任务出错时触发此回调 Parameters * streamID: String 出现错误的 streamID * errorInfo: [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/8658/QNLiveStreamingListener/8657/QNLiveStreamingErrorInfo) 详细错误原因 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,914
QNLiveStreamingErrorInfo
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLiveStreamingErrorInfo # QNLiveStreamingErrorInfo 最近更新时间: 2024-02-27 17:00:56 CDN 异常信息 Index Properties * type * code * message Enum * Type Properties type * type: [Type](https://developer.qiniu.com/rtc/api/8657/QNLiveStreamingErrorInfo#Type) * 出现异常的操作类型 code | describe | message ---|---|--- START | 开始转推操作异常 | STOP | 停止转推操作异常 | UPDATE | 更改合流布局配置操作异常 | code * code: int * 异常的错误码,指代具体出现错误的原因 code | describe | message ---|---|--- ERROR_NO_PERMISSION | 无操作权限 | 请检查用户的操作权限 ERROR_INVALID_STATE | 状态异常 | 请检查房间状态,加入房间后才可以创建转推任务 ERROR_INVALID_PARAMETER | 参数错误 | 请检查参数是否合法 ERROR_NETWORK_TIMEOUT | 操作超时 | 请重新尝试操作 ERROR_FATAL | 服务端错误 | 请重新尝试操作 ERROR_LIVE_STREAMING_CLOSED | 转推流异常断开 | 请重新创建转推任务 message * message: String * 异常信息的文字描述 Enum Type * Type declaration * START * STOP * UPDATE 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLiveStreamingErrorInfo # QNLiveStreamingErrorInfo 最近更新时间: 2024-02-27 17:00:56 CDN 异常信息 Index Properties * type * code * message Enum * Type Properties type * type: [Type](https://developer.qiniu.com/rtc/api/8657/QNLiveStreamingErrorInfo#Type) * 出现异常的操作类型 code | describe | message ---|---|--- START | 开始转推操作异常 | STOP | 停止转推操作异常 | UPDATE | 更改合流布局配置操作异常 | code * code: int * 异常的错误码,指代具体出现错误的原因 code | describe | message ---|---|--- ERROR_NO_PERMISSION | 无操作权限 | 请检查用户的操作权限 ERROR_INVALID_STATE | 状态异常 | 请检查房间状态,加入房间后才可以创建转推任务 ERROR_INVALID_PARAMETER | 参数错误 | 请检查参数是否合法 ERROR_NETWORK_TIMEOUT | 操作超时 | 请重新尝试操作 ERROR_FATAL | 服务端错误 | 请重新尝试操作 ERROR_LIVE_STREAMING_CLOSED | 转推流异常断开 | 请重新创建转推任务 message * message: String * 异常信息的文字描述 Enum Type * Type declaration * START * STOP * UPDATE 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,916
QNLocalVideoTrackStats
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLocalVideoTrackStats # QNLocalVideoTrackStats 最近更新时间: 2023-08-17 15:20:30 近端视频轨道的统计数据,可以通过 [QNRTCClient.getLocalVideoTrackStats](https://developer.qiniu.com/rtc/8664/QNLocalVideoTrackStats/8684) 获取,通过 trackID 获取对应轨道的统计信息 > 如果发布时通过 > [QNCameraVideoTrackConfig.setMultiProfileEnabled](https://developer.qiniu.com/rtc/8664/QNLocalVideoTrackStats/8642) > 等接口开启了大小流功能,则返回的 List 中包含多个 QNLocalVideoTrackStats,每个对应不同的 > [QNTrackProfile](https://developer.qiniu.com/rtc/8664/QNLocalVideoTrackStats/10056/QNTrackProfile) Index Properties * profile * uplinkFrameRate * uplinkBitrate * uplinkRTT * uplinkLostRate * uplinkFrameWidth * uplinkFrameHeight * captureFrameRate * captureFrameWidth * captureFrameHeight * targetFrameRate * targetFrameWidth * targetFrameHeight Properties profile * profile: [QNTrackProfile](https://developer.qiniu.com/rtc/8664/QNLocalVideoTrackStats/10056/QNTrackProfile) * 近端视频上行 profile uplinkFrameRate * uplinkFrameRate: int * 近端视频上行帧率 uplinkBitrate * uplinkBitrate: int * 近端视频上行码率,单位 bps uplinkRTT * uplinkRTT: int * 近端视频上行网络延时,单位毫秒 uplinkLostRate * uplinkLostRate: int * 近端视频上行丢包率百分比,范围 [0, 100] uplinkFrameWidth * uplinkFrameWidth: int * 近端上行视频帧的宽度,该数值为 SDK 实际对齐后编码发布的视频帧宽度 uplinkFrameHeight * uplinkFrameHeight: int * 近端上行视频帧的高度,该数值为 SDK 实际对齐后编码发布的视频帧高度 captureFrameRate * captureFrameRate: int * 本地采集的视频帧率,单位 fps captureFrameWidth * captureFrameWidth: int * 本地采集的视频帧宽度 captureFrameHeight * captureFrameHeight: int * 本地采集的视频帧高度 targetFrameRate * targetFrameRate: int * 期望的视频编码帧率,单位 fps targetFrameWidth * targetFrameWidth: int * 期望的视频编码宽度 targetFrameHeight * targetFrameHeight: int * 期望的视频编码高度 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLocalVideoTrackStats # QNLocalVideoTrackStats 最近更新时间: 2023-08-17 15:20:30 近端视频轨道的统计数据,可以通过 [QNRTCClient.getLocalVideoTrackStats](https://developer.qiniu.com/rtc/8664/QNLocalVideoTrackStats/8684) 获取,通过 trackID 获取对应轨道的统计信息 > 如果发布时通过 > [QNCameraVideoTrackConfig.setMultiProfileEnabled](https://developer.qiniu.com/rtc/8664/QNLocalVideoTrackStats/8642) > 等接口开启了大小流功能,则返回的 List 中包含多个 QNLocalVideoTrackStats,每个对应不同的 > [QNTrackProfile](https://developer.qiniu.com/rtc/8664/QNLocalVideoTrackStats/10056/QNTrackProfile) Index Properties * profile * uplinkFrameRate * uplinkBitrate * uplinkRTT * uplinkLostRate * uplinkFrameWidth * uplinkFrameHeight * captureFrameRate * captureFrameWidth * captureFrameHeight * targetFrameRate * targetFrameWidth * targetFrameHeight Properties profile * profile: [QNTrackProfile](https://developer.qiniu.com/rtc/8664/QNLocalVideoTrackStats/10056/QNTrackProfile) * 近端视频上行 profile uplinkFrameRate * uplinkFrameRate: int * 近端视频上行帧率 uplinkBitrate * uplinkBitrate: int * 近端视频上行码率,单位 bps uplinkRTT * uplinkRTT: int * 近端视频上行网络延时,单位毫秒 uplinkLostRate * uplinkLostRate: int * 近端视频上行丢包率百分比,范围 [0, 100] uplinkFrameWidth * uplinkFrameWidth: int * 近端上行视频帧的宽度,该数值为 SDK 实际对齐后编码发布的视频帧宽度 uplinkFrameHeight * uplinkFrameHeight: int * 近端上行视频帧的高度,该数值为 SDK 实际对齐后编码发布的视频帧高度 captureFrameRate * captureFrameRate: int * 本地采集的视频帧率,单位 fps captureFrameWidth * captureFrameWidth: int * 本地采集的视频帧宽度 captureFrameHeight * captureFrameHeight: int * 本地采集的视频帧高度 targetFrameRate * targetFrameRate: int * 期望的视频编码帧率,单位 fps targetFrameWidth * targetFrameWidth: int * 期望的视频编码宽度 targetFrameHeight * targetFrameHeight: int * 期望的视频编码高度 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,918
QNLocalAudioTrackStats
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLocalAudioTrackStats # QNLocalAudioTrackStats 最近更新时间: 2022-05-12 20:09:51 近端音频轨道的统计数据,可以通过 [QNRTCClient.getLocalAudioTrackStats](https://developer.qiniu.com/rtc/8661/QNLocalAudioTrackStats/8684) 获取,并通过 trackID 来获取对应轨道的统计信息。 Index Properties * uplinkBitrate * uplinkRTT * uplinkLostRate Properties uplinkBitrate * uplinkBitrate: int * 近端音频上行码率,单位 bps uplinkRTT * uplinkRTT: int * 近端音频上行网络延时,单位毫秒 uplinkLostRate * uplinkLostRate: int * 近端音频上行丢包率百分比,范围 [0, 100] 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLocalAudioTrackStats # QNLocalAudioTrackStats 最近更新时间: 2022-05-12 20:09:51 近端音频轨道的统计数据,可以通过 [QNRTCClient.getLocalAudioTrackStats](https://developer.qiniu.com/rtc/8661/QNLocalAudioTrackStats/8684) 获取,并通过 trackID 来获取对应轨道的统计信息。 Index Properties * uplinkBitrate * uplinkRTT * uplinkLostRate Properties uplinkBitrate * uplinkBitrate: int * 近端音频上行码率,单位 bps uplinkRTT * uplinkRTT: int * 近端音频上行网络延时,单位毫秒 uplinkLostRate * uplinkLostRate: int * 近端音频上行丢包率百分比,范围 [0, 100] 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,921
QNRemoteVideoTrackStats
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNRemoteVideoTrackStats # QNRemoteVideoTrackStats 最近更新时间: 2023-08-17 15:28:24 远端视频轨道的统计数据,可以通过 [QNRTCClient.getRemoteVideoTrackStats](https://developer.qiniu.com/rtc/8681/QNRemoteVideoTrackStats/8684) 获取,并通过 TrackID 来获取对应轨道的统计信息。 Index Properties * profile * downlinkFrameRate * downlinkBitrate * downlinkLostRate * uplinkRTT * uplinkLostRate * uplinkFrameWidth * uplinkFrameHeight Properties profile * profile: [QNTrackProfile](https://developer.qiniu.com/rtc/8681/QNRemoteVideoTrackStats/10056/QNTrackProfile) * 远端视频 profile(当前应用正在接收的视频轨道的 profile) downlinkFrameRate * downlinkFrameRate: int * 远端视频下行帧率(当前应用正在下载的轨道的帧率) downlinkBitrate * downlinkBitrate: int * 远端视频下行码率,单位 bps(当前应用下载对应轨道时的码率,和远端用户上行无关) downlinkLostRate * downlinkLostRate: int * 远端视频下行丢包率,范围 [0, 100](当前应用下载对应轨道时的丢包率,和远端用户上行无关) uplinkRTT * uplinkRTT: int * 远端视频上行网络时延,单位毫秒(表示远端用户上传自身视频数据时的延时) uplinkLostRate * uplinkLostRate: int * 远端视频上行丢包率百分比,范围 [0, 100](表示远端用户上传自身音频数据时的丢包率) uplinkFrameWidth * uplinkFrameWidth: int * 远端上行视频帧宽度(表示远端用户编码输出的视频宽度) uplinkFrameHeight * uplinkFrameHeight: int * 远端上行视频帧高度(表示远端用户编码输出的视频高度) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNRemoteVideoTrackStats # QNRemoteVideoTrackStats 最近更新时间: 2023-08-17 15:28:24 远端视频轨道的统计数据,可以通过 [QNRTCClient.getRemoteVideoTrackStats](https://developer.qiniu.com/rtc/8681/QNRemoteVideoTrackStats/8684) 获取,并通过 TrackID 来获取对应轨道的统计信息。 Index Properties * profile * downlinkFrameRate * downlinkBitrate * downlinkLostRate * uplinkRTT * uplinkLostRate * uplinkFrameWidth * uplinkFrameHeight Properties profile * profile: [QNTrackProfile](https://developer.qiniu.com/rtc/8681/QNRemoteVideoTrackStats/10056/QNTrackProfile) * 远端视频 profile(当前应用正在接收的视频轨道的 profile) downlinkFrameRate * downlinkFrameRate: int * 远端视频下行帧率(当前应用正在下载的轨道的帧率) downlinkBitrate * downlinkBitrate: int * 远端视频下行码率,单位 bps(当前应用下载对应轨道时的码率,和远端用户上行无关) downlinkLostRate * downlinkLostRate: int * 远端视频下行丢包率,范围 [0, 100](当前应用下载对应轨道时的丢包率,和远端用户上行无关) uplinkRTT * uplinkRTT: int * 远端视频上行网络时延,单位毫秒(表示远端用户上传自身视频数据时的延时) uplinkLostRate * uplinkLostRate: int * 远端视频上行丢包率百分比,范围 [0, 100](表示远端用户上传自身音频数据时的丢包率) uplinkFrameWidth * uplinkFrameWidth: int * 远端上行视频帧宽度(表示远端用户编码输出的视频宽度) uplinkFrameHeight * uplinkFrameHeight: int * 远端上行视频帧高度(表示远端用户编码输出的视频高度) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,923
QNRemoteAudioTrackStats
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNRemoteAudioTrackStats # QNRemoteAudioTrackStats 最近更新时间: 2022-05-12 20:08:44 远端音频轨道的统计数据,可以通过 [QNRTCClient.getRemoteAudioTrackStats](https://developer.qiniu.com/rtc/8675/QNRemoteAudioTrackStats/8684) 获取,并通过 trackID 来获取对应轨道的统计信息。 Index Properties * downlinkBitrate * downlinkLostRate * uplinkRTT * uplinkLostRate Properties downlinkBitrate * downlinkBitrate: int * 远端音频下行码率,单位 bps(当前应用下载对应轨道时的码率,和远端用户上行无关) downlinkLostRate * downlinkLostRate: int * 远端音频下行丢包率,范围 [0, 100](当前应用下载对应轨道时的丢包率,和远端用户上行无关) uplinkRTT * uplinkRTT: int * 远端音频上行网络延时,单位毫秒(表示远端用户上传自身音频数据时的延时) uplinkLostRate * uplinkLostRate: int * 远端音频上行丢包率百分比,范围 [0, 100](表示远端用户上传自身音频数据时的丢包率) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNRemoteAudioTrackStats # QNRemoteAudioTrackStats 最近更新时间: 2022-05-12 20:08:44 远端音频轨道的统计数据,可以通过 [QNRTCClient.getRemoteAudioTrackStats](https://developer.qiniu.com/rtc/8675/QNRemoteAudioTrackStats/8684) 获取,并通过 trackID 来获取对应轨道的统计信息。 Index Properties * downlinkBitrate * downlinkLostRate * uplinkRTT * uplinkLostRate Properties downlinkBitrate * downlinkBitrate: int * 远端音频下行码率,单位 bps(当前应用下载对应轨道时的码率,和远端用户上行无关) downlinkLostRate * downlinkLostRate: int * 远端音频下行丢包率,范围 [0, 100](当前应用下载对应轨道时的丢包率,和远端用户上行无关) uplinkRTT * uplinkRTT: int * 远端音频上行网络延时,单位毫秒(表示远端用户上传自身音频数据时的延时) uplinkLostRate * uplinkLostRate: int * 远端音频上行丢包率百分比,范围 [0, 100](表示远端用户上传自身音频数据时的丢包率) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,926
QNAudioMusicMixer
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMusicMixer # QNAudioMusicMixer 最近更新时间: 2022-11-24 18:23:58 背景音乐混音控制类,提供了控制背景音乐混音一系列方法。 > 1\. 当前仅支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/8667/QNMicrophoneAudioTrack) > 的背景音乐混音操作 > > 2\. 混音需要加入房间并且成功发布后才会生效,因此,需要注意调用的时机 > > 3\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,重新调用 > [QNMicrophoneAudioTrack.createAudioMusicMixer](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/8667) > 创建本类的实例即可 > > 4\. > 若您希望在混合背景音乐的同时添加音效,可参考音效混音接口([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11923/QNAudioEffectMixer)) Index Core Methods * setPublishEnabled * isPublishEnabled * getDuration * start[1/2] * start[2/2] * stop * resume * pause * getCurrentPosition * seekTo * setMixingVolume * getMixingVolume * setMusicVolume * getMusicVolume * setStartPosition * getStartPosition Core Methods setPublishEnabled * void setPublishEnabled(boolean enabled) * 设置是否推送到远端,默认推送 Parameters * enabled: boolean false: 只在本地播放音乐,true: 将本地播放的音乐发布至远端 isPublishEnabled * boolean isPublishEnabled() * 是否推送到远端 Returns false: 只在本地播放音效, true: 将本地播放的音效发布至远端 getDuration * static long getDuration(String filePath) * 获取指定音频文件的总时长,单位:ms > 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程 Returns 音频文件总时长,单位:ms start[1/2] * void start() * 开始混音并播放,音频只混一次,不做循环混音操作 混音开始后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 混音过程中会回调 [QNAudioMusicMixerListener.onMixing](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 方法 start[2/2] * void start(int loopCount) * 开始指定次数的混音并播放 混音开始后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 混音过程中会回调 [QNAudioMusicMixerListener.onMixing](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 方法 Parameters * loopCount: int 混音次数,-1 为无限循环,0 则不做混音,其他则为指定次数的混音 stop * void stop() * 停止混音操作 混音停止后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.STOPPED](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 resume * void resume() * 恢复混音操作 混音恢复后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 pause * void pause() * 暂停混音操作 混音暂停后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.PAUSED](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 getCurrentPosition * long getCurrentPosition() * 获取当前音频混音的位置,单位: ms Returns 当前音频混音的位置,单位: ms seekTo * void seekTo(long position) * 跳到指定位置混音 成功跳到指定位置混音后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 Parameters * position: long 指定位置的时间戳,单位: ms setMixingVolume * void setMixingVolume(float musicVolume) * 设置背景音乐的混音音量,默认音量为 1.0f > 该接口已废弃,请使用 setMusicVolume Parameters * musicVolume: float 背景音乐混音音量,[0.0f - 1.0f] getMixingVolume * float getMixingVolume() * 该接口已废弃,请使用 getMusicVolume Returns 背景音乐混音的音量,[0.0f - 1.0f] setMusicVolume * void setMusicVolume(float musicVolume) * 设置背景音乐的混音音量,默认音量为 1.0f > 若想修改混音中麦克风采集音频的音量,可通过 > [QNMicrophoneAudioTrack.setVolume](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/8667) > 接口实现 Parameters * musicVolume: float 背景音乐混音音量,[0.0f - 1.0f] getMusicVolume * float getMusicVolume() * 获取背景音乐混音的音量 Returns 背景音乐混音的音量,[0.0f - 1.0f] setStartPosition * void setStartPosition(long position) * 设置背景音乐混音的起始位置,起始位置的有效值为 0 - duration 之间的值 Parameters * position: long 背景音乐混音的起始位置,单位:ms getStartPosition * long getStartPosition() * 获取背景音乐混音的起始位置 Returns 背景音乐混音的起始位置,单位:ms 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMusicMixer # QNAudioMusicMixer 最近更新时间: 2022-11-24 18:23:58 背景音乐混音控制类,提供了控制背景音乐混音一系列方法。 > 1\. 当前仅支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/8667/QNMicrophoneAudioTrack) > 的背景音乐混音操作 > > 2\. 混音需要加入房间并且成功发布后才会生效,因此,需要注意调用的时机 > > 3\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,重新调用 > [QNMicrophoneAudioTrack.createAudioMusicMixer](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/8667) > 创建本类的实例即可 > > 4\. > 若您希望在混合背景音乐的同时添加音效,可参考音效混音接口([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11923/QNAudioEffectMixer)) Index Core Methods * setPublishEnabled * isPublishEnabled * getDuration * start[1/2] * start[2/2] * stop * resume * pause * getCurrentPosition * seekTo * setMixingVolume * getMixingVolume * setMusicVolume * getMusicVolume * setStartPosition * getStartPosition Core Methods setPublishEnabled * void setPublishEnabled(boolean enabled) * 设置是否推送到远端,默认推送 Parameters * enabled: boolean false: 只在本地播放音乐,true: 将本地播放的音乐发布至远端 isPublishEnabled * boolean isPublishEnabled() * 是否推送到远端 Returns false: 只在本地播放音效, true: 将本地播放的音效发布至远端 getDuration * static long getDuration(String filePath) * 获取指定音频文件的总时长,单位:ms > 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程 Returns 音频文件总时长,单位:ms start[1/2] * void start() * 开始混音并播放,音频只混一次,不做循环混音操作 混音开始后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 混音过程中会回调 [QNAudioMusicMixerListener.onMixing](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 方法 start[2/2] * void start(int loopCount) * 开始指定次数的混音并播放 混音开始后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 混音过程中会回调 [QNAudioMusicMixerListener.onMixing](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 方法 Parameters * loopCount: int 混音次数,-1 为无限循环,0 则不做混音,其他则为指定次数的混音 stop * void stop() * 停止混音操作 混音停止后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.STOPPED](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 resume * void resume() * 恢复混音操作 混音恢复后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 pause * void pause() * 暂停混音操作 混音暂停后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.PAUSED](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 getCurrentPosition * long getCurrentPosition() * 获取当前音频混音的位置,单位: ms Returns 当前音频混音的位置,单位: ms seekTo * void seekTo(long position) * 跳到指定位置混音 成功跳到指定位置混音后会触发 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11919) 回调,并回调 [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/11920) 状态 Parameters * position: long 指定位置的时间戳,单位: ms setMixingVolume * void setMixingVolume(float musicVolume) * 设置背景音乐的混音音量,默认音量为 1.0f > 该接口已废弃,请使用 setMusicVolume Parameters * musicVolume: float 背景音乐混音音量,[0.0f - 1.0f] getMixingVolume * float getMixingVolume() * 该接口已废弃,请使用 getMusicVolume Returns 背景音乐混音的音量,[0.0f - 1.0f] setMusicVolume * void setMusicVolume(float musicVolume) * 设置背景音乐的混音音量,默认音量为 1.0f > 若想修改混音中麦克风采集音频的音量,可通过 > [QNMicrophoneAudioTrack.setVolume](https://developer.qiniu.com/rtc/11921/QNAudioMusicMixer/8667) > 接口实现 Parameters * musicVolume: float 背景音乐混音音量,[0.0f - 1.0f] getMusicVolume * float getMusicVolume() * 获取背景音乐混音的音量 Returns 背景音乐混音的音量,[0.0f - 1.0f] setStartPosition * void setStartPosition(long position) * 设置背景音乐混音的起始位置,起始位置的有效值为 0 - duration 之间的值 Parameters * position: long 背景音乐混音的起始位置,单位:ms getStartPosition * long getStartPosition() * 获取背景音乐混音的起始位置 Returns 背景音乐混音的起始位置,单位:ms 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,928
QNAudioMusicMixerListener
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMusicMixerListener # QNAudioMusicMixerListener 最近更新时间: 2022-06-02 20:39:08 混音过程中的回调监听函数,可以通过 [QNMicrophoneAudioTrack.createAudioMusicMixer](https://developer.qiniu.com/rtc/api/8667/QNMicrophoneAudioTrack#createAudioMusicMixer) 创建 [QNAudioMusicMixer](https://developer.qiniu.com/rtc/api/11921/QNAudioMusicMixer) 时传入,回调函数均通过 UI 线程回调。 Index Core Methods * onStateChanged * onMixing * onError Core Methods onStateChanged * void onStateChanged([QNAudioMusicMixerState](https://developer.qiniu.com/rtc/api/11920/QNAudioMusicMixerState) state) * 混音状态改变时触发此回调 > > [QNAudioMusicMixer.seekTo](https://developer.qiniu.com/rtc/api/11921/QNAudioMusicMixer#seekTo) > 操作成功后会触发 > [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/api/11920/QNAudioMusicMixerState#MIXING) > 状态的回调,可依赖该机制优化 seek 场景下的 UI 显示 Parameters * state: [QNAudioMusicMixerState](https://developer.qiniu.com/rtc/api/11920/QNAudioMusicMixerState) 当前的混音状态 onMixing * void onMixing(long position) * 混音操作进行过程中会不断触发此回调 Parameters * position: long 当前正在执行混音操作的音频帧时间戳,单位: ms onError * void onError(int errorCode, String errorMessage) * 混音操作发生错误时会触发此回调 code | describe | message ---|---|--- ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND | 混音源没有找到有效音轨 | 请检查混音文件的合法性 ERROR_AUDIO_MIXING_DECODER_EXCEPTION | 系统不支持混音源中的音频类型 | 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac ERROR_AUDIO_MIXING_SEEK_FAILED | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作 ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED | 重采样模块创建失败 | 请重新尝试混音操作 ERROR_AUDIO_MIXING_IO_EXCEPTION | 混音源文件 IO 错误 | 请检查混音源文件是否存在异常 Parameters * errorCode: int 混音异常时对应的错误码 * errorMessage: int 混音异常时对应的错误信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMusicMixerListener # QNAudioMusicMixerListener 最近更新时间: 2022-06-02 20:39:08 混音过程中的回调监听函数,可以通过 [QNMicrophoneAudioTrack.createAudioMusicMixer](https://developer.qiniu.com/rtc/api/8667/QNMicrophoneAudioTrack#createAudioMusicMixer) 创建 [QNAudioMusicMixer](https://developer.qiniu.com/rtc/api/11921/QNAudioMusicMixer) 时传入,回调函数均通过 UI 线程回调。 Index Core Methods * onStateChanged * onMixing * onError Core Methods onStateChanged * void onStateChanged([QNAudioMusicMixerState](https://developer.qiniu.com/rtc/api/11920/QNAudioMusicMixerState) state) * 混音状态改变时触发此回调 > > [QNAudioMusicMixer.seekTo](https://developer.qiniu.com/rtc/api/11921/QNAudioMusicMixer#seekTo) > 操作成功后会触发 > [QNAudioMusicMixerState.MIXING](https://developer.qiniu.com/rtc/api/11920/QNAudioMusicMixerState#MIXING) > 状态的回调,可依赖该机制优化 seek 场景下的 UI 显示 Parameters * state: [QNAudioMusicMixerState](https://developer.qiniu.com/rtc/api/11920/QNAudioMusicMixerState) 当前的混音状态 onMixing * void onMixing(long position) * 混音操作进行过程中会不断触发此回调 Parameters * position: long 当前正在执行混音操作的音频帧时间戳,单位: ms onError * void onError(int errorCode, String errorMessage) * 混音操作发生错误时会触发此回调 code | describe | message ---|---|--- ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND | 混音源没有找到有效音轨 | 请检查混音文件的合法性 ERROR_AUDIO_MIXING_DECODER_EXCEPTION | 系统不支持混音源中的音频类型 | 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac ERROR_AUDIO_MIXING_SEEK_FAILED | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作 ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED | 重采样模块创建失败 | 请重新尝试混音操作 ERROR_AUDIO_MIXING_IO_EXCEPTION | 混音源文件 IO 错误 | 请检查混音源文件是否存在异常 Parameters * errorCode: int 混音异常时对应的错误码 * errorMessage: int 混音异常时对应的错误信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,935
QNAudioMusicMixerState
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMusicMixerState # QNAudioMusicMixerState 最近更新时间: 2022-06-02 20:39:28 背景音乐混音相关的回调状态,通过 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11919) 接口回调 Index Properties * IDLE * MIXING * PAUSED * STOPPED * COMPLETED Properties IDLE * IDLE: QNAudioMusicMixerState * 混音控制器的初始状态 MIXING * MIXING: QNAudioMusicMixerState * 混音操作进行中的状态 当成功执行 [QNAudioMusicMixer.start](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921)、[QNAudioMusicMixer.resume](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921) 或者 [QNAudioMusicMixer.seekTo](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921) 后,会回调此状态 PAUSED * PAUSED: QNAudioMusicMixerState * 混音操作暂停时的状态 当成功执行 [QNAudioMusicMixer.pause](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921) 后,会回调此状态 STOPPED * STOPPED: QNAudioMusicMixerState * 混音操作停止时的状态 当成功执行 [QNAudioMusicMixer.stop](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921) 后,会回调此状态 COMPLETED * COMPLETED: QNAudioMusicMixerState * 混音操作完成时的状态 > 当且仅当指定循环次数混音完成后,会回调此状态 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMusicMixerState # QNAudioMusicMixerState 最近更新时间: 2022-06-02 20:39:28 背景音乐混音相关的回调状态,通过 [QNAudioMusicMixerListener.onStateChanged](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11919) 接口回调 Index Properties * IDLE * MIXING * PAUSED * STOPPED * COMPLETED Properties IDLE * IDLE: QNAudioMusicMixerState * 混音控制器的初始状态 MIXING * MIXING: QNAudioMusicMixerState * 混音操作进行中的状态 当成功执行 [QNAudioMusicMixer.start](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921)、[QNAudioMusicMixer.resume](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921) 或者 [QNAudioMusicMixer.seekTo](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921) 后,会回调此状态 PAUSED * PAUSED: QNAudioMusicMixerState * 混音操作暂停时的状态 当成功执行 [QNAudioMusicMixer.pause](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921) 后,会回调此状态 STOPPED * STOPPED: QNAudioMusicMixerState * 混音操作停止时的状态 当成功执行 [QNAudioMusicMixer.stop](https://developer.qiniu.com/rtc/11920/QNAudioMusicMixerState/11921) 后,会回调此状态 COMPLETED * COMPLETED: QNAudioMusicMixerState * 混音操作完成时的状态 > 当且仅当指定循环次数混音完成后,会回调此状态 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,938
QNAudioEffectMixer
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioEffectMixer # QNAudioEffectMixer 最近更新时间: 2023-08-17 15:22:46 音效混音控制类,提供了控制音效混音的一系列方法。 > 1\. 当前仅支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/8667/QNMicrophoneAudioTrack) > 的音效混音操作 > > 2\. 混音需要加入房间并且成功发布后才会生效,因此,需要注意调用的时机 Index Core Methods * createAudioEffect * start * setPublishEnabled * isPublishEnabled * stop * pause * resume * stopAll * pauseAll * resumeAll * getCurrentPosition * setVolume * getVolume * setAllEffectsVolume Core Methods createAudioEffect * [QNAudioEffect](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11922/QNAudioEffect) createAudioEffect(int effectID, String filePath); * 创建音效混音配置类实例,每一路参与混音的音效都需要对应一个 [QNAudioEffect](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11922/QNAudioEffect) 实例 > 支持本地和在线文件,支持的文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac Parameters * effectID: int 音效文件的唯一标识符,需自行生成并维护,且确保唯一 * filePath: String 音效文件地址,支持本地文件和在线文件 Returns 音效混音实例 start * boolean start(int effectID) * 开始音效混音 混音的次数可以通过 [QNAudioEffect.setLoopCount](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11922) 接口配置 音效混音结束时会触发 [QNAudioEffectMixerListener.onEffectFinished](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11924) 回调 音效混音出错会触发 [QNAudioEffectMixerListener.onEffectError](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11924) 回调 Parameters * effectID: int 音效文件的唯一标识符 Returns 接口是否调用成功 setPublishEnabled * void setPublishEnabled(int effectID, boolean enabled) * 设置是否推送到远端,默认推送 Parameters * effectID: int 音效文件的唯一标识符 * enabled: boolean false: 只在本地播放音效,true: 将本地播放的音效发布至远端 isPublishEnabled * boolean isPublishEnabled(int effectID) * 是否推送到远端 Parameters * effectID: int 音效文件的唯一标识符 Returns false: 只在本地播放音效, true: 将本地播放的音效发布至远端 stop * boolean stop(int effectID) * 停止音效混音 Parameters * effectID: int 音效文件的唯一标识符 Returns 接口是否调用成功 pause * boolean pause(int effectID) * 暂停音效混音 Parameters * effectID: int 音效文件的唯一标识符 Returns 接口是否调用成功 resume * boolean resume(int effectID) * 恢复音效混音 Parameters * effectID: int 音效文件的唯一标识符 Returns 接口是否调用成功 stopAll * boolean stopAll() * 停止所有正在混音的音效 Returns 接口是否调用成功 pauseAll * boolean pauseAll() * 暂停所有正在混音的音效 Returns 接口是否调用成功 resumeAll * boolean resumeAll() * 恢复所有暂停混音的音效 Returns 接口是否调用成功 getCurrentPosition * long getCurrentPosition(int effectID) * 获取指定音效混音的位置,单位: ms Parameters * effectID: int 音效文件的唯一标识符 Returns 指定音效混音的位置,单位: ms setVolume * void setVolume(int effectID, float volume) * 设置指定音效的混音音量,默认音量为 1.0f > 若想修改混音中麦克风采集音频的音量,可通过 > [QNMicrophoneAudioTrack.setVolume](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/8667) > 接口实现 Parameters * effectID: int 音效文件的唯一标识符 * volume: float 音效的混音音量,[0.0f - 1.0f] getVolume * float getVolume(int effectID) * 获取指定音效的混音音量 Parameters * effectID: int 音效文件的唯一标识符 Returns 指定音效的混音音量,[0.0f - 1.0f] setAllEffectsVolume * void setAllEffectsVolume(float volume) * 设置所有正在混音的音效的混音音量 Parameters * volume: float 音效的混音音量,[0.0f - 1.0f] 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioEffectMixer # QNAudioEffectMixer 最近更新时间: 2023-08-17 15:22:46 音效混音控制类,提供了控制音效混音的一系列方法。 > 1\. 当前仅支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/8667/QNMicrophoneAudioTrack) > 的音效混音操作 > > 2\. 混音需要加入房间并且成功发布后才会生效,因此,需要注意调用的时机 Index Core Methods * createAudioEffect * start * setPublishEnabled * isPublishEnabled * stop * pause * resume * stopAll * pauseAll * resumeAll * getCurrentPosition * setVolume * getVolume * setAllEffectsVolume Core Methods createAudioEffect * [QNAudioEffect](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11922/QNAudioEffect) createAudioEffect(int effectID, String filePath); * 创建音效混音配置类实例,每一路参与混音的音效都需要对应一个 [QNAudioEffect](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11922/QNAudioEffect) 实例 > 支持本地和在线文件,支持的文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac Parameters * effectID: int 音效文件的唯一标识符,需自行生成并维护,且确保唯一 * filePath: String 音效文件地址,支持本地文件和在线文件 Returns 音效混音实例 start * boolean start(int effectID) * 开始音效混音 混音的次数可以通过 [QNAudioEffect.setLoopCount](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11922) 接口配置 音效混音结束时会触发 [QNAudioEffectMixerListener.onEffectFinished](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11924) 回调 音效混音出错会触发 [QNAudioEffectMixerListener.onEffectError](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/11924) 回调 Parameters * effectID: int 音效文件的唯一标识符 Returns 接口是否调用成功 setPublishEnabled * void setPublishEnabled(int effectID, boolean enabled) * 设置是否推送到远端,默认推送 Parameters * effectID: int 音效文件的唯一标识符 * enabled: boolean false: 只在本地播放音效,true: 将本地播放的音效发布至远端 isPublishEnabled * boolean isPublishEnabled(int effectID) * 是否推送到远端 Parameters * effectID: int 音效文件的唯一标识符 Returns false: 只在本地播放音效, true: 将本地播放的音效发布至远端 stop * boolean stop(int effectID) * 停止音效混音 Parameters * effectID: int 音效文件的唯一标识符 Returns 接口是否调用成功 pause * boolean pause(int effectID) * 暂停音效混音 Parameters * effectID: int 音效文件的唯一标识符 Returns 接口是否调用成功 resume * boolean resume(int effectID) * 恢复音效混音 Parameters * effectID: int 音效文件的唯一标识符 Returns 接口是否调用成功 stopAll * boolean stopAll() * 停止所有正在混音的音效 Returns 接口是否调用成功 pauseAll * boolean pauseAll() * 暂停所有正在混音的音效 Returns 接口是否调用成功 resumeAll * boolean resumeAll() * 恢复所有暂停混音的音效 Returns 接口是否调用成功 getCurrentPosition * long getCurrentPosition(int effectID) * 获取指定音效混音的位置,单位: ms Parameters * effectID: int 音效文件的唯一标识符 Returns 指定音效混音的位置,单位: ms setVolume * void setVolume(int effectID, float volume) * 设置指定音效的混音音量,默认音量为 1.0f > 若想修改混音中麦克风采集音频的音量,可通过 > [QNMicrophoneAudioTrack.setVolume](https://developer.qiniu.com/rtc/11923/QNAudioEffectMixer/8667) > 接口实现 Parameters * effectID: int 音效文件的唯一标识符 * volume: float 音效的混音音量,[0.0f - 1.0f] getVolume * float getVolume(int effectID) * 获取指定音效的混音音量 Parameters * effectID: int 音效文件的唯一标识符 Returns 指定音效的混音音量,[0.0f - 1.0f] setAllEffectsVolume * void setAllEffectsVolume(float volume) * 设置所有正在混音的音效的混音音量 Parameters * volume: float 音效的混音音量,[0.0f - 1.0f] 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,940
QNAudioEffect
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioEffect # QNAudioEffect 最近更新时间: 2022-06-02 20:39:49 音效混音配置类,可通过 [QNAudioEffectMixer.createAudioEffect](https://developer.qiniu.com/rtc/api/11923/QNAudioEffectMixer#createAudioEffect) 接口进行创建 Index Core Methods * getDuration * getID * getFilePath * setStartPosition * getStartPosition * setLoopCount * getLoopCount Core Methods getDuration * static long getDuration(String filePath) * 获取指定音效文件的时长,单位:ms > 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程 Returns 音效文件的时长,单位:ms getID * int getID() * 获取音效文件的唯一标识符 Returns 音效文件的唯一标识符 getFilePath * String getFilePath() * 获取音效文件的路径 Returns 音效文件路径 setStartPosition * void setStartPosition(long position) * 设置音效混音的初始位置 Parameters * position: int 混音位置,单位:ms getStartPosition * long getStartPosition() * 获取音效混音的初始位置 Returns 音效混音初始位置,单位:ms setLoopCount * void setLoopCount(int loopCount) * 设置音效混音的循环次数 Parameters * loopCount: int 循环次数,-1 为无限循环,0 则不做混音,其他则为指定次数的混音 getLoopCount * int getLoopCount() * 获取音效混音的循环次数 Returns 循环次数 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioEffect # QNAudioEffect 最近更新时间: 2022-06-02 20:39:49 音效混音配置类,可通过 [QNAudioEffectMixer.createAudioEffect](https://developer.qiniu.com/rtc/api/11923/QNAudioEffectMixer#createAudioEffect) 接口进行创建 Index Core Methods * getDuration * getID * getFilePath * setStartPosition * getStartPosition * setLoopCount * getLoopCount Core Methods getDuration * static long getDuration(String filePath) * 获取指定音效文件的时长,单位:ms > 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程 Returns 音效文件的时长,单位:ms getID * int getID() * 获取音效文件的唯一标识符 Returns 音效文件的唯一标识符 getFilePath * String getFilePath() * 获取音效文件的路径 Returns 音效文件路径 setStartPosition * void setStartPosition(long position) * 设置音效混音的初始位置 Parameters * position: int 混音位置,单位:ms getStartPosition * long getStartPosition() * 获取音效混音的初始位置 Returns 音效混音初始位置,单位:ms setLoopCount * void setLoopCount(int loopCount) * 设置音效混音的循环次数 Parameters * loopCount: int 循环次数,-1 为无限循环,0 则不做混音,其他则为指定次数的混音 getLoopCount * int getLoopCount() * 获取音效混音的循环次数 Returns 循环次数 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,944
QNAudioEffectMixerListener
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioEffectMixerListener # QNAudioEffectMixerListener 最近更新时间: 2023-08-17 15:23:57 音效混音控制器的回调监听函数,可以通过 [QNMicrophoneAudioTrack.createAudioEffectMixer](https://developer.qiniu.com/rtc/api/8667/QNMicrophoneAudioTrack#createAudioEffectMixer) 创建 [QNAudioEffectMixer](https://developer.qiniu.com/rtc/api/11923/QNAudioEffectMixer) 时传入,回调函数均通过 UI 线程回调。 Index Core Methods * onEffectFinished * onEffectError * onError Core Methods onEffectFinished * void onEffectFinished(int effectID) * 音效混音完成时触发此回调 Parameters * effectID: int 音效文件的唯一标识符 onEffectError * void onEffectError(int effectID, int errorCode, String errorMessage) * 特定音效混音发生异常时会触发此回调 code | describe | message ---|---|--- ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND | 混音源没有找到有效音轨 | 请检查混音源文件是否存在有效音轨 ERROR_AUDIO_MIXING_DECODER_EXCEPTION | 音频解码异常 | 可通过 start 接口重新尝试混音操作。若混音的是在线音频,请检查网络是否正常 ERROR_AUDIO_MIXING_SEEK_FAILED | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作 ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED | 重采样模块创建失败 | 请重新尝试混音操作 ERROR_AUDIO_MIXING_IO_EXCEPTION | 混音源文件 IO 错误 | 请检查混音源文件是否合法。SDK 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac;若混音的是在线音频,请检查网络是否正常 Parameters * effectID: int 出现异常的音效 ID * errorCode: int 混音异常时对应的错误码 * errorMessage: String 混音异常时对应的错误信息 onError * void onError(int errorCode, String errorMessage) * 音效混音发生错误时会触发此回调 > 该回调接口已废弃,将在后续版本移除,请使用 > [onEffectError](https://developer.qiniu.com/rtc/11924/QNAudioEffectMixerListener/11924) > 回调进行音效混音错误的监听 code | describe | message ---|---|--- ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND | 混音源没有找到有效音轨 | 请检查混音源文件是否存在有效音轨 ERROR_AUDIO_MIXING_DECODER_EXCEPTION | 音频解码异常 | 可通过 start 接口重新尝试混音操作。若混音的是在线音频,请检查网络是否正常 ERROR_AUDIO_MIXING_SEEK_FAILED | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作 ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED | 重采样模块创建失败 | 请重新尝试混音操作 ERROR_AUDIO_MIXING_IO_EXCEPTION | 混音源文件 IO 错误 | 请检查混音源文件是否合法: SDK 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac;若混音的是在线音频,请检查网络是否正常 Parameters * errorCode: int 混音异常时对应的错误码 * errorMessage: String 混音异常时对应的错误信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioEffectMixerListener # QNAudioEffectMixerListener 最近更新时间: 2023-08-17 15:23:57 音效混音控制器的回调监听函数,可以通过 [QNMicrophoneAudioTrack.createAudioEffectMixer](https://developer.qiniu.com/rtc/api/8667/QNMicrophoneAudioTrack#createAudioEffectMixer) 创建 [QNAudioEffectMixer](https://developer.qiniu.com/rtc/api/11923/QNAudioEffectMixer) 时传入,回调函数均通过 UI 线程回调。 Index Core Methods * onEffectFinished * onEffectError * onError Core Methods onEffectFinished * void onEffectFinished(int effectID) * 音效混音完成时触发此回调 Parameters * effectID: int 音效文件的唯一标识符 onEffectError * void onEffectError(int effectID, int errorCode, String errorMessage) * 特定音效混音发生异常时会触发此回调 code | describe | message ---|---|--- ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND | 混音源没有找到有效音轨 | 请检查混音源文件是否存在有效音轨 ERROR_AUDIO_MIXING_DECODER_EXCEPTION | 音频解码异常 | 可通过 start 接口重新尝试混音操作。若混音的是在线音频,请检查网络是否正常 ERROR_AUDIO_MIXING_SEEK_FAILED | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作 ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED | 重采样模块创建失败 | 请重新尝试混音操作 ERROR_AUDIO_MIXING_IO_EXCEPTION | 混音源文件 IO 错误 | 请检查混音源文件是否合法。SDK 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac;若混音的是在线音频,请检查网络是否正常 Parameters * effectID: int 出现异常的音效 ID * errorCode: int 混音异常时对应的错误码 * errorMessage: String 混音异常时对应的错误信息 onError * void onError(int errorCode, String errorMessage) * 音效混音发生错误时会触发此回调 > 该回调接口已废弃,将在后续版本移除,请使用 > [onEffectError](https://developer.qiniu.com/rtc/11924/QNAudioEffectMixerListener/11924) > 回调进行音效混音错误的监听 code | describe | message ---|---|--- ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND | 混音源没有找到有效音轨 | 请检查混音源文件是否存在有效音轨 ERROR_AUDIO_MIXING_DECODER_EXCEPTION | 音频解码异常 | 可通过 start 接口重新尝试混音操作。若混音的是在线音频,请检查网络是否正常 ERROR_AUDIO_MIXING_SEEK_FAILED | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作 ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED | 重采样模块创建失败 | 请重新尝试混音操作 ERROR_AUDIO_MIXING_IO_EXCEPTION | 混音源文件 IO 错误 | 请检查混音源文件是否合法: SDK 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac;若混音的是在线音频,请检查网络是否正常 Parameters * errorCode: int 混音异常时对应的错误码 * errorMessage: String 混音异常时对应的错误信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,946
QNAudioMixer
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMixer # QNAudioMixer 最近更新时间: 2022-06-02 20:40:11 混音控制类,提供了混音流程处理的一系列方法 > 该接口已废弃 > > 最新接口实现,背景音乐混音可参考 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8631/QNAudioMixer/11921/QNAudioMusicMixer),音效混音可参考 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/8631/QNAudioMixer/11923/QNAudioEffectMixer) > 当前仅支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8667/QNMicrophoneAudioTrack) > 的混音操作 Index Core Methods * start[1/2] * start[2/2] * stop * resume * pause * getDuration * getCurrentPosition * seekTo * setMixingVolume * setPlayingVolume Core Methods start[1/2] * void start() * 开始混音并播放,音频只混一次,不做循环混音操作 混音开始后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.MIXING](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 混音过程中会回调 [QNAudioMixerListener.onMixing](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 方法 start[2/2] * void start(int loopTimes) * 开始指定次数的混音并播放 混音开始后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.MIXING](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 混音过程中会回调 [QNAudioMixerListener.onMixing](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 方法 Parameters * loopTimes: int 混音次数,-1 为无限循环 stop * void stop() * 停止混音操作 混音停止后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.STOPPED](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 resume * void resume() * 恢复混音操作 混音恢复后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.MIXING](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 pause * void pause() * 暂停混音操作 混音暂停后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.PAUSED](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 getDuration * long getDuration() * 获取音频文件的时长,单位: us Returns long getCurrentPosition * long getCurrentPosition() * 获取当前音频混音的位置,单位: us Returns long seekTo * void seekTo(long timeUs) * 跳到指定位置混音 Parameters * timeUs: long 指定位置的时间戳,单位: us setMixingVolume * void setMixingVolume(float microphoneVolume, float musicVolume) * 设置混音中麦克风和音乐的混音音量,默认音量为 1.0f Parameters * microphoneVolume: float 麦克风混音音量【 0.0f - 1.0f 】 * musicVolume: float 音乐混音音量【 0.0f - 1.0f 】 setPlayingVolume * void setPlayingVolume(float volume) * 设置混音音乐本地播放的音量,默认音量为 1.0f > 如果不希望本地播放混音的音乐,可以通过该方法将 volume 设置为 0.0f Parameters * volume: float 混音音乐本地播放音量【 0.0f - 1.0f 】 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMixer # QNAudioMixer 最近更新时间: 2022-06-02 20:40:11 混音控制类,提供了混音流程处理的一系列方法 > 该接口已废弃 > > 最新接口实现,背景音乐混音可参考 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8631/QNAudioMixer/11921/QNAudioMusicMixer),音效混音可参考 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/8631/QNAudioMixer/11923/QNAudioEffectMixer) > 当前仅支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8667/QNMicrophoneAudioTrack) > 的混音操作 Index Core Methods * start[1/2] * start[2/2] * stop * resume * pause * getDuration * getCurrentPosition * seekTo * setMixingVolume * setPlayingVolume Core Methods start[1/2] * void start() * 开始混音并播放,音频只混一次,不做循环混音操作 混音开始后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.MIXING](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 混音过程中会回调 [QNAudioMixerListener.onMixing](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 方法 start[2/2] * void start(int loopTimes) * 开始指定次数的混音并播放 混音开始后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.MIXING](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 混音过程中会回调 [QNAudioMixerListener.onMixing](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 方法 Parameters * loopTimes: int 混音次数,-1 为无限循环 stop * void stop() * 停止混音操作 混音停止后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.STOPPED](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 resume * void resume() * 恢复混音操作 混音恢复后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.MIXING](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 pause * void pause() * 暂停混音操作 混音暂停后会触发 [QNAudioMixerListener.onStateChanged](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8632) 回调,并回调 [QNAudioMixerState.PAUSED](https://developer.qiniu.com/rtc/8631/QNAudioMixer/8633) 状态 getDuration * long getDuration() * 获取音频文件的时长,单位: us Returns long getCurrentPosition * long getCurrentPosition() * 获取当前音频混音的位置,单位: us Returns long seekTo * void seekTo(long timeUs) * 跳到指定位置混音 Parameters * timeUs: long 指定位置的时间戳,单位: us setMixingVolume * void setMixingVolume(float microphoneVolume, float musicVolume) * 设置混音中麦克风和音乐的混音音量,默认音量为 1.0f Parameters * microphoneVolume: float 麦克风混音音量【 0.0f - 1.0f 】 * musicVolume: float 音乐混音音量【 0.0f - 1.0f 】 setPlayingVolume * void setPlayingVolume(float volume) * 设置混音音乐本地播放的音量,默认音量为 1.0f > 如果不希望本地播放混音的音乐,可以通过该方法将 volume 设置为 0.0f Parameters * volume: float 混音音乐本地播放音量【 0.0f - 1.0f 】 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,949
QNAudioMixerListener
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMixerListener # QNAudioMixerListener 最近更新时间: 2022-06-02 20:40:22 混音过程中的回调监听函数,可以通过 [QNMicrophoneAudioTrack.createAudioMixer](https://developer.qiniu.com/rtc/api/8667/QNMicrophoneAudioTrack#createAudioMixer) 创建 [QNAudioMixer](https://developer.qiniu.com/rtc/api/8631/QNAudioMixer) 时传入,回调函数均通过 UI 线程回调。 > 该接口已废弃 > > 最新接口实现,背景音乐混音可参考 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8632/QNAudioMixerListener/11921/QNAudioMusicMixer),音效混音可参考 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/8632/QNAudioMixerListener/11923/QNAudioEffectMixer) Index Core Methods * onStateChanged * onMixing * onError Core Methods onStateChanged * void onStateChanged([QNAudioMixerState](https://developer.qiniu.com/rtc/api/8633/QNAudioMixerState) state) * 混音状态改变时触发此回调 Parameters * state: [QNAudioMixerState](https://developer.qiniu.com/rtc/api/8633/QNAudioMixerState) 当前的混音状态 onMixing * void onMixing(long currentTimeUs) * 混音操作进行过程中会不断触发此回调 Parameters * currentTimeUs: long 当前正在执行混音操作的音频帧时间戳,单位: us onError * void onError(int errorCode) * 混音操作发生错误时会触发此回调 code | describe | message ---|---|--- ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND | 混音源没有找到有效音轨 | 请检查混音文件的合法性 ERROR_AUDIO_MIXING_DECODER_EXCEPTION | 系统不支持混音源中的音频类型 | 建议使用 'mp3' 等更通用的音频格式 ERROR_AUDIO_MIXING_SEEK_FAILED | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作 ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED | 重采样模块创建失败 | 请重新尝试混音操作 ERROR_AUDIO_MIXING_IO_EXCEPTION | 混音源文件 IO 错误 | 请检查混音源文件是否存在异常 Parameters * errorCode: int 混音异常时对应的错误码 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMixerListener # QNAudioMixerListener 最近更新时间: 2022-06-02 20:40:22 混音过程中的回调监听函数,可以通过 [QNMicrophoneAudioTrack.createAudioMixer](https://developer.qiniu.com/rtc/api/8667/QNMicrophoneAudioTrack#createAudioMixer) 创建 [QNAudioMixer](https://developer.qiniu.com/rtc/api/8631/QNAudioMixer) 时传入,回调函数均通过 UI 线程回调。 > 该接口已废弃 > > 最新接口实现,背景音乐混音可参考 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8632/QNAudioMixerListener/11921/QNAudioMusicMixer),音效混音可参考 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/8632/QNAudioMixerListener/11923/QNAudioEffectMixer) Index Core Methods * onStateChanged * onMixing * onError Core Methods onStateChanged * void onStateChanged([QNAudioMixerState](https://developer.qiniu.com/rtc/api/8633/QNAudioMixerState) state) * 混音状态改变时触发此回调 Parameters * state: [QNAudioMixerState](https://developer.qiniu.com/rtc/api/8633/QNAudioMixerState) 当前的混音状态 onMixing * void onMixing(long currentTimeUs) * 混音操作进行过程中会不断触发此回调 Parameters * currentTimeUs: long 当前正在执行混音操作的音频帧时间戳,单位: us onError * void onError(int errorCode) * 混音操作发生错误时会触发此回调 code | describe | message ---|---|--- ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND | 混音源没有找到有效音轨 | 请检查混音文件的合法性 ERROR_AUDIO_MIXING_DECODER_EXCEPTION | 系统不支持混音源中的音频类型 | 建议使用 'mp3' 等更通用的音频格式 ERROR_AUDIO_MIXING_SEEK_FAILED | seek 失败 | 请检查是否在开始混音前执行了 Seek 操作 ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED | 重采样模块创建失败 | 请重新尝试混音操作 ERROR_AUDIO_MIXING_IO_EXCEPTION | 混音源文件 IO 错误 | 请检查混音源文件是否存在异常 Parameters * errorCode: int 混音异常时对应的错误码 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,953
QNAudioMixerState
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMixerState # QNAudioMixerState 最近更新时间: 2022-06-02 20:40:32 混音操作相关的状态 > 该接口已废弃 > > 最新接口实现,背景音乐混音可参考 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/11921/QNAudioMusicMixer),音效混音可参考 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/11923/QNAudioEffectMixer) Index Properties * MIXING * PAUSED * STOPPED * COMPLETED Properties MIXING * MIXING: QNAudioMixerState * 混音操作进行中的状态 当成功执行 [QNAudioMixer.start()](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/8631) 或者 [QNAudioMixer.resume()](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/8631) 后,会回调此状态 PAUSED * PAUSED: QNAudioMixerState * 混音操作暂停时的状态 当成功执行 [QNAudioMixer.pause()](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/8631) 后,会回调此状态 STOPPED * STOPPED: QNAudioMixerState * 混音操作停止时的状态 当成功执行 [QNAudioMixer.stop()](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/8631) 后,会回调此状态 COMPLETED * COMPLETED: QNAudioMixerState * 混音操作完成时的状态 > 当且仅当指定 loopTimes 循环次数混音完成后,会回调此状态 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioMixerState # QNAudioMixerState 最近更新时间: 2022-06-02 20:40:32 混音操作相关的状态 > 该接口已废弃 > > 最新接口实现,背景音乐混音可参考 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/11921/QNAudioMusicMixer),音效混音可参考 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/11923/QNAudioEffectMixer) Index Properties * MIXING * PAUSED * STOPPED * COMPLETED Properties MIXING * MIXING: QNAudioMixerState * 混音操作进行中的状态 当成功执行 [QNAudioMixer.start()](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/8631) 或者 [QNAudioMixer.resume()](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/8631) 后,会回调此状态 PAUSED * PAUSED: QNAudioMixerState * 混音操作暂停时的状态 当成功执行 [QNAudioMixer.pause()](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/8631) 后,会回调此状态 STOPPED * STOPPED: QNAudioMixerState * 混音操作停止时的状态 当成功执行 [QNAudioMixer.stop()](https://developer.qiniu.com/rtc/8633/QNAudioMixerState/8631) 后,会回调此状态 COMPLETED * COMPLETED: QNAudioMixerState * 混音操作完成时的状态 > 当且仅当指定 loopTimes 循环次数混音完成后,会回调此状态 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,956
QNTrackProfile
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNTrackProfile # QNTrackProfile 最近更新时间: 2022-05-12 20:09:59 Track 质量等级 Index Properties * LOW * MEDIUM * HIGH Properties LOW * LOW: QNTrackProfile * 低质量 MEDIUM * MEDIUM: QNTrackProfile * 普通质量 HIGH * HIGH: QNTrackProfile * 高质量 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNTrackProfile # QNTrackProfile 最近更新时间: 2022-05-12 20:09:59 Track 质量等级 Index Properties * LOW * MEDIUM * HIGH Properties LOW * LOW: QNTrackProfile * 低质量 MEDIUM * MEDIUM: QNTrackProfile * 普通质量 HIGH * HIGH: QNTrackProfile * 高质量 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,958
QNConnectionDisconnectedInfo
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNConnectionDisconnectedInfo # QNConnectionDisconnectedInfo 最近更新时间: 2022-05-12 20:08:51 房间断开时的相关信息 Index Core Methods * getReason * getErrorCode * getErrorMessage Enum * Reason Core Methods getReason * [Reason](https://developer.qiniu.com/rtc/8644/QNConnectionDisconnectedInfo/8644) getReason() * 获取用户房间断开的原因 code | describe | message ---|---|--- LEAVE | 主动退出 | 无 KICKED_OUT | 被服务端踢出房间 | 无 ROOM_CLOSED | 房间被管理员关闭 | 请确认房间管理逻辑 ROOM_FULL | 房间人数已满,当房间已加入人数超过房间的人数限制时触发 | 请确认后台服务的设置 ERROR | 异常断开 | 可通过 error code 查看异常断开的原因 Returns [Reason](https://developer.qiniu.com/rtc/8644/QNConnectionDisconnectedInfo/8644) getErrorCode * int getErrorCode() * 错误码 code | describe | message ---|---|--- SUCCESS | 主动退出房间 | 无 ERROR_AUTH_FAILED | 加入房间认证失败 | 服务验证时出错,可能为服务网络异常。建议重新尝试加入房间 ERROR_TOKEN_ERROR | 房间 Token 错误 | 表示您提供的房间 token 不符合七牛 token 签算规则, 详情请参考[RoomToken 签发服务](https://doc.qnsdk.com/rtn/docs/server_overview#1) ERROR_TOKEN_EXPIRED | 房间 Token 过期 | 表示您的房间 token 过期, 需要重新生成 token 再加入 ERROR_PLAYER_ALREADY_EXIST | 房间内已经有同名用户 | 后台如果配置为开启“禁止自动踢人”,则同一用户重复加入/未正常退出再加入会触发此错误 ERROR_MEDIA_CAP_NOT_SUPPORT | 媒体协商失败 | 表示该设备不支持指定的音视频格式,无法进行连麦的操作 ERROR_FATAL | 非预期错误 | 表示 RTC 生命周期异常,需要释放资源并重新初始化 ERROR_RECONNECT_FAILED | 内部重连失效 | 内部重连后出错,一般出现在网络非常不稳定时出现,建议提示用户并尝试重新加入房间。当发生该错误时,之前创建的转推任务将被服务销毁,如有需要,应在下次成功加入房间后按业务需要恢复 Returns int getErrorMessage * String getErrorMessage() * 获取错误信息的文字描述 Returns String Enum Reason * Type declaration * LEAVE * KICKED_OUT * ROOM_CLOSED * ROOM_FULL * ERROR 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNConnectionDisconnectedInfo # QNConnectionDisconnectedInfo 最近更新时间: 2022-05-12 20:08:51 房间断开时的相关信息 Index Core Methods * getReason * getErrorCode * getErrorMessage Enum * Reason Core Methods getReason * [Reason](https://developer.qiniu.com/rtc/8644/QNConnectionDisconnectedInfo/8644) getReason() * 获取用户房间断开的原因 code | describe | message ---|---|--- LEAVE | 主动退出 | 无 KICKED_OUT | 被服务端踢出房间 | 无 ROOM_CLOSED | 房间被管理员关闭 | 请确认房间管理逻辑 ROOM_FULL | 房间人数已满,当房间已加入人数超过房间的人数限制时触发 | 请确认后台服务的设置 ERROR | 异常断开 | 可通过 error code 查看异常断开的原因 Returns [Reason](https://developer.qiniu.com/rtc/8644/QNConnectionDisconnectedInfo/8644) getErrorCode * int getErrorCode() * 错误码 code | describe | message ---|---|--- SUCCESS | 主动退出房间 | 无 ERROR_AUTH_FAILED | 加入房间认证失败 | 服务验证时出错,可能为服务网络异常。建议重新尝试加入房间 ERROR_TOKEN_ERROR | 房间 Token 错误 | 表示您提供的房间 token 不符合七牛 token 签算规则, 详情请参考[RoomToken 签发服务](https://doc.qnsdk.com/rtn/docs/server_overview#1) ERROR_TOKEN_EXPIRED | 房间 Token 过期 | 表示您的房间 token 过期, 需要重新生成 token 再加入 ERROR_PLAYER_ALREADY_EXIST | 房间内已经有同名用户 | 后台如果配置为开启“禁止自动踢人”,则同一用户重复加入/未正常退出再加入会触发此错误 ERROR_MEDIA_CAP_NOT_SUPPORT | 媒体协商失败 | 表示该设备不支持指定的音视频格式,无法进行连麦的操作 ERROR_FATAL | 非预期错误 | 表示 RTC 生命周期异常,需要释放资源并重新初始化 ERROR_RECONNECT_FAILED | 内部重连失效 | 内部重连后出错,一般出现在网络非常不稳定时出现,建议提示用户并尝试重新加入房间。当发生该错误时,之前创建的转推任务将被服务销毁,如有需要,应在下次成功加入房间后按业务需要恢复 Returns int getErrorMessage * String getErrorMessage() * 获取错误信息的文字描述 Returns String Enum Reason * Type declaration * LEAVE * KICKED_OUT * ROOM_CLOSED * ROOM_FULL * ERROR 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,959
QNCustomMessage
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNCustomMessage # QNCustomMessage 最近更新时间: 2022-05-12 20:09:55 自定义消息成员类,当接收到远端发送的自定义消息时,会通过 [QNClientEventListener.onMessageReceived](https://developer.qiniu.com/rtc/api/8643/QNClientEventListener#onMessageReceived) 回调 Index Core Methods * getID * setID * getUserID * setUserID * getContent * setContent * getTimestamp * setTimestamp Core Methods getID * String getID() * 获取消息 id Returns String setID * void setID(String ID) * 设置消息 id Parameters * ID: String 消息 id getUserID * String getUserID() * 获取消息发送者的 id Returns String setUserID * void setUserID(String userID) * 设置消息发送者的 id Parameters * userID: String 消息发送者的 id getContent * String getContent() * 获取消息内容 Returns String setContent * void setContent(String text) * 设置消息内容 Parameters * text: String 消息内容 getTimestamp * long getTimestamp() * 获取消息时间戳 Returns long setTimestamp * void setTimestamp(long timestamp) * 设置消息的时间戳 Parameters * timestamp: long 目标消息时间戳,单位 : s 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNCustomMessage # QNCustomMessage 最近更新时间: 2022-05-12 20:09:55 自定义消息成员类,当接收到远端发送的自定义消息时,会通过 [QNClientEventListener.onMessageReceived](https://developer.qiniu.com/rtc/api/8643/QNClientEventListener#onMessageReceived) 回调 Index Core Methods * getID * setID * getUserID * setUserID * getContent * setContent * getTimestamp * setTimestamp Core Methods getID * String getID() * 获取消息 id Returns String setID * void setID(String ID) * 设置消息 id Parameters * ID: String 消息 id getUserID * String getUserID() * 获取消息发送者的 id Returns String setUserID * void setUserID(String userID) * 设置消息发送者的 id Parameters * userID: String 消息发送者的 id getContent * String getContent() * 获取消息内容 Returns String setContent * void setContent(String text) * 设置消息内容 Parameters * text: String 消息内容 getTimestamp * long getTimestamp() * 获取消息时间戳 Returns long setTimestamp * void setTimestamp(long timestamp) * 设置消息的时间戳 Parameters * timestamp: long 目标消息时间戳,单位 : s 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,962
QNAudioFormat
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioFormat # QNAudioFormat 最近更新时间: 2022-05-12 20:10:04 用于设置外部导入音频数据连麦的参数配置 Index Core Methods * QNAudioFormat * QNAudioFormat * getBitsPerSample * setBitsPerSample * getSampleRate * setSampleRate * getChannels * setChannels Core Methods QNAudioFormat * QNAudioFormat() * 无参构造方法 Returns [QNAudioFormat](https://developer.qiniu.com/rtc/8628/QNAudioFormat/8628/QNAudioFormat) QNAudioFormat * QNAudioFormat(int channels, int sampleRate, int bitsPerSample) * 构造方法 用于指定外部导入的音频数据格式 Parameters * channels: int 音频声道数,单声道(1)或者双声道(2) * sampleRate: int 音频采样率,如 16000、44100 等 * bitsPerSample: int 音频位宽,通常为 16 Returns [QNAudioFormat](https://developer.qiniu.com/rtc/8628/QNAudioFormat/8628/QNAudioFormat) getBitsPerSample * int getBitsPerSample() * 获取音频位宽 Returns int setBitsPerSample * void setBitsPerSample(int bitsPerSample) * 设置音频位宽 Parameters * bitsPerSample: int 音频位宽,通常为 16 getSampleRate * int getSampleRate() * 获取音频采样率 Returns int setSampleRate * void setSampleRate(int sampleRate) * 设置音频采样率 Parameters * sampleRate: int 音频采样率,如 16000、44100 等 getChannels * int getChannels() * 获取音频声道数 Returns int setChannels * void setChannels(int channels) * 设置音频声道数 Parameters * channels: int 音频声道数,单声道(1)或者双声道(2) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioFormat # QNAudioFormat 最近更新时间: 2022-05-12 20:10:04 用于设置外部导入音频数据连麦的参数配置 Index Core Methods * QNAudioFormat * QNAudioFormat * getBitsPerSample * setBitsPerSample * getSampleRate * setSampleRate * getChannels * setChannels Core Methods QNAudioFormat * QNAudioFormat() * 无参构造方法 Returns [QNAudioFormat](https://developer.qiniu.com/rtc/8628/QNAudioFormat/8628/QNAudioFormat) QNAudioFormat * QNAudioFormat(int channels, int sampleRate, int bitsPerSample) * 构造方法 用于指定外部导入的音频数据格式 Parameters * channels: int 音频声道数,单声道(1)或者双声道(2) * sampleRate: int 音频采样率,如 16000、44100 等 * bitsPerSample: int 音频位宽,通常为 16 Returns [QNAudioFormat](https://developer.qiniu.com/rtc/8628/QNAudioFormat/8628/QNAudioFormat) getBitsPerSample * int getBitsPerSample() * 获取音频位宽 Returns int setBitsPerSample * void setBitsPerSample(int bitsPerSample) * 设置音频位宽 Parameters * bitsPerSample: int 音频位宽,通常为 16 getSampleRate * int getSampleRate() * 获取音频采样率 Returns int setSampleRate * void setSampleRate(int sampleRate) * 设置音频采样率 Parameters * sampleRate: int 音频采样率,如 16000、44100 等 getChannels * int getChannels() * 获取音频声道数 Returns int setChannels * void setChannels(int channels) * 设置音频声道数 Parameters * channels: int 音频声道数,单声道(1)或者双声道(2) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,964
QNVideoFormat
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNVideoFormat # QNVideoFormat 最近更新时间: 2022-05-12 20:09:02 视频格式描述类 Index Properties * QNVideoFormat * height * width * frameRate Properties QNVideoFormat * QNVideoFormat(int width, int height, int frameRate) * 构造方法 Parameters * width: int 视频宽度 * height: int 视频高度 * frameRate: int 视频帧率 Returns [QNVideoFormat](https://developer.qiniu.com/rtc/8702/QNVideoFormat/8702/QNVideoFormat) height * height: int * 视频高度 width * width: int * 视频宽度 frameRate * frameRate: int * 视频帧率 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNVideoFormat # QNVideoFormat 最近更新时间: 2022-05-12 20:09:02 视频格式描述类 Index Properties * QNVideoFormat * height * width * frameRate Properties QNVideoFormat * QNVideoFormat(int width, int height, int frameRate) * 构造方法 Parameters * width: int 视频宽度 * height: int 视频高度 * frameRate: int 视频帧率 Returns [QNVideoFormat](https://developer.qiniu.com/rtc/8702/QNVideoFormat/8702/QNVideoFormat) height * height: int * 视频高度 width * width: int * 视频宽度 frameRate * frameRate: int * 视频帧率 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,966
QNAudioDevice
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioDevice # QNAudioDevice 最近更新时间: 2022-05-12 20:09:08 音频设备类型 Index Properties * SPEAKER_PHONE * EARPIECE * WIRED_HEADSET * BLUETOOTH * NONE Properties SPEAKER_PHONE * SPEAKER_PHONE: QNAudioDevice * 扬声器 EARPIECE * EARPIECE: QNAudioDevice * 听筒 WIRED_HEADSET * WIRED_HEADSET: QNAudioDevice * 有线耳机 BLUETOOTH * BLUETOOTH: QNAudioDevice * 蓝牙设备 NONE * NONE: QNAudioDevice * 无 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNAudioDevice # QNAudioDevice 最近更新时间: 2022-05-12 20:09:08 音频设备类型 Index Properties * SPEAKER_PHONE * EARPIECE * WIRED_HEADSET * BLUETOOTH * NONE Properties SPEAKER_PHONE * SPEAKER_PHONE: QNAudioDevice * 扬声器 EARPIECE * EARPIECE: QNAudioDevice * 听筒 WIRED_HEADSET * WIRED_HEADSET: QNAudioDevice * 有线耳机 BLUETOOTH * BLUETOOTH: QNAudioDevice * 蓝牙设备 NONE * NONE: QNAudioDevice * 无 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,967
QNNetworkQualityListener
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNNetworkQualityListener # QNNetworkQualityListener 最近更新时间: 2022-05-12 20:08:53 近端网络状态监听接口类,每隔 3s 会回调当前应用上下行的网络质量,通过 [QNRTCClient.setNetworkQualityListener](https://developer.qiniu.com/rtc/8671/QNNetworkQualityListener/8684) 进行设置使用。远端网络质量需要通过 [QNRTCClient.getUserNetworkQuality](https://developer.qiniu.com/rtc/8671/QNNetworkQualityListener/8684) 获取 Index Core Methods * onNetworkQualityNotified Core Methods onNetworkQualityNotified * void onNetworkQualityNotified([QNNetworkQuality](https://developer.qiniu.com/rtc/8671/QNNetworkQualityListener/8670/QNNetworkQuality) quality) * 近端网络质量信息回调, 表示当前应用上下行的网络质量 Parameters * quality: [QNNetworkQuality](https://developer.qiniu.com/rtc/8671/QNNetworkQualityListener/8670/QNNetworkQuality) 近端网络质量信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNNetworkQualityListener # QNNetworkQualityListener 最近更新时间: 2022-05-12 20:08:53 近端网络状态监听接口类,每隔 3s 会回调当前应用上下行的网络质量,通过 [QNRTCClient.setNetworkQualityListener](https://developer.qiniu.com/rtc/8671/QNNetworkQualityListener/8684) 进行设置使用。远端网络质量需要通过 [QNRTCClient.getUserNetworkQuality](https://developer.qiniu.com/rtc/8671/QNNetworkQualityListener/8684) 获取 Index Core Methods * onNetworkQualityNotified Core Methods onNetworkQualityNotified * void onNetworkQualityNotified([QNNetworkQuality](https://developer.qiniu.com/rtc/8671/QNNetworkQualityListener/8670/QNNetworkQuality) quality) * 近端网络质量信息回调, 表示当前应用上下行的网络质量 Parameters * quality: [QNNetworkQuality](https://developer.qiniu.com/rtc/8671/QNNetworkQualityListener/8670/QNNetworkQuality) 近端网络质量信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,968
QNNetworkQuality
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNNetworkQuality # QNNetworkQuality 最近更新时间: 2022-05-12 20:09:30 网络上下行质量 Index Properties * uplinkNetworkGrade * downlinkNetworkGrade Properties uplinkNetworkGrade * uplinkNetworkGrade: [QNNetworkGrade](https://developer.qiniu.com/rtc/8670/QNNetworkQuality/8669/QNNetworkGrade) * 当前网络上行质量 downlinkNetworkGrade * downlinkNetworkGrade: [QNNetworkGrade](https://developer.qiniu.com/rtc/8670/QNNetworkQuality/8669/QNNetworkGrade) * 当前网络下行质量 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNNetworkQuality # QNNetworkQuality 最近更新时间: 2022-05-12 20:09:30 网络上下行质量 Index Properties * uplinkNetworkGrade * downlinkNetworkGrade Properties uplinkNetworkGrade * uplinkNetworkGrade: [QNNetworkGrade](https://developer.qiniu.com/rtc/8670/QNNetworkQuality/8669/QNNetworkGrade) * 当前网络上行质量 downlinkNetworkGrade * downlinkNetworkGrade: [QNNetworkGrade](https://developer.qiniu.com/rtc/8670/QNNetworkQuality/8669/QNNetworkGrade) * 当前网络下行质量 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,970
QNNetworkGrade
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNNetworkGrade # QNNetworkGrade 最近更新时间: 2022-05-12 20:09:35 网络状态 Index Properties * INVALID * EXCELLENT * GOOD * FAIR * POOR Properties INVALID * INVALID: QNNetworkGrade * 当前网络未知 EXCELLENT * EXCELLENT: QNNetworkGrade * 当前网络优秀 GOOD * GOOD: QNNetworkGrade * 当前网络良好 FAIR * FAIR: QNNetworkGrade * 当前网络一般 POOR * POOR: QNNetworkGrade * 当前网络较差 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNNetworkGrade # QNNetworkGrade 最近更新时间: 2022-05-12 20:09:35 网络状态 Index Properties * INVALID * EXCELLENT * GOOD * FAIR * POOR Properties INVALID * INVALID: QNNetworkGrade * 当前网络未知 EXCELLENT * EXCELLENT: QNNetworkGrade * 当前网络优秀 GOOD * GOOD: QNNetworkGrade * 当前网络良好 FAIR * FAIR: QNNetworkGrade * 当前网络一般 POOR * POOR: QNNetworkGrade * 当前网络较差 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,971
QNBeautySetting
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNBeautySetting # QNBeautySetting 最近更新时间: 2022-05-12 20:09:31 内置美颜参数设置类 Index Core Methods * QNBeautySetting * isEnabled * setEnable * getSmoothLevel * setSmoothLevel * getWhiten * setWhiten * getRedden * setRedden Core Methods QNBeautySetting * QNBeautySetting(float smooth, float whiten, float redden) * 构造方法 Parameters * smooth: float 磨皮等级 * whiten: float 美白等级 * redden: float 红润等级 Returns [QNBeautySetting](https://developer.qiniu.com/rtc/8636/QNBeautySetting/8636/QNBeautySetting) isEnabled * boolean isEnabled() * 美颜是否开启 Returns boolean setEnable * void setEnable(boolean enable) * 开启/关闭美颜 Parameters * enable: boolean 是否开启美颜 getSmoothLevel * float getSmoothLevel()) * 获取磨皮等级 0.0f ~ 1.0f Returns float setSmoothLevel * void setSmoothLevel(float smoothLevel) * 设置磨皮等级 0.0f ~ 1.0f Parameters * smoothLevel: float 磨皮等级 0.0f ~ 1.0f getWhiten * float getWhiten()) * 获取美白等级 0.0f ~ 1.0f Returns float setWhiten * void setWhiten(float whiten) * 设置美白等级 0.0f ~ 1.0f Parameters * whiten: float 美白等级 0.0f ~ 1.0f getRedden * float getRedden()) * 获取红润等级 0.0f ~ 1.0f Returns float setRedden * void setRedden(float redden) * 设置红润等级 0.0f ~ 1.0f Parameters * redden: float 红润等级 0.0f ~ 1.0f 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNBeautySetting # QNBeautySetting 最近更新时间: 2022-05-12 20:09:31 内置美颜参数设置类 Index Core Methods * QNBeautySetting * isEnabled * setEnable * getSmoothLevel * setSmoothLevel * getWhiten * setWhiten * getRedden * setRedden Core Methods QNBeautySetting * QNBeautySetting(float smooth, float whiten, float redden) * 构造方法 Parameters * smooth: float 磨皮等级 * whiten: float 美白等级 * redden: float 红润等级 Returns [QNBeautySetting](https://developer.qiniu.com/rtc/8636/QNBeautySetting/8636/QNBeautySetting) isEnabled * boolean isEnabled() * 美颜是否开启 Returns boolean setEnable * void setEnable(boolean enable) * 开启/关闭美颜 Parameters * enable: boolean 是否开启美颜 getSmoothLevel * float getSmoothLevel()) * 获取磨皮等级 0.0f ~ 1.0f Returns float setSmoothLevel * void setSmoothLevel(float smoothLevel) * 设置磨皮等级 0.0f ~ 1.0f Parameters * smoothLevel: float 磨皮等级 0.0f ~ 1.0f getWhiten * float getWhiten()) * 获取美白等级 0.0f ~ 1.0f Returns float setWhiten * void setWhiten(float whiten) * 设置美白等级 0.0f ~ 1.0f Parameters * whiten: float 美白等级 0.0f ~ 1.0f getRedden * float getRedden()) * 获取红润等级 0.0f ~ 1.0f Returns float setRedden * void setRedden(float redden) * 设置红润等级 0.0f ~ 1.0f Parameters * redden: float 红润等级 0.0f ~ 1.0f 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,972
QNImage
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNImage # QNImage 最近更新时间: 2022-05-12 20:08:43 图片配置类,可用于在 Camera 视频连麦过程中通过调用 [QNCameraVideoTrack.pushImage](https://developer.qiniu.com/rtc/8654/QNImage/8640) 接口切换为图片推送 Index Core Methods * setResourcePath * setResourceId * setResourceBitmap * setImageSize * getImageWidth * getImageHeight Core Methods setResourcePath * [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setResourcePath(String absoluteResPath) * 设置图片的绝对路径 Parameters * absoluteResPath: String 图片绝对路径 Returns [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setResourceId * [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setResourceId(int resId) * 设置图片的资源 ID Parameters * resId: int 图片资源 ID Returns [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setResourceBitmap * QNImage setResourceBitmap(Bitmap resBitmap) * 设置图片的 Bitmap 对象 Parameters * resBitmap: Bitmap 图片 bitmap Returns QNImage setImageSize * [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setImageSize(int width, int height) * 设置图片的宽高 Parameters * width: int 图片宽 * height: int 图片高 Returns [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) getImageWidth * int getImageWidth() * 获取图片宽度 Returns int getImageHeight * int getImageHeight() * 获取图片高 Returns int 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNImage # QNImage 最近更新时间: 2022-05-12 20:08:43 图片配置类,可用于在 Camera 视频连麦过程中通过调用 [QNCameraVideoTrack.pushImage](https://developer.qiniu.com/rtc/8654/QNImage/8640) 接口切换为图片推送 Index Core Methods * setResourcePath * setResourceId * setResourceBitmap * setImageSize * getImageWidth * getImageHeight Core Methods setResourcePath * [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setResourcePath(String absoluteResPath) * 设置图片的绝对路径 Parameters * absoluteResPath: String 图片绝对路径 Returns [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setResourceId * [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setResourceId(int resId) * 设置图片的资源 ID Parameters * resId: int 图片资源 ID Returns [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setResourceBitmap * QNImage setResourceBitmap(Bitmap resBitmap) * 设置图片的 Bitmap 对象 Parameters * resBitmap: Bitmap 图片 bitmap Returns QNImage setImageSize * [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) setImageSize(int width, int height) * 设置图片的宽高 Parameters * width: int 图片宽 * height: int 图片高 Returns [QNImage](https://developer.qiniu.com/rtc/8654/QNImage/8654/QNImage) getImageWidth * int getImageWidth() * 获取图片宽度 Returns int getImageHeight * int getImageHeight() * 获取图片高 Returns int 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,975
QNVideoWaterMark
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNVideoWaterMark # QNVideoWaterMark 最近更新时间: 2022-05-12 20:09:05 视频水印参数配置类 Index Core Methods * setWaterMarkRelativeSize[1/2] * setWaterMarkRelativeSize[2/2] * setResourcePath * setResourceId * setResourceBitmap * setWaterMarkPosition * setAlpha * getAlpha * getWaterMarkX * getWaterMarkY * getWaterMarkRelativeSize Enum * SIZE Core Methods setWaterMarkRelativeSize[1/2] * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkRelativeSize([QNVideoWaterMark.SIZE](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706) size) * 设置水印图片在视频中的相对大小 其中,[QNVideoWaterMark.SIZE](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706) 的 LARGE、MEDIUM、SMALL 分别对应 0.4f、0.3f 和 0.2f 的相对比例大小 Parameters * size: [QNVideoWaterMark.SIZE](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706) 图片相对大小 Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkRelativeSize[2/2] * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkRelativeSize(float size) * 设置水印图片在视频中的相对大小,范围 (0.0 - 1.0] Parameters * size: float 图片相对比例 Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourcePath * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourcePath(String absoluteResPath) * 设置图片的绝对路径 Parameters * absoluteResPath: String 图片绝对路径 Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourceId * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourceId(int resId) * 设置图片的资源 ID Parameters * resId: int 图片资源 ID Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourceBitmap * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourceBitmap(Bitmap resBitmap) * 设置图片的 Bitmap 对象 Parameters * resBitmap: Bitmap 图片 bitmap Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkPosition * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkPosition(float x, float y) * 设置水印图片在显示控件中的位置 显示控件的左上角为原点 [0.0,0.0],右下角为 [1.0,1.0] Parameters * x: float 图片 X 坐标值 [0.0 - 1.0] * y: float 图片 Y 坐标值 [0.0 - 1.0] Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setAlpha * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setAlpha(int alpha) * 设置水印图片的透明度, [0-255] Parameters * alpha: int 图片的透明度, [0-255] Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) getAlpha * int getAlpha() * 获取水印透明度 Returns int getWaterMarkX * float getWaterMarkX() * 获取水印 X 坐标值 Returns float getWaterMarkY * float getWaterMarkY() * 获取水印 Y 坐标值 Returns float getWaterMarkRelativeSize * float getWaterMarkRelativeSize() * 获取水印相对大小 Returns float Enum SIZE * SIZE: enum * Type declaration * LARGE * MEDIUM * SMALL 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNVideoWaterMark # QNVideoWaterMark 最近更新时间: 2022-05-12 20:09:05 视频水印参数配置类 Index Core Methods * setWaterMarkRelativeSize[1/2] * setWaterMarkRelativeSize[2/2] * setResourcePath * setResourceId * setResourceBitmap * setWaterMarkPosition * setAlpha * getAlpha * getWaterMarkX * getWaterMarkY * getWaterMarkRelativeSize Enum * SIZE Core Methods setWaterMarkRelativeSize[1/2] * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkRelativeSize([QNVideoWaterMark.SIZE](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706) size) * 设置水印图片在视频中的相对大小 其中,[QNVideoWaterMark.SIZE](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706) 的 LARGE、MEDIUM、SMALL 分别对应 0.4f、0.3f 和 0.2f 的相对比例大小 Parameters * size: [QNVideoWaterMark.SIZE](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706) 图片相对大小 Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkRelativeSize[2/2] * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkRelativeSize(float size) * 设置水印图片在视频中的相对大小,范围 (0.0 - 1.0] Parameters * size: float 图片相对比例 Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourcePath * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourcePath(String absoluteResPath) * 设置图片的绝对路径 Parameters * absoluteResPath: String 图片绝对路径 Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourceId * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourceId(int resId) * 设置图片的资源 ID Parameters * resId: int 图片资源 ID Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourceBitmap * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setResourceBitmap(Bitmap resBitmap) * 设置图片的 Bitmap 对象 Parameters * resBitmap: Bitmap 图片 bitmap Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkPosition * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setWaterMarkPosition(float x, float y) * 设置水印图片在显示控件中的位置 显示控件的左上角为原点 [0.0,0.0],右下角为 [1.0,1.0] Parameters * x: float 图片 X 坐标值 [0.0 - 1.0] * y: float 图片 Y 坐标值 [0.0 - 1.0] Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setAlpha * [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) setAlpha(int alpha) * 设置水印图片的透明度, [0-255] Parameters * alpha: int 图片的透明度, [0-255] Returns [QNVideoWaterMark](https://developer.qiniu.com/rtc/8706/QNVideoWaterMark/8706/QNVideoWaterMark) getAlpha * int getAlpha() * 获取水印透明度 Returns int getWaterMarkX * float getWaterMarkX() * 获取水印 X 坐标值 Returns float getWaterMarkY * float getWaterMarkY() * 获取水印 Y 坐标值 Returns float getWaterMarkRelativeSize * float getWaterMarkRelativeSize() * 获取水印相对大小 Returns float Enum SIZE * SIZE: enum * Type declaration * LARGE * MEDIUM * SMALL 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,977
QNLogLevel
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLogLevel # QNLogLevel 最近更新时间: 2022-05-12 20:09:26 描述日志等级的枚举类 Index Properties * VERBOSE * INFO * WARNING * ERROR * NONE Properties VERBOSE * VERBOSE 级日志,内容最详细 INFO * INFO 级日志,作为参考信息 WARNING * WARNING 级日志,表示警告,可能存在问题 ERROR * ERROR 级日志,表示已经发生了错误 NONE * 不打印日志 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNLogLevel # QNLogLevel 最近更新时间: 2022-05-12 20:09:26 描述日志等级的枚举类 Index Properties * VERBOSE * INFO * WARNING * ERROR * NONE Properties VERBOSE * VERBOSE 级日志,内容最详细 INFO * INFO 级日志,作为参考信息 WARNING * WARNING 级日志,表示警告,可能存在问题 ERROR * ERROR 级日志,表示已经发生了错误 NONE * 不打印日志 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,981
QNFileLogHelper
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNFileLogHelper # QNFileLogHelper 最近更新时间: 2023-04-21 12:41:59 日志文件辅助类,提供查询日志文件与上传日志文件功能。 > 该接口类已废弃,日志相关接口可参考 > [QNRTC.setLogConfig](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/8732) > 接口 Index Core Methods * getInstance * getLogFiles * reportLogFile Core Methods getInstance * static synchronized [QNFileLogHelper](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/8653/QNFileLogHelper) getInstance() * 获得 QNFileLogHelper 全局唯一实例,单例实现 Returns [QNFileLogHelper](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/8653/QNFileLogHelper) 全局唯一实例 getLogFiles * List<String> getLogFiles() * 获取 SDK 已保存的日志名称列表 > 可能返回为 null Returns SDK 已保存的日志名称列表 reportLogFile * void reportLogFile(String logName, [LogReportCallback](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/10007/LogReportCallback) callback) * 上报日志文件到七牛服务 Parameters * logName: String 日志文件名称 * callback: [LogReportCallback](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/10007/LogReportCallback) 上传结果回调,见 [LogReportCallback](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/10007/LogReportCallback) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNFileLogHelper # QNFileLogHelper 最近更新时间: 2023-04-21 12:41:59 日志文件辅助类,提供查询日志文件与上传日志文件功能。 > 该接口类已废弃,日志相关接口可参考 > [QNRTC.setLogConfig](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/8732) > 接口 Index Core Methods * getInstance * getLogFiles * reportLogFile Core Methods getInstance * static synchronized [QNFileLogHelper](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/8653/QNFileLogHelper) getInstance() * 获得 QNFileLogHelper 全局唯一实例,单例实现 Returns [QNFileLogHelper](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/8653/QNFileLogHelper) 全局唯一实例 getLogFiles * List<String> getLogFiles() * 获取 SDK 已保存的日志名称列表 > 可能返回为 null Returns SDK 已保存的日志名称列表 reportLogFile * void reportLogFile(String logName, [LogReportCallback](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/10007/LogReportCallback) callback) * 上报日志文件到七牛服务 Parameters * logName: String 日志文件名称 * callback: [LogReportCallback](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/10007/LogReportCallback) 上传结果回调,见 [LogReportCallback](https://developer.qiniu.com/rtc/8653/QNFileLogHelper/10007/LogReportCallback) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,982
LogReportCallback
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >LogReportCallback # LogReportCallback 最近更新时间: 2022-05-12 20:09:03 日志文件上传回调的接口类,可作为上传日志功能的参数来监听上传结果,可在调用 [QNFileLogHelper.reportLogFile](https://developer.qiniu.com/rtc/api/8653/QNFileLogHelper#reportLogFile) 接口时传入。 Index Core Methods * onReportSuccess * onReportError Core Methods onReportSuccess * void onReportSuccess(String name) * 当日志文件上传成功时回调 Parameters * name: String 上传成功的文件名称 onReportError * void onReportError(String name, String errorMsg) * 当日志文件上传失败时回调 Parameters * name: String 上传失败的文件名称 * errorMsg: String 上传失败的原因 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >LogReportCallback # LogReportCallback 最近更新时间: 2022-05-12 20:09:03 日志文件上传回调的接口类,可作为上传日志功能的参数来监听上传结果,可在调用 [QNFileLogHelper.reportLogFile](https://developer.qiniu.com/rtc/api/8653/QNFileLogHelper#reportLogFile) 接口时传入。 Index Core Methods * onReportSuccess * onReportError Core Methods onReportSuccess * void onReportSuccess(String name) * 当日志文件上传成功时回调 Parameters * name: String 上传成功的文件名称 onReportError * void onReportError(String name, String errorMsg) * 当日志文件上传失败时回调 Parameters * name: String 上传失败的文件名称 * errorMsg: String 上传失败的原因 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,984
QNErrorCode
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNErrorCode # QNErrorCode 最近更新时间: 2023-08-17 15:47:03 本文主要介绍 Android QNRTC SDK 相关的错误码及其建议的处理方式。 > 若返回的错误码本文未提及,请[提交工单](https://support.qiniu.com/tickets/new)或者联系七牛技术支持同学协助解决 # 房间相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- SUCCESS| 0| 无错误| 无 ERROR_TOKEN_ERROR| 10001| 房间 Token 错误| 表示您提供的房间 token 不符合七牛 token 签算规则,详情请参考 [RoomToken 签发服务](https://developer.qiniu.com/rtc/8813/roomToken) ERROR_TOKEN_EXPIRED| 10002| 房间 Token 过期| 表示您的房间 token 过期,需要重新生成 token 再加入 ERROR_PLAYER_ALREADY_EXIST| 10022| 房间内已经有同名用户| 后台如果配置为开启“禁止自动踢人”,则同一用户重复加入/未正常退出再加入会触发此错误 ERROR_MEDIA_CAP_NOT_SUPPORT| 10054| 媒体协商失败| 表示该设备不支持指定的音视频格式,无法进行连麦的操作 ERROR_AUTH_FAILED| 21001| 加入房间认证失败| 服务验证时出错,可能为服务网络异常,也可能是 token 验证失败,建议检查签算 token 的信息是否异常,若 token 无误,可重新尝试加入房间 ERROR_RECONNECT_FAILED| 21003| 30s 内未能重连成功或者重连时房间已被销毁| 建议检查网络并重新申请 token 加入房间。当发生该错误时,之前创建的转推任务将被服务销毁,如有需要,应在下次成功加入房间后按业务需要恢复 ERROR_FATAL| 21005| 非预期错误| 表示 RTC 生命周期异常,需要释放资源并重新初始化 > **SDK 重连机制:** > > SDK 内部会尝试不断重连,但若 30s 内无法完成有效的重连过程,则超时后的重连请求在到达 RTC 服务后会抛出 > `ERROR_RECONNECT_FAILED` 错误 # 设备采集相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_DEVICE_CAMERA| 23001| 系统摄像头错误,无权限或者摄像头被占用| 请确认应用是否获取 Camera 的权限或者摄像头是否被占用 ERROR_DEVICE_CAMERA_EVICTED| 23002| 摄像头被其他应用抢占| 请确认是否有其他应用抢占摄像头 ERROR_MIC_INIT_FAILED| 23006| 系统麦克风初始化错误,无权限或者麦克风被占用| 请确认应用是否获取音频录制的权限或者麦克风是否被占用 ERROR_MIC_CAPTURE_FAILED| 23007| 麦克风录制失败| 可尝试取消发布并重新发布麦克风 Track # 发布 Track 相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_INVALID_PARAMETER| 10053| 非法参数| 请检查待发布 Track 是否为本地 Track,并且不为空 ERROR_INVALID_STATE| 21002| 非法状态| 请检查是否已经加入房间 ERROR_FATAL| 21005| 非预期错误| RTC 生命周期异常,需要释放资源并重新初始化 # 混音相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED| 22001| 重采样模块创建失败| 请重新尝试混音操作 ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND| 22002| 混音源没有找到有效音轨| 请检查混音源文件是否存在有效音轨 ERROR_AUDIO_MIXING_IO_EXCEPTION| 22003| 混音源文件 IO 错误| 请检查混音源文件是否合法。SDK 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac;若混音的是在线音频,请检查网络是否正常 ERROR_AUDIO_MIXING_DECODER_EXCEPTION| 22004| 音频解码异常| 可通过 start 接口重新尝试混音操作。若混音的是在线音频,请检查网络是否正常 ERROR_AUDIO_MIXING_SEEK_FAILED| 22005| seek 失败| 请检查是否在开始混音前执行了 Seek 操作 # CDN 转推相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_NO_PERMISSION| 10051| 无操作权限| 请确认用户 RoomToken 签算时是否有赋予转推权限 ERROR_INVALID_PARAMETER| 10053| 参数错误| 请检查操作的参数是否合法 ERROR_INVALID_STATE| 21002| 状态异常| 请检查房间状态,加入房间后才可以创建转推任务 ERROR_NETWORK_TIMEOUT| 21004| 操作超时| 请重新尝试操作 ERROR_FATAL| 21005| 服务端错误| 请重新尝试操作或者联系七牛技术支持同学协助定位 ERROR_LIVE_STREAMING_CLOSED| 21009| 转推任务已关闭| 通常服务端禁播或者直播流异常断开会回调此错误 # 跨房媒体转发相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_RELAY_TOKEN_ERROR| 24000| Token 验证失败| 请确认 Token 签算是否正确 ERROR_INVALID_CLIENT_MODE| 24001| 使用场景不符| 请切换到互动直播场景 ERROR_INVALID_CLIENT_ROLE| 24002| 用户角色不符| 请根据当前场景切换到指定角色再进行操作 # 日志上传相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_FETCH_TOKEN| 25001| 获取 token 失败| 请检查网络是否联通,并重新上传 ERROR_READ_FILE| 25002| 读取日志文件失败| 当前日志文件不可用,需重新复现场景并上传 ERROR_INVALID_DIR| 25003| 非法日志文件存储路径| 检查日志文件存储路径的合法性以及是否拥有该路径存储空间的访问权限 ERROR_NETWORK_TIMEOUT| 21004| 操作超时| 保证网络情况良好的情况下,尝试重新操作 其他| 无| 其他错误,可参考[上传错误码](https://developer.qiniu.com/insight/5256/the-error)文档| 根据对应的错误码处理建议处理 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android >QNErrorCode # QNErrorCode 最近更新时间: 2023-08-17 15:47:03 本文主要介绍 Android QNRTC SDK 相关的错误码及其建议的处理方式。 > 若返回的错误码本文未提及,请[提交工单](https://support.qiniu.com/tickets/new)或者联系七牛技术支持同学协助解决 # 房间相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- SUCCESS| 0| 无错误| 无 ERROR_TOKEN_ERROR| 10001| 房间 Token 错误| 表示您提供的房间 token 不符合七牛 token 签算规则,详情请参考 [RoomToken 签发服务](https://developer.qiniu.com/rtc/8813/roomToken) ERROR_TOKEN_EXPIRED| 10002| 房间 Token 过期| 表示您的房间 token 过期,需要重新生成 token 再加入 ERROR_PLAYER_ALREADY_EXIST| 10022| 房间内已经有同名用户| 后台如果配置为开启“禁止自动踢人”,则同一用户重复加入/未正常退出再加入会触发此错误 ERROR_MEDIA_CAP_NOT_SUPPORT| 10054| 媒体协商失败| 表示该设备不支持指定的音视频格式,无法进行连麦的操作 ERROR_AUTH_FAILED| 21001| 加入房间认证失败| 服务验证时出错,可能为服务网络异常,也可能是 token 验证失败,建议检查签算 token 的信息是否异常,若 token 无误,可重新尝试加入房间 ERROR_RECONNECT_FAILED| 21003| 30s 内未能重连成功或者重连时房间已被销毁| 建议检查网络并重新申请 token 加入房间。当发生该错误时,之前创建的转推任务将被服务销毁,如有需要,应在下次成功加入房间后按业务需要恢复 ERROR_FATAL| 21005| 非预期错误| 表示 RTC 生命周期异常,需要释放资源并重新初始化 > **SDK 重连机制:** > > SDK 内部会尝试不断重连,但若 30s 内无法完成有效的重连过程,则超时后的重连请求在到达 RTC 服务后会抛出 > `ERROR_RECONNECT_FAILED` 错误 # 设备采集相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_DEVICE_CAMERA| 23001| 系统摄像头错误,无权限或者摄像头被占用| 请确认应用是否获取 Camera 的权限或者摄像头是否被占用 ERROR_DEVICE_CAMERA_EVICTED| 23002| 摄像头被其他应用抢占| 请确认是否有其他应用抢占摄像头 ERROR_MIC_INIT_FAILED| 23006| 系统麦克风初始化错误,无权限或者麦克风被占用| 请确认应用是否获取音频录制的权限或者麦克风是否被占用 ERROR_MIC_CAPTURE_FAILED| 23007| 麦克风录制失败| 可尝试取消发布并重新发布麦克风 Track # 发布 Track 相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_INVALID_PARAMETER| 10053| 非法参数| 请检查待发布 Track 是否为本地 Track,并且不为空 ERROR_INVALID_STATE| 21002| 非法状态| 请检查是否已经加入房间 ERROR_FATAL| 21005| 非预期错误| RTC 生命周期异常,需要释放资源并重新初始化 # 混音相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_AUDIO_MIXING_RESAMPLE_CREATE_FAILED| 22001| 重采样模块创建失败| 请重新尝试混音操作 ERROR_AUDIO_MIXING_AUDIO_NOT_FOUND| 22002| 混音源没有找到有效音轨| 请检查混音源文件是否存在有效音轨 ERROR_AUDIO_MIXING_IO_EXCEPTION| 22003| 混音源文件 IO 错误| 请检查混音源文件是否合法。SDK 支持的音频文件格式为:aac、mp3、mp4、ogg、opus、wav、m4a、flac;若混音的是在线音频,请检查网络是否正常 ERROR_AUDIO_MIXING_DECODER_EXCEPTION| 22004| 音频解码异常| 可通过 start 接口重新尝试混音操作。若混音的是在线音频,请检查网络是否正常 ERROR_AUDIO_MIXING_SEEK_FAILED| 22005| seek 失败| 请检查是否在开始混音前执行了 Seek 操作 # CDN 转推相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_NO_PERMISSION| 10051| 无操作权限| 请确认用户 RoomToken 签算时是否有赋予转推权限 ERROR_INVALID_PARAMETER| 10053| 参数错误| 请检查操作的参数是否合法 ERROR_INVALID_STATE| 21002| 状态异常| 请检查房间状态,加入房间后才可以创建转推任务 ERROR_NETWORK_TIMEOUT| 21004| 操作超时| 请重新尝试操作 ERROR_FATAL| 21005| 服务端错误| 请重新尝试操作或者联系七牛技术支持同学协助定位 ERROR_LIVE_STREAMING_CLOSED| 21009| 转推任务已关闭| 通常服务端禁播或者直播流异常断开会回调此错误 # 跨房媒体转发相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_RELAY_TOKEN_ERROR| 24000| Token 验证失败| 请确认 Token 签算是否正确 ERROR_INVALID_CLIENT_MODE| 24001| 使用场景不符| 请切换到互动直播场景 ERROR_INVALID_CLIENT_ROLE| 24002| 用户角色不符| 请根据当前场景切换到指定角色再进行操作 # 日志上传相关错误码 枚举值| 错误码| 说明| 处理方式 ---|---|---|--- ERROR_FETCH_TOKEN| 25001| 获取 token 失败| 请检查网络是否联通,并重新上传 ERROR_READ_FILE| 25002| 读取日志文件失败| 当前日志文件不可用,需重新复现场景并上传 ERROR_INVALID_DIR| 25003| 非法日志文件存储路径| 检查日志文件存储路径的合法性以及是否拥有该路径存储空间的访问权限 ERROR_NETWORK_TIMEOUT| 21004| 操作超时| 保证网络情况良好的情况下,尝试重新操作 其他| 无| 其他错误,可参考[上传错误码](https://developer.qiniu.com/insight/5256/the-error)文档| 根据对应的错误码处理建议处理 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,985
QNPlayerEventInfo
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNPlayerEventInfo # QNPlayerEventInfo 最近更新时间: 2024-08-16 17:43:56 播放器事件信息 Index Core Properties * message * errorCode Core Properties message * @property (nonatomic, strong) NSString *message; * 事件说明信息 errorCode * @property (nonatomic, assign) int errorCode; * 错误码 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNPlayerEventInfo # QNPlayerEventInfo 最近更新时间: 2024-08-16 17:43:56 播放器事件信息 Index Core Properties * message * errorCode Core Properties message * @property (nonatomic, strong) NSString *message; * 事件说明信息 errorCode * @property (nonatomic, assign) int errorCode; * 错误码 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,990
QNMediaPlayerDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaPlayerDelegate # QNMediaPlayerDelegate 最近更新时间: 2024-08-16 17:43:43 QNMediaPlayerDelegate 回调代理 Index Core Methods * didPlayerStateChanged * didPlayerEvent * didPlayerPositionChanged Core Methods didPlayerStateChanged * \- (void)mediaPlayer:([QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) *)player didPlayerStateChanged:([QNPlayerState](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/9254))state; * 播放器状态回调 Parameters * player: [QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) 播放器实例 * state: [QNPlayerState](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/9254) 播放器状态 didPlayerEvent * \- (void)mediaPlayer:([QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) *)player didPlayerEvent:([QNPlayerEvent](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/9254))event eventInfo:([QNPlayerEventInfo](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12779/QNPlayerEventInfo-iOS) *)info; * 播放器事件信息回调 Parameters * player: [QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) 播放器实例 * event: [QNPlayerEvent](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/9254) 播放器事件 * info: [QNPlayerEventInfo](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12779/QNPlayerEventInfo-iOS) 事件信息 didPlayerPositionChanged * \- (void)mediaPlayer:([QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) *)player didPlayerPositionChanged:(NSUInteger)position; * 播放器状态回调 Parameters * player: [QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) 播放器实例 * position: NSUInteger 播放进度 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaPlayerDelegate # QNMediaPlayerDelegate 最近更新时间: 2024-08-16 17:43:43 QNMediaPlayerDelegate 回调代理 Index Core Methods * didPlayerStateChanged * didPlayerEvent * didPlayerPositionChanged Core Methods didPlayerStateChanged * \- (void)mediaPlayer:([QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) *)player didPlayerStateChanged:([QNPlayerState](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/9254))state; * 播放器状态回调 Parameters * player: [QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) 播放器实例 * state: [QNPlayerState](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/9254) 播放器状态 didPlayerEvent * \- (void)mediaPlayer:([QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) *)player didPlayerEvent:([QNPlayerEvent](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/9254))event eventInfo:([QNPlayerEventInfo](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12779/QNPlayerEventInfo-iOS) *)info; * 播放器事件信息回调 Parameters * player: [QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) 播放器实例 * event: [QNPlayerEvent](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/9254) 播放器事件 * info: [QNPlayerEventInfo](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12779/QNPlayerEventInfo-iOS) 事件信息 didPlayerPositionChanged * \- (void)mediaPlayer:([QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) *)player didPlayerPositionChanged:(NSUInteger)position; * 播放器状态回调 Parameters * player: [QNMediaPlayer](https://developer.qiniu.com/rtc/12780/qnmediaplayerdelegate/12775/QNMediaPlayer-iOS) 播放器实例 * position: NSUInteger 播放进度 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,991
QNMediaPlayer
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaPlayer # QNMediaPlayer 最近更新时间: 2024-08-16 17:43:32 媒体播放器 Index Core Properties * delegate Core Methods * play * pause * stop * resume * seek * getDuration * getCurrentPosition * setLoopCount * getCurrentPlayerState * setView * getMediaPlayerVideoTrack * getMediaPlayerAudioTrack Core Properties delegate * @property (nonatomic, weak) id<[QNMediaPlayerDelegate](https://developer.qiniu.com/rtc/12775/qnmediaplayer/12780/QNMediaPlayerDelegate)> delegate; * 播放器代理,处理状态和事件等回调信息 Core Methods play * \- (int)play:([QNMediaSource](https://developer.qiniu.com/rtc/12775/qnmediaplayer/12776/QNMediaSource))source; * 开始播放 接口调用后,将会触发 [QNMediaPlayerDelegate](https://developer.qiniu.com/rtc/12775/qnmediaplayer/12780/QNMediaPlayerDelegate) 中的回调 Parameters * source: [QNMediaSource](https://developer.qiniu.com/rtc/12775/qnmediaplayer/12776/QNMediaSource) 播放配置参数 pause * \- (int)pause; * 暂停播放 接口调用成功后,将会触发 [QNMediaPlayerDelegate.didPlayerStateChanged](https://developer.qiniu.com/rtc/12775/qnmediaplayer/undefined) 回调 stop * \- (int)stop; * 停止播放 接口调用成功后,将会触发 [QNMediaPlayerDelegate.didPlayerStateChanged](https://developer.qiniu.com/rtc/12775/qnmediaplayer/undefined) 回调 resume * \- (int)resume; * 恢复播放 接口调用成功后,将会触发 [QNMediaPlayerDelegate.didPlayerStateChanged](https://developer.qiniu.com/rtc/12775/qnmediaplayer/undefined) 回调 seek * \- (int)seek:(NSUInteger)positionMs * seek 到某一点播放 getDuration * \- (int)getDuration * 获取点播文件总时长,直播流获取返回 0。单位(ms) getCurrentPosition * \- (int)getCurrentPosition * 获取播放进度。单位(ms) setLoopCount * \- (int)setLoopCount:(NSInteger)loopCount * 设置循环播放次数。默认值为 1。设置 -1,表示一直循环 getCurrentPlayerState * \- (QNPlayerState)getCurrentPlayerState * 获取播放状态 setView * \- (void)setView:(QNVideoGLView *)videoView * 视频渲染视图 getMediaPlayerVideoTrack * \- (QNCustomVideoTrack *)getMediaPlayerVideoTrack * 获取需要发布到房间内的 VideoTrack,外部拿到 VideoTrack 之后,由调用方通过调用 destroy 进行释放。 getMediaPlayerAudioTrack * \- (QNCustomAudioTrack *)getMediaPlayerAudioTrack * 获取需要发布到房间内的 AudioTrack,外部拿到 AudioTrack 之后,由调用方通过调用 destroy 进行释放。 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaPlayer # QNMediaPlayer 最近更新时间: 2024-08-16 17:43:32 媒体播放器 Index Core Properties * delegate Core Methods * play * pause * stop * resume * seek * getDuration * getCurrentPosition * setLoopCount * getCurrentPlayerState * setView * getMediaPlayerVideoTrack * getMediaPlayerAudioTrack Core Properties delegate * @property (nonatomic, weak) id<[QNMediaPlayerDelegate](https://developer.qiniu.com/rtc/12775/qnmediaplayer/12780/QNMediaPlayerDelegate)> delegate; * 播放器代理,处理状态和事件等回调信息 Core Methods play * \- (int)play:([QNMediaSource](https://developer.qiniu.com/rtc/12775/qnmediaplayer/12776/QNMediaSource))source; * 开始播放 接口调用后,将会触发 [QNMediaPlayerDelegate](https://developer.qiniu.com/rtc/12775/qnmediaplayer/12780/QNMediaPlayerDelegate) 中的回调 Parameters * source: [QNMediaSource](https://developer.qiniu.com/rtc/12775/qnmediaplayer/12776/QNMediaSource) 播放配置参数 pause * \- (int)pause; * 暂停播放 接口调用成功后,将会触发 [QNMediaPlayerDelegate.didPlayerStateChanged](https://developer.qiniu.com/rtc/12775/qnmediaplayer/undefined) 回调 stop * \- (int)stop; * 停止播放 接口调用成功后,将会触发 [QNMediaPlayerDelegate.didPlayerStateChanged](https://developer.qiniu.com/rtc/12775/qnmediaplayer/undefined) 回调 resume * \- (int)resume; * 恢复播放 接口调用成功后,将会触发 [QNMediaPlayerDelegate.didPlayerStateChanged](https://developer.qiniu.com/rtc/12775/qnmediaplayer/undefined) 回调 seek * \- (int)seek:(NSUInteger)positionMs * seek 到某一点播放 getDuration * \- (int)getDuration * 获取点播文件总时长,直播流获取返回 0。单位(ms) getCurrentPosition * \- (int)getCurrentPosition * 获取播放进度。单位(ms) setLoopCount * \- (int)setLoopCount:(NSInteger)loopCount * 设置循环播放次数。默认值为 1。设置 -1,表示一直循环 getCurrentPlayerState * \- (QNPlayerState)getCurrentPlayerState * 获取播放状态 setView * \- (void)setView:(QNVideoGLView *)videoView * 视频渲染视图 getMediaPlayerVideoTrack * \- (QNCustomVideoTrack *)getMediaPlayerVideoTrack * 获取需要发布到房间内的 VideoTrack,外部拿到 VideoTrack 之后,由调用方通过调用 destroy 进行释放。 getMediaPlayerAudioTrack * \- (QNCustomAudioTrack *)getMediaPlayerAudioTrack * 获取需要发布到房间内的 AudioTrack,外部拿到 AudioTrack 之后,由调用方通过调用 destroy 进行释放。 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,993
API 概览
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >API 概览 # API 概览 最近更新时间: 2022-06-30 17:04:40 QNRTC 是七牛推出的一款适用于 iOS 平台的音视频通话 SDK,提供了包括美颜、滤镜、音视频通话等多种功能,提供灵活的接口,支持高度定制以及二次开发,您可以很方便地在 iOS 平台上开发出一款基于实时音视频的应用。 > 本文档适用于 QNRTC 5.x 版本的 SDK,向 4.x 兼容。 > > QNRTC 5.x 是在 4.x 的基础上进行了 API 的优化,从而使使用者能够更加高效的接入,所以新接入的用户推荐使用最新版本的 SDK。 > > 老用户也可以继续使用 QNRTC 3.x 版本,我们也会持续在此版本上进行问题修复和版本更迭,但是后续的一些新功能有可能并不会在 3.x > 版本上提供。若您决定继续使用 3.x 版本 SDK,则可参考 [3.x > 及之前版本的相关文档](https://doc.qnsdk.com/rtn/ios) > > 使用 4.x 或者更低版本的用户若想升级至 v5.x 版本,可参考 [5.x > 版本迁移指南](https://developer.qiniu.com/rtc/development_guidelines/11949/migration- > guide-iOS-v5) 进行升级 QNRTC QNRTC 提供 SDK 的入口方法,可以通过它进行 SDK 的初始化,各个类型 Track 的创建等操作。其核心方法如下: 初始化与反初始化 方法 | 描述 ---|--- [initRTC](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 初始化 SDK [deinit](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 反初始化 SDK 创建 Track 方法 | 描述 ---|--- [createMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建麦克风音频轨道 [createCameraVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建摄像头视频轨道 [createScreenVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建屏幕采集的视频轨道 [createCustomAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建自定义导入音频数据轨道 [createCustomVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建自定义导入视频数据轨道 音频播放路由 方法 | 描述 ---|--- [setAudioRouteToSpeakerphone](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 设置默认音频播放路由为扬声器 QNRTCClient QNRTCClient 提供和房间相关的一系列方法,通过它我们可以实现加入房间,在房间内发布或者订阅相应的音视频轨道等操作。主要的核心方法如下: 核心方法 方法 | 描述 ---|--- [join](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 加入房间 [leave](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 离开房间 [publish](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 发布本地的音视频轨道 [unpublish](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 取消发布本地的音视频轨道 [subscribe](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 订阅远端用户发布的音视频轨道 [unsubscribe](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 取消订阅远端用户发布的音视频轨道 转推 CDN 方法 | 描述 ---|--- [startLiveStreamingWithDirect](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 开始单路转推 [stopLiveStreamingWithDirect](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 停止单路转推 [startLiveStreamingWithTranscoding](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 开始合流转推 [stopLiveStreamingWithTranscoding](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 停止合流转推 [setTranscodingLiveStreamingID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 更新合流转推的布局配置 [removeTranscodingLiveStreamingID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 移除合流转推的布局配置 跨房媒体转发 方法 | 描述 ---|--- [startRoomMediaRelay](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 开启跨房媒体转发 [updateRoomMediaRelay](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 更新跨房媒体转发 [stopRoomMediaRelay](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 停止跨房媒体转发 QNLocalTrack QNLocalTrack 是本地创建的一个音频或者视频轨道,可以通过 QNRTC 来创建各种类型的音视频轨道,例如麦克风采集的音频轨道,摄像头采集的视频轨道,或者屏幕采集的视频轨道等等,我们真正用到的是它所衍生的子类。 以 QNLocalTrack 为基类,向下衍生的子类如下: Hierarchy * [QNLocalTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8856/QNCustomAudioTrack-iOS) * 本地音频轨道 | 描述 ---|--- [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8855/QNMicrophoneAudioTrack-iOS) | 以麦克风采集到的音频数据为数据源创建的音频轨道,提供了音量控制,播放,数据回调等接口,通过 [QNRTC.createMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8856/QNCustomAudioTrack-iOS) | 以外部导入的 PCM 音频数据为数据源创建的音频轨道,可以通过 [pushAudioBuffer](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8856) 方法往房间内推送数据,通过 [QNRTC.createCustomAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 本地视频轨道 | 描述 ---|--- [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8852/QNCameraVideoTrack-iOS) | 以摄像头采集到的视频数据为数据源创建的视频轨道,提供了包括摄像头采集,渲染播放,前后摄像头切换,开启闪光灯,设置曝光度等一系列操作摄像头的方法。通过 [QNRTC.createCameraVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8850/QNScreenVideoTrack-iOS) | 以屏幕采集到的视频数据为数据源创建的视频轨道,提供屏幕录制的权限申请等一些列方法,通过 [QNRTC.createScreenVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8853/QNCustomVideoTrack-iOS) | 以外部导入 kCVPixelFormatType_420YpCbCr8BiPlanarFullRange 和 kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange 格式的视频数据为数据源创建的音频轨道,可以通过 [pushVideoSampleBuffer](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8853) 或 [pushPixelBuffer](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8853) 方法往房间内推送视频数据,通过 [QNRTC.createCustomVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 QNRemoteTrack QNRemoteTrack 是远端用户创建的音视频轨道,本地用户可以通过房间中的事件回调获取。其衍生的子类如下: Hierarchy * [QNRemoteTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8859/QNRemoteAudioTrack-iOS) * 远端音频轨道 | 描述 ---|--- [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8859/QNRemoteAudioTrack-iOS) | 远端用户发布的音频轨道,当可以通过该类来调节播放的音量大小,并且还提供了回调音频数据等方法。 远端视频轨道 | 描述 ---|--- [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8858/QNRemoteVideoTrack-iOS) | 远端用户发布的视频轨道,当可以通过该类来把远端视频画面渲染到视图中,并且还提供了回调视频数据等方法。 QNRTCClientDelegate 房间内的事件可以通过该代理回调进行处理,遵守 QNRTCClient 的 QNRTCClientDelegate。其提供的主要回调方法如下: * 方法 | 描述 ---|--- [didConnectionStateChanged](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 房间状态改变时会触发此回调方法,自己加入房间成功,state 变为 QNConnectionStateConnected,当离开房间时,state 变为 QNConnectionStateIdle。详情可参看 [QNConnectionState](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9254) [didJoinOfUserID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户加入房间时会触发此事件。 [didLeaveOfUserID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户离开房间时会触发此事件。 [didSubscribedRemoteVideoTracks](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 订阅远端用户成功时会触发此事件。 [didUserPublishTracks](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户发布音视频轨道时会触发此事件。 [didUserUnpublishTracks](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户取消发布音视频轨道时会触发此事件。 [didReconnectingOfUserID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户正在重连时会触发此事件。 [didReconnectedOfUserID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户重连成功时会触发此事件。 [didStartLiveStreaming](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 成功创建转推/合流转推任务时会触发此事件。 [didStopLiveStreaming](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 停止转推/合流转推任务时会触发此事件。 [didTranscodingTracksUpdated](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 更新合流布局时会触发此事件。 [didErrorLiveStreaming](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 合流转推出错时会触发此事件。 [didReceiveMessage](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当收到远端用户消息时会触发此事件。 [firstVideoDidDecodeOfTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 远端用户视频首帧解码后会触发此事件。 [didDetachRenderTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 远端用户视频取消渲染到 renderView 上时会触发此事件。 [didMediaRelayStateChanged](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 跨房媒体转发状态变更时会触发此事件。 [remoteTrackMixedDidGetAudioBuffer](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 远端音频 track mix 数据的事件回调。 [didNetworkQualityNotified](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 本地网络质量信息的事件回调。 代理回调 SDK 支持丰富的事件代理回调,不同场景下的回调代理定义如下: * 方法 | 描述 ---|--- [QNRTCDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9551/QNRTCDelegate) | 设备相关的回调代理,包括音频路由改变等回调。 [QNRTCClientDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248/QNRTCClientDelegate) | 房间相关的回调代理,包括房间连接状态、用户加入离开状态等回调。 [QNLocalAudioTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11969/QNLocalAudioTrackDelegate) | 本地音频回调代理,包括音频数据回调等回调。 [QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11970/QNLocalVideoTrackDelegate) | 本地视频回调代理,包括视频数据回调等回调。 [QNRemoteAudioTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11948/QNRemoteAudioTrackDelegate) | 远端音频回调代理,包括音频数据回调、开关静默等回调。 [QNRemoteVideoTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11947/QNRemoteVideoTrackDelegate) | 远端视频回调代理,包括视频数据回调、开关静默等回调。 [QNCustomAudioTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11946/QNCustomAudioTrackDelegate) | 自定义音频回调代理,包括运行过程中发生错误等回调。 [QNScreenVideoTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9582/QNScreenVideoTrackDelegate) | 录屏回调代理,包括录屏运行过程中发生错误等回调。 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >API 概览 # API 概览 最近更新时间: 2022-06-30 17:04:40 QNRTC 是七牛推出的一款适用于 iOS 平台的音视频通话 SDK,提供了包括美颜、滤镜、音视频通话等多种功能,提供灵活的接口,支持高度定制以及二次开发,您可以很方便地在 iOS 平台上开发出一款基于实时音视频的应用。 > 本文档适用于 QNRTC 5.x 版本的 SDK,向 4.x 兼容。 > > QNRTC 5.x 是在 4.x 的基础上进行了 API 的优化,从而使使用者能够更加高效的接入,所以新接入的用户推荐使用最新版本的 SDK。 > > 老用户也可以继续使用 QNRTC 3.x 版本,我们也会持续在此版本上进行问题修复和版本更迭,但是后续的一些新功能有可能并不会在 3.x > 版本上提供。若您决定继续使用 3.x 版本 SDK,则可参考 [3.x > 及之前版本的相关文档](https://doc.qnsdk.com/rtn/ios) > > 使用 4.x 或者更低版本的用户若想升级至 v5.x 版本,可参考 [5.x > 版本迁移指南](https://developer.qiniu.com/rtc/development_guidelines/11949/migration- > guide-iOS-v5) 进行升级 QNRTC QNRTC 提供 SDK 的入口方法,可以通过它进行 SDK 的初始化,各个类型 Track 的创建等操作。其核心方法如下: 初始化与反初始化 方法 | 描述 ---|--- [initRTC](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 初始化 SDK [deinit](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 反初始化 SDK 创建 Track 方法 | 描述 ---|--- [createMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建麦克风音频轨道 [createCameraVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建摄像头视频轨道 [createScreenVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建屏幕采集的视频轨道 [createCustomAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建自定义导入音频数据轨道 [createCustomVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 创建自定义导入视频数据轨道 音频播放路由 方法 | 描述 ---|--- [setAudioRouteToSpeakerphone](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) | 设置默认音频播放路由为扬声器 QNRTCClient QNRTCClient 提供和房间相关的一系列方法,通过它我们可以实现加入房间,在房间内发布或者订阅相应的音视频轨道等操作。主要的核心方法如下: 核心方法 方法 | 描述 ---|--- [join](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 加入房间 [leave](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 离开房间 [publish](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 发布本地的音视频轨道 [unpublish](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 取消发布本地的音视频轨道 [subscribe](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 订阅远端用户发布的音视频轨道 [unsubscribe](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 取消订阅远端用户发布的音视频轨道 转推 CDN 方法 | 描述 ---|--- [startLiveStreamingWithDirect](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 开始单路转推 [stopLiveStreamingWithDirect](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 停止单路转推 [startLiveStreamingWithTranscoding](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 开始合流转推 [stopLiveStreamingWithTranscoding](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 停止合流转推 [setTranscodingLiveStreamingID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 更新合流转推的布局配置 [removeTranscodingLiveStreamingID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 移除合流转推的布局配置 跨房媒体转发 方法 | 描述 ---|--- [startRoomMediaRelay](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 开启跨房媒体转发 [updateRoomMediaRelay](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 更新跨房媒体转发 [stopRoomMediaRelay](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8836) | 停止跨房媒体转发 QNLocalTrack QNLocalTrack 是本地创建的一个音频或者视频轨道,可以通过 QNRTC 来创建各种类型的音视频轨道,例如麦克风采集的音频轨道,摄像头采集的视频轨道,或者屏幕采集的视频轨道等等,我们真正用到的是它所衍生的子类。 以 QNLocalTrack 为基类,向下衍生的子类如下: Hierarchy * [QNLocalTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8856/QNCustomAudioTrack-iOS) * 本地音频轨道 | 描述 ---|--- [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8855/QNMicrophoneAudioTrack-iOS) | 以麦克风采集到的音频数据为数据源创建的音频轨道,提供了音量控制,播放,数据回调等接口,通过 [QNRTC.createMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8856/QNCustomAudioTrack-iOS) | 以外部导入的 PCM 音频数据为数据源创建的音频轨道,可以通过 [pushAudioBuffer](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8856) 方法往房间内推送数据,通过 [QNRTC.createCustomAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 本地视频轨道 | 描述 ---|--- [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8852/QNCameraVideoTrack-iOS) | 以摄像头采集到的视频数据为数据源创建的视频轨道,提供了包括摄像头采集,渲染播放,前后摄像头切换,开启闪光灯,设置曝光度等一系列操作摄像头的方法。通过 [QNRTC.createCameraVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8850/QNScreenVideoTrack-iOS) | 以屏幕采集到的视频数据为数据源创建的视频轨道,提供屏幕录制的权限申请等一些列方法,通过 [QNRTC.createScreenVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8853/QNCustomVideoTrack-iOS) | 以外部导入 kCVPixelFormatType_420YpCbCr8BiPlanarFullRange 和 kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange 格式的视频数据为数据源创建的音频轨道,可以通过 [pushVideoSampleBuffer](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8853) 或 [pushPixelBuffer](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8853) 方法往房间内推送视频数据,通过 [QNRTC.createCustomVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8834) 创建。 QNRemoteTrack QNRemoteTrack 是远端用户创建的音视频轨道,本地用户可以通过房间中的事件回调获取。其衍生的子类如下: Hierarchy * [QNRemoteTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8859/QNRemoteAudioTrack-iOS) * 远端音频轨道 | 描述 ---|--- [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8859/QNRemoteAudioTrack-iOS) | 远端用户发布的音频轨道,当可以通过该类来调节播放的音量大小,并且还提供了回调音频数据等方法。 远端视频轨道 | 描述 ---|--- [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/8858/QNRemoteVideoTrack-iOS) | 远端用户发布的视频轨道,当可以通过该类来把远端视频画面渲染到视图中,并且还提供了回调视频数据等方法。 QNRTCClientDelegate 房间内的事件可以通过该代理回调进行处理,遵守 QNRTCClient 的 QNRTCClientDelegate。其提供的主要回调方法如下: * 方法 | 描述 ---|--- [didConnectionStateChanged](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 房间状态改变时会触发此回调方法,自己加入房间成功,state 变为 QNConnectionStateConnected,当离开房间时,state 变为 QNConnectionStateIdle。详情可参看 [QNConnectionState](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9254) [didJoinOfUserID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户加入房间时会触发此事件。 [didLeaveOfUserID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户离开房间时会触发此事件。 [didSubscribedRemoteVideoTracks](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 订阅远端用户成功时会触发此事件。 [didUserPublishTracks](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户发布音视频轨道时会触发此事件。 [didUserUnpublishTracks](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户取消发布音视频轨道时会触发此事件。 [didReconnectingOfUserID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户正在重连时会触发此事件。 [didReconnectedOfUserID](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当远端用户重连成功时会触发此事件。 [didStartLiveStreaming](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 成功创建转推/合流转推任务时会触发此事件。 [didStopLiveStreaming](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 停止转推/合流转推任务时会触发此事件。 [didTranscodingTracksUpdated](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 更新合流布局时会触发此事件。 [didErrorLiveStreaming](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 合流转推出错时会触发此事件。 [didReceiveMessage](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 当收到远端用户消息时会触发此事件。 [firstVideoDidDecodeOfTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 远端用户视频首帧解码后会触发此事件。 [didDetachRenderTrack](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 远端用户视频取消渲染到 renderView 上时会触发此事件。 [didMediaRelayStateChanged](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 跨房媒体转发状态变更时会触发此事件。 [remoteTrackMixedDidGetAudioBuffer](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 远端音频 track mix 数据的事件回调。 [didNetworkQualityNotified](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248) | 本地网络质量信息的事件回调。 代理回调 SDK 支持丰富的事件代理回调,不同场景下的回调代理定义如下: * 方法 | 描述 ---|--- [QNRTCDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9551/QNRTCDelegate) | 设备相关的回调代理,包括音频路由改变等回调。 [QNRTCClientDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9248/QNRTCClientDelegate) | 房间相关的回调代理,包括房间连接状态、用户加入离开状态等回调。 [QNLocalAudioTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11969/QNLocalAudioTrackDelegate) | 本地音频回调代理,包括音频数据回调等回调。 [QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11970/QNLocalVideoTrackDelegate) | 本地视频回调代理,包括视频数据回调等回调。 [QNRemoteAudioTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11948/QNRemoteAudioTrackDelegate) | 远端音频回调代理,包括音频数据回调、开关静默等回调。 [QNRemoteVideoTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11947/QNRemoteVideoTrackDelegate) | 远端视频回调代理,包括视频数据回调、开关静默等回调。 [QNCustomAudioTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/11946/QNCustomAudioTrackDelegate) | 自定义音频回调代理,包括运行过程中发生错误等回调。 [QNScreenVideoTrackDelegate](https://developer.qiniu.com/rtc/8833/iOS%20API%20%E6%A6%82%E8%A7%88/9582/QNScreenVideoTrackDelegate) | 录屏回调代理,包括录屏运行过程中发生错误等回调。 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
5,996
QNRTC
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTC # QNRTC 最近更新时间: 2024-08-16 17:44:24 QNRTC 作为 SDK 的入口,提供初始化,创建本地音视频轨道,创建 [QNRTCClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8836/QNRTCClient- iOS) 对象等一系列静态方法 Index Core Methods * initRTC * deinit * createRTCClient[1/2] * createRTCClient[2/2] * createCDNStreamingClient * createMicrophoneAudioTrack[1/2] * createMicrophoneAudioTrack[2/2] * createCustomAudioTrack[1/2] * createCustomAudioTrack[2/2] * createCameraVideoTrack[1/2] * createCameraVideoTrack[2/2] * createScreenVideoTrack[1/2] * createScreenVideoTrack[2/2] * createCustomVideoTrack[1/2] * createCustomVideoTrack[2/2] * createMediaRecorder * createMediaPlayer * createAudioMusicMixer * destroyAudioMusicMixer * createAudioEffectMixer * destroyAudioEffectMixer * createAudioSourceMixer * destroyAudioSourceMixer * setRTCDelegate * setAudioRouteToSpeakerphone * setSpeakerphoneMuted * speakerphoneMuted * setAudioScene * enableFileLogging * setLogLevel * setLogConfig * uploadLog[1/2] * uploadLog[2/2] * versionInfo Core Methods initRTC * \+ (void)initRTC:([QNRTCConfiguration](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8838/QNRTCConfiguration-iOS) *)configuration; * 使用默认配置初始化 SDK > 在使用 SDK 接口前,请务必先调用该接口进行 RTC 环境的初始化 Parameters * configuration: [QNRTCConfiguration](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8838/QNRTCConfiguration-iOS) QNRTC 的配置 deinit * \+ (void)deinit; * 反初始化操作 > 在确认不再使用 RTC SDK 后调用此接口释放其占用的资源,此后再次使用 SDK 需重新调用 initRTC 方法 createRTCClient[1/2] * \+ ([QNRTCClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8836/QNRTCClient-iOS) *)createRTCClient; * 创建 [QNRTCClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8836/QNRTCClient-iOS) 对象,且全局只可存在一个 Returns RTC 管理对象 createRTCClient[2/2] * \+ ([QNRTCClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8836/QNRTCClient-iOS) *)createRTCClient:([QNClientConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/10156/QNClientConfig-iOS) *)clientConfig; * 通过指定一个 [QNClientConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/10156/QNClientConfig-iOS) 来创建 QNRTCClient 对象,且全局只可存在一个 其中,[QNClientConfig](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/10156/QNClientConfig-iOS) 用于指定音视频通话的具体场景以及对应的用户角色,默认使用场景为 [QNClientModeRTC](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) Returns RTC 管理对象 createCDNStreamingClient * \+ ([QNCDNStreamingClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12634/QNCDNStreamingClient-iOS) *)createCDNStreamingClient; * 创建 [QNCDNStreamingClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12634/QNCDNStreamingClient-iOS) 实例对象 Returns [QNCDNStreamingClient](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/12634/QNCDNStreamingClient-iOS) createMicrophoneAudioTrack[1/2] * \+ ([QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8855/QNMicrophoneAudioTrack-iOS) *)createMicrophoneAudioTrack; * 创建一个默认的麦克风音频轨道对象,默认 tag 为 "" > 本地音频 Track 只可存在一个,重复创建会返回 nil Returns [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8855/QNMicrophoneAudioTrack-iOS) createMicrophoneAudioTrack[2/2] * \+ ([QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8855/QNMicrophoneAudioTrack-iOS) *)createMicrophoneAudioTrackWithConfig:([QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8837/QNMicrophoneAudioTrackConfig-iOS) *)configuration; * 通过指定一个 [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8837/QNMicrophoneAudioTrackConfig-iOS) 来创建一个麦克风音频轨道对象 > 本地音频 Track 只可存在一个,重复创建会返回 nil Parameters * configuration: [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8837/QNMicrophoneAudioTrackConfig-iOS) 采集音频的配置,可指定音频质量码率 Returns [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8855/QNMicrophoneAudioTrack-iOS) createCustomAudioTrack[1/2] * \+ ([QNCustomAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8856/QNCustomAudioTrack-iOS) *)createCustomAudioTrack; * 创建一个默认的自定义音频轨道对象,默认 tag 为 "" > 本地音频 Track 只可存在一个,重复创建会返回 nil Returns [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8856/QNCustomAudioTrack-iOS) createCustomAudioTrack[2/2] * \+ ([QNCustomAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8856/QNCustomAudioTrack-iOS) *)createCustomAudioTrackWithConfig:([QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8843/QNCustomAudioTrackConfig-iOS) *)configuration; * 通过指定一个 [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8843/QNCustomAudioTrackConfig-iOS) 来创建一个自定义音频轨道对象 > 本地音频 Track 只可存在一个,重复创建会返回 nil Parameters * configuration: [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8843/QNCustomAudioTrackConfig-iOS) 采集音频的配置,可指定音频质量等级 Returns [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8856/QNCustomAudioTrack-iOS) createCameraVideoTrack[1/2] * \+ ([QNCameraVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8852/QNCameraVideoTrack-iOS) *)createCameraVideoTrack; * 创建一个默认的摄像头视频轨道对象,默认 tag 为 "",默认前置、编码尺寸 480x640、24 帧、码率为 600kbps、关闭大小流 Returns [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8852/QNCameraVideoTrack-iOS) createCameraVideoTrack[2/2] * \+ ([QNCameraVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8852/QNCameraVideoTrack-iOS) *)createCameraVideoTrackWithConfig:([QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8844/QNCameraVideoTrackConfig-iOS) *)configuration; * 通过指定一个 [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8844/QNCameraVideoTrackConfig-iOS) 来创建一个摄像头视频轨道对象 Parameters * configuration: [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8844/QNCameraVideoTrackConfig-iOS) 摄像头 Track 的配置,可设置视频的采集配置、编码配置等 Returns [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8852/QNCameraVideoTrack-iOS) createScreenVideoTrack[1/2] * \+ ([QNScreenVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8850/QNScreenVideoTrack-iOS) *)createScreenVideoTrack; * 创建一个默认的屏幕录制轨道对象,默认 tag 为 "",默认码率为 600kbps Returns [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8850/QNScreenVideoTrack-iOS) createScreenVideoTrack[2/2] * \+ ([QNScreenVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8850/QNScreenVideoTrack-iOS) *)createScreenVideoTrackWithConfig:([QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8845/QNScreenVideoTrackConfig-iOS) *)configuration; * 通过指定一个 [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8845/QNScreenVideoTrackConfig-iOS) 来创建一个屏幕录制轨道对象 Parameters * configuration: [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8845/QNScreenVideoTrackConfig-iOS) 屏幕录制 Track 的配置,可设置视频的编码配置与开关大小流功能 Returns [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8850/QNScreenVideoTrack-iOS) createCustomVideoTrack[1/2] * \+ ([QNCustomVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8853/QNCustomVideoTrack-iOS) *)createCustomVideoTrack; * 创建一个默认的自定义视频采集轨道对象,默认 tag 为 "",默认码率为 600kbps Returns [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8853/QNCustomVideoTrack-iOS) createCustomVideoTrack[2/2] * \+ ([QNCustomVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8853/QNCustomVideoTrack-iOS) *)createCustomVideoTrackWithConfig:([QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8846/QNCustomVideoTrackConfig-iOS) *)configuration; * 通过指定一个 [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8846/QNCustomVideoTrackConfig-iOS) 来创建自定义视频采集轨道对象 Parameters * configuration: [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8846/QNCustomVideoTrackConfig-iOS) 自定义视频采集 Track 的配置,可设置视频的编码配置与开关大小流功能 Returns [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8853/QNCustomVideoTrack-iOS) createMediaRecorder * \+ ([QNMediaRecorder](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12685/QNMediaRecorder-iOS) *)createMediaRecorder; * 创建音视频本地录制对象 Returns [QNMediaRecorder](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/12685/QNMediaRecorder-iOS) createMediaPlayer * \+ ([QNMediaPlayer](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12775/QNMediaPlayer-iOS) *)createMediaPlayer; * 创建媒体播放器对象 Returns [QNMediaPlayer](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/12775/QNMediaPlayer-iOS) createAudioMusicMixer * \+ ([QNAudioMusicMixer](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11930/QNAudioMusicMixer-iOS) *)createAudioMusicMixer:(NSString *)musicPath musicMixerDelegate:(id<[QNAudioMusicMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11931/QNAudioMusicMixerDelegate)>)musicMixerDelegate; * 创建背景音乐混音对象实例 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac > 1\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,重新调用本接口创建 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8834/QNRTC- > iOS/11930/QNAudioMusicMixer-iOS) 即可 > > 2\. 建议使用本地文件进行混音,以避免网络环境差引起的混音异常 > > 3\. 若您希望在混合背景音乐的同时添加音效,可参考音效混音相关接口 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/8834/QNRTC- > iOS/11928/QNAudioEffectMixer-iOS) Parameters * musicPath: NSString 音乐文件地址 * musicMixerDelegate: [QNAudioMusicMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11931/QNAudioMusicMixerDelegate) 背景音乐混音代理 Returns [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/11930/QNAudioMusicMixer-iOS) destroyAudioMusicMixer * \- (void)destroyAudioMusicMixer; * 销毁背景音乐混音类 createAudioEffectMixer * \+ ([QNAudioEffectMixer](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11928/QNAudioEffectMixer-iOS) *)createAudioEffectMixer:(id<[QNAudioEffectMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11929/QNAudioEffectMixerDelegate)>)effectMixerDelegate; * 创建音效混音对象实例 > 音效混音支持同时混合多路音效文件 Parameters * effectMixerDelegate: [QNAudioEffectMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11929/QNAudioEffectMixerDelegate) 音效混音代理 Returns 音效混音对象实例 destroyAudioEffectMixer * \- (void)destroyAudioEffectMixer; * 销毁多音效混音类 createAudioSourceMixer * \+ (QNAudioSourceMixer *)createAudioSourceMixer:(id<QNAudioSourceMixerDelegate>)sourceMixerDelegate; * 创建音源混音对象实例 > 音源混音支持同时混合多路 PCM 音频裸数据 Parameters * sourceMixerDelegate: [QNAudioSourceMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12271/QNAudioSourceMixerDelegate) 音源混音代理 Returns 音源混音对象实例 destroyAudioSourceMixer * \- (void)destroyAudioSourceMixer; * 销毁多音源混音类 setRTCDelegate * \+ (void)setRTCDelegate:(id <[QNRTCDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9551/QNRTCDelegate)>)delegate; * 设置 QNRTCDelegate 代理回调。 Parameters * delegate: [QNRTCDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9551/QNRTCDelegate) QNRTCDelegate 代理回调 setAudioRouteToSpeakerphone * \+ (void)setAudioRouteToSpeakerphone:(BOOL)audioRouteToSpeakerphone; * 设置是否将音频路由切换到扬声器,默认为 YES,即音频路由为扬声器。 在未佩戴耳机且音频路由为扬声器的情况下,设置为 NO 之后,会将音频路由切换到听筒。 > 由于系统原因,在某些设备(如 iPhone XS Max、iPhone 8 Plus)上,连接 AirPods > 后无法通过,该接口将声音强制设为扬声器输出。如有需求,可以通过使用 AVRoutePickerView 来切换。 Parameters * audioRouteToSpeakerphone: BOOL 是否将音频路由切换到扬声器 setSpeakerphoneMuted * \+ (void)setSpeakerphoneMuted:(BOOL)mute; * 设置是否静音扬声器,静音后将听不到远端用户的声音,默认为 NO。 Parameters * mute: BOOL 是否静音远端的声音 speakerphoneMuted * \+ (BOOL)speakerphoneMuted; * 获取是否静音扬声器,该值跟房间状态无关,在离开房间后 SDK 并不会重置该值,即会保持您上次设置的值。 Returns BOOL setAudioScene * \+ (void)setAudioScene:([QNAudioScene](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254))audioScene; * 动态切换音频场景,根据实际场景需要切换 具体场景区别详细可见[QNAudioScene](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) enableFileLogging * \+ (void)enableFileLogging; * 开启本地日志保存,默认日志等级为 [QNRTCLogLevelInfo](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 为了不错过日志,建议在 App 启动时开启,日志文件位于 App Container/Library/Caches/Pili/Logs 目录内 > 该接口已废弃,请使用 [setLogConfig](https://developer.qiniu.com/rtc/8834/QNRTC- > iOS/8834) > 文件日志功能主要用于排查问题,打开文件日志功能会对性能有一定影响,上线前请记得关闭文件日志功能 setLogLevel * \+ (void)setLogLevel:([QNRTCLogLevel](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254))level; * 设置日志等级,默认日志等级为 [QNRTCLogLevelInfo](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 如需关闭文件日志功能,设置日志等级为 [QNRTCLogLevelNone](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 即可 > 该接口已废弃,请使用 [setLogConfig](https://developer.qiniu.com/rtc/8834/QNRTC- > iOS/8834) Parameters * level: [QNRTCLogLevel](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 日志等级 setLogConfig * \+ (void)setLogConfig:([QNRTCLogConfiguration](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12502/QNRTCLogConfiguration) *)configuration; * 设置日志文件配置,包括文件存储路径、日志等级、日志文件的大小等 Parameters * configuration: [QNRTCLogConfiguration](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12502/QNRTCLogConfiguration) 日志文件配置对象 uploadLog[1/2] * \+ (void)uploadLog:(nullable [QNUploadLogResultCallback](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254))callback; * 上传本地文件至七牛服务器 Parameters * callback: [QNUploadLogResultCallback](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 上传结果 callback uploadLog[2/2] * \+ (void)uploadLog:(NSString *)token callback:(nullable [QNUploadLogResultCallback](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254))callback; * 上传本地文件至指定的七牛云存储空间 Parameters * token: NSString 上传 Token * callback: [QNUploadLogResultCallback](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 上传结果 callback versionInfo * \+ (NSString *)versionInfo; * 获取 SDK 的版本信息 Returns NSString 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTC # QNRTC 最近更新时间: 2024-08-16 17:44:24 QNRTC 作为 SDK 的入口,提供初始化,创建本地音视频轨道,创建 [QNRTCClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8836/QNRTCClient- iOS) 对象等一系列静态方法 Index Core Methods * initRTC * deinit * createRTCClient[1/2] * createRTCClient[2/2] * createCDNStreamingClient * createMicrophoneAudioTrack[1/2] * createMicrophoneAudioTrack[2/2] * createCustomAudioTrack[1/2] * createCustomAudioTrack[2/2] * createCameraVideoTrack[1/2] * createCameraVideoTrack[2/2] * createScreenVideoTrack[1/2] * createScreenVideoTrack[2/2] * createCustomVideoTrack[1/2] * createCustomVideoTrack[2/2] * createMediaRecorder * createMediaPlayer * createAudioMusicMixer * destroyAudioMusicMixer * createAudioEffectMixer * destroyAudioEffectMixer * createAudioSourceMixer * destroyAudioSourceMixer * setRTCDelegate * setAudioRouteToSpeakerphone * setSpeakerphoneMuted * speakerphoneMuted * setAudioScene * enableFileLogging * setLogLevel * setLogConfig * uploadLog[1/2] * uploadLog[2/2] * versionInfo Core Methods initRTC * \+ (void)initRTC:([QNRTCConfiguration](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8838/QNRTCConfiguration-iOS) *)configuration; * 使用默认配置初始化 SDK > 在使用 SDK 接口前,请务必先调用该接口进行 RTC 环境的初始化 Parameters * configuration: [QNRTCConfiguration](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8838/QNRTCConfiguration-iOS) QNRTC 的配置 deinit * \+ (void)deinit; * 反初始化操作 > 在确认不再使用 RTC SDK 后调用此接口释放其占用的资源,此后再次使用 SDK 需重新调用 initRTC 方法 createRTCClient[1/2] * \+ ([QNRTCClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8836/QNRTCClient-iOS) *)createRTCClient; * 创建 [QNRTCClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8836/QNRTCClient-iOS) 对象,且全局只可存在一个 Returns RTC 管理对象 createRTCClient[2/2] * \+ ([QNRTCClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8836/QNRTCClient-iOS) *)createRTCClient:([QNClientConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/10156/QNClientConfig-iOS) *)clientConfig; * 通过指定一个 [QNClientConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/10156/QNClientConfig-iOS) 来创建 QNRTCClient 对象,且全局只可存在一个 其中,[QNClientConfig](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/10156/QNClientConfig-iOS) 用于指定音视频通话的具体场景以及对应的用户角色,默认使用场景为 [QNClientModeRTC](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) Returns RTC 管理对象 createCDNStreamingClient * \+ ([QNCDNStreamingClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12634/QNCDNStreamingClient-iOS) *)createCDNStreamingClient; * 创建 [QNCDNStreamingClient](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12634/QNCDNStreamingClient-iOS) 实例对象 Returns [QNCDNStreamingClient](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/12634/QNCDNStreamingClient-iOS) createMicrophoneAudioTrack[1/2] * \+ ([QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8855/QNMicrophoneAudioTrack-iOS) *)createMicrophoneAudioTrack; * 创建一个默认的麦克风音频轨道对象,默认 tag 为 "" > 本地音频 Track 只可存在一个,重复创建会返回 nil Returns [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8855/QNMicrophoneAudioTrack-iOS) createMicrophoneAudioTrack[2/2] * \+ ([QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8855/QNMicrophoneAudioTrack-iOS) *)createMicrophoneAudioTrackWithConfig:([QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8837/QNMicrophoneAudioTrackConfig-iOS) *)configuration; * 通过指定一个 [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8837/QNMicrophoneAudioTrackConfig-iOS) 来创建一个麦克风音频轨道对象 > 本地音频 Track 只可存在一个,重复创建会返回 nil Parameters * configuration: [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8837/QNMicrophoneAudioTrackConfig-iOS) 采集音频的配置,可指定音频质量码率 Returns [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8855/QNMicrophoneAudioTrack-iOS) createCustomAudioTrack[1/2] * \+ ([QNCustomAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8856/QNCustomAudioTrack-iOS) *)createCustomAudioTrack; * 创建一个默认的自定义音频轨道对象,默认 tag 为 "" > 本地音频 Track 只可存在一个,重复创建会返回 nil Returns [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8856/QNCustomAudioTrack-iOS) createCustomAudioTrack[2/2] * \+ ([QNCustomAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8856/QNCustomAudioTrack-iOS) *)createCustomAudioTrackWithConfig:([QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8843/QNCustomAudioTrackConfig-iOS) *)configuration; * 通过指定一个 [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8843/QNCustomAudioTrackConfig-iOS) 来创建一个自定义音频轨道对象 > 本地音频 Track 只可存在一个,重复创建会返回 nil Parameters * configuration: [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8843/QNCustomAudioTrackConfig-iOS) 采集音频的配置,可指定音频质量等级 Returns [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8856/QNCustomAudioTrack-iOS) createCameraVideoTrack[1/2] * \+ ([QNCameraVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8852/QNCameraVideoTrack-iOS) *)createCameraVideoTrack; * 创建一个默认的摄像头视频轨道对象,默认 tag 为 "",默认前置、编码尺寸 480x640、24 帧、码率为 600kbps、关闭大小流 Returns [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8852/QNCameraVideoTrack-iOS) createCameraVideoTrack[2/2] * \+ ([QNCameraVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8852/QNCameraVideoTrack-iOS) *)createCameraVideoTrackWithConfig:([QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8844/QNCameraVideoTrackConfig-iOS) *)configuration; * 通过指定一个 [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8844/QNCameraVideoTrackConfig-iOS) 来创建一个摄像头视频轨道对象 Parameters * configuration: [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8844/QNCameraVideoTrackConfig-iOS) 摄像头 Track 的配置,可设置视频的采集配置、编码配置等 Returns [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8852/QNCameraVideoTrack-iOS) createScreenVideoTrack[1/2] * \+ ([QNScreenVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8850/QNScreenVideoTrack-iOS) *)createScreenVideoTrack; * 创建一个默认的屏幕录制轨道对象,默认 tag 为 "",默认码率为 600kbps Returns [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8850/QNScreenVideoTrack-iOS) createScreenVideoTrack[2/2] * \+ ([QNScreenVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8850/QNScreenVideoTrack-iOS) *)createScreenVideoTrackWithConfig:([QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8845/QNScreenVideoTrackConfig-iOS) *)configuration; * 通过指定一个 [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8845/QNScreenVideoTrackConfig-iOS) 来创建一个屏幕录制轨道对象 Parameters * configuration: [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8845/QNScreenVideoTrackConfig-iOS) 屏幕录制 Track 的配置,可设置视频的编码配置与开关大小流功能 Returns [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8850/QNScreenVideoTrack-iOS) createCustomVideoTrack[1/2] * \+ ([QNCustomVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8853/QNCustomVideoTrack-iOS) *)createCustomVideoTrack; * 创建一个默认的自定义视频采集轨道对象,默认 tag 为 "",默认码率为 600kbps Returns [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8853/QNCustomVideoTrack-iOS) createCustomVideoTrack[2/2] * \+ ([QNCustomVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8853/QNCustomVideoTrack-iOS) *)createCustomVideoTrackWithConfig:([QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8846/QNCustomVideoTrackConfig-iOS) *)configuration; * 通过指定一个 [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8846/QNCustomVideoTrackConfig-iOS) 来创建自定义视频采集轨道对象 Parameters * configuration: [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/8846/QNCustomVideoTrackConfig-iOS) 自定义视频采集 Track 的配置,可设置视频的编码配置与开关大小流功能 Returns [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/8853/QNCustomVideoTrack-iOS) createMediaRecorder * \+ ([QNMediaRecorder](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12685/QNMediaRecorder-iOS) *)createMediaRecorder; * 创建音视频本地录制对象 Returns [QNMediaRecorder](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/12685/QNMediaRecorder-iOS) createMediaPlayer * \+ ([QNMediaPlayer](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12775/QNMediaPlayer-iOS) *)createMediaPlayer; * 创建媒体播放器对象 Returns [QNMediaPlayer](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/12775/QNMediaPlayer-iOS) createAudioMusicMixer * \+ ([QNAudioMusicMixer](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11930/QNAudioMusicMixer-iOS) *)createAudioMusicMixer:(NSString *)musicPath musicMixerDelegate:(id<[QNAudioMusicMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11931/QNAudioMusicMixerDelegate)>)musicMixerDelegate; * 创建背景音乐混音对象实例 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac > 1\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,重新调用本接口创建 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8834/QNRTC- > iOS/11930/QNAudioMusicMixer-iOS) 即可 > > 2\. 建议使用本地文件进行混音,以避免网络环境差引起的混音异常 > > 3\. 若您希望在混合背景音乐的同时添加音效,可参考音效混音相关接口 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/8834/QNRTC- > iOS/11928/QNAudioEffectMixer-iOS) Parameters * musicPath: NSString 音乐文件地址 * musicMixerDelegate: [QNAudioMusicMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11931/QNAudioMusicMixerDelegate) 背景音乐混音代理 Returns [QNAudioMusicMixer](https://developer.qiniu.com/rtc/8834/QNRTC- iOS/11930/QNAudioMusicMixer-iOS) destroyAudioMusicMixer * \- (void)destroyAudioMusicMixer; * 销毁背景音乐混音类 createAudioEffectMixer * \+ ([QNAudioEffectMixer](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11928/QNAudioEffectMixer-iOS) *)createAudioEffectMixer:(id<[QNAudioEffectMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11929/QNAudioEffectMixerDelegate)>)effectMixerDelegate; * 创建音效混音对象实例 > 音效混音支持同时混合多路音效文件 Parameters * effectMixerDelegate: [QNAudioEffectMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/11929/QNAudioEffectMixerDelegate) 音效混音代理 Returns 音效混音对象实例 destroyAudioEffectMixer * \- (void)destroyAudioEffectMixer; * 销毁多音效混音类 createAudioSourceMixer * \+ (QNAudioSourceMixer *)createAudioSourceMixer:(id<QNAudioSourceMixerDelegate>)sourceMixerDelegate; * 创建音源混音对象实例 > 音源混音支持同时混合多路 PCM 音频裸数据 Parameters * sourceMixerDelegate: [QNAudioSourceMixerDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12271/QNAudioSourceMixerDelegate) 音源混音代理 Returns 音源混音对象实例 destroyAudioSourceMixer * \- (void)destroyAudioSourceMixer; * 销毁多音源混音类 setRTCDelegate * \+ (void)setRTCDelegate:(id <[QNRTCDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9551/QNRTCDelegate)>)delegate; * 设置 QNRTCDelegate 代理回调。 Parameters * delegate: [QNRTCDelegate](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9551/QNRTCDelegate) QNRTCDelegate 代理回调 setAudioRouteToSpeakerphone * \+ (void)setAudioRouteToSpeakerphone:(BOOL)audioRouteToSpeakerphone; * 设置是否将音频路由切换到扬声器,默认为 YES,即音频路由为扬声器。 在未佩戴耳机且音频路由为扬声器的情况下,设置为 NO 之后,会将音频路由切换到听筒。 > 由于系统原因,在某些设备(如 iPhone XS Max、iPhone 8 Plus)上,连接 AirPods > 后无法通过,该接口将声音强制设为扬声器输出。如有需求,可以通过使用 AVRoutePickerView 来切换。 Parameters * audioRouteToSpeakerphone: BOOL 是否将音频路由切换到扬声器 setSpeakerphoneMuted * \+ (void)setSpeakerphoneMuted:(BOOL)mute; * 设置是否静音扬声器,静音后将听不到远端用户的声音,默认为 NO。 Parameters * mute: BOOL 是否静音远端的声音 speakerphoneMuted * \+ (BOOL)speakerphoneMuted; * 获取是否静音扬声器,该值跟房间状态无关,在离开房间后 SDK 并不会重置该值,即会保持您上次设置的值。 Returns BOOL setAudioScene * \+ (void)setAudioScene:([QNAudioScene](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254))audioScene; * 动态切换音频场景,根据实际场景需要切换 具体场景区别详细可见[QNAudioScene](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) enableFileLogging * \+ (void)enableFileLogging; * 开启本地日志保存,默认日志等级为 [QNRTCLogLevelInfo](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 为了不错过日志,建议在 App 启动时开启,日志文件位于 App Container/Library/Caches/Pili/Logs 目录内 > 该接口已废弃,请使用 [setLogConfig](https://developer.qiniu.com/rtc/8834/QNRTC- > iOS/8834) > 文件日志功能主要用于排查问题,打开文件日志功能会对性能有一定影响,上线前请记得关闭文件日志功能 setLogLevel * \+ (void)setLogLevel:([QNRTCLogLevel](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254))level; * 设置日志等级,默认日志等级为 [QNRTCLogLevelInfo](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 如需关闭文件日志功能,设置日志等级为 [QNRTCLogLevelNone](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 即可 > 该接口已废弃,请使用 [setLogConfig](https://developer.qiniu.com/rtc/8834/QNRTC- > iOS/8834) Parameters * level: [QNRTCLogLevel](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 日志等级 setLogConfig * \+ (void)setLogConfig:([QNRTCLogConfiguration](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12502/QNRTCLogConfiguration) *)configuration; * 设置日志文件配置,包括文件存储路径、日志等级、日志文件的大小等 Parameters * configuration: [QNRTCLogConfiguration](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/12502/QNRTCLogConfiguration) 日志文件配置对象 uploadLog[1/2] * \+ (void)uploadLog:(nullable [QNUploadLogResultCallback](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254))callback; * 上传本地文件至七牛服务器 Parameters * callback: [QNUploadLogResultCallback](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 上传结果 callback uploadLog[2/2] * \+ (void)uploadLog:(NSString *)token callback:(nullable [QNUploadLogResultCallback](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254))callback; * 上传本地文件至指定的七牛云存储空间 Parameters * token: NSString 上传 Token * callback: [QNUploadLogResultCallback](https://developer.qiniu.com/rtc/8834/QNRTC-iOS/9254) 上传结果 callback versionInfo * \+ (NSString *)versionInfo; * 获取 SDK 的版本信息 Returns NSString 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,006
QNRTCConfiguration
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCConfiguration # QNRTCConfiguration 最近更新时间: 2023-10-20 15:10:18 RTC 相关配置 Index Core Properties * policy * maintainResolutionEnabled * communicationModeOn * audioScene * reconnectionTimeout * encoderType * mcuDomains Core Methods * defaultConfiguration * initWithPolicy[1/6] * initWithPolicy[2/6] * initWithPolicy[3/6] * initWithPolicy[4/6] * initWithPolicy[5/6] * initWithPolicy[6/6] Core Properties policy * @property (nonatomic, assign, readonly) [QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) policy; * 媒体流的连接方式,默认 [QNRTCPolicyForceUDP](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) maintainResolutionEnabled * @property (nonatomic, assign, readonly) BOOL maintainResolutionEnabled; * 固定分辨率,默认为 NO > 该接口已废弃,请使用 > [QNVideoEncoderConfig.initWithBitrate[4/4]](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- > iOS/11944) communicationModeOn * @property (nonatomic, assign, readonly) BOOL communicationModeOn; * 是否使用通话模式,默认为 YES 使用声卡并配戴耳机的情况下,建议关闭该配置,可解决声卡模式不匹配带来的音频异常无效等问题 关闭该模式将直接关闭硬件回声消除,不佩戴耳机的情况下连麦,可能出现回声 > 该接口已废弃,请使用 > [QNRTCConfiguration.initWithPolicy[4/4]](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- > iOS/8838) audioScene * @property (nonatomic, assign, readonly) [QNAudioScene](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) audioScene; * 音频场景,默认为 [QNAudioSceneDefault](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) 可通过 QNRTC 调用 setAudioScene 动态设置 reconnectionTimeout * @property (nonatomic, assign, readonly) int reconnectionTimeout; * SDK 与七牛服务器由于网络原因断开后,内部尝试重连的超时时间,单位: ms,默认 30s 建议在重连超时收到 QNRTCErrorNetworkTimeout 后做新的业务处理 encoderType * @property (nonatomic, assign, readonly) [QNVideoEncoderType](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) encoderType; * 设置编码器类型,默认使用 [QNVideoEncoderToolboxH264](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) mcuDomains * @property (nonatomic, strong) NSArray* mcuDomains; * 预设登录服务器域名。当设置 mcuDomain 自定义域名,默认优先访问自定义域名,自定义域名访问异常时,内部会自动会切到默认域名进行访 Core Methods defaultConfiguration * \+ (instancetype)defaultConfiguration; * 使用默认 UDP 的媒体流连接方式,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[1/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy; * 指定媒体流的连接方式,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[2/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy maintainResolutionEnabled:(BOOL)maintainResolutionEnabled; * 指定媒体流的连接方式、是否开关固定分辨率,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 > 该接口已废弃,请使用 > [QNVideoEncoderConfig.initWithBitrate[4/4]](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- > iOS/11944) Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[3/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy maintainResolutionEnabled:(BOOL)maintainResolutionEnabled communicationModeOn:(BOOL)communicationModeOn; * 指定媒体流的连接方式、是否开关固定分辨率、是否使用通话模式,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 > 该接口已废弃,请使用 > QNVideoEncoderConfig.initWithBitrate[4/4]、[QNRTCConfiguration.initWithPolicy[4/4]](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- > iOS/8838) Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[4/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy audioScene:([QNAudioScene](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))audioScene; * 用指定的 policy 、audioScene,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[5/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy audioScene:([QNAudioScene](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))audioScene reconnectionTimeout:(int)reconnectionTimeout; * 用指定的 policy 、audioScene,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[6/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy audioScene:(QNAudioScene)audioScene reconnectionTimeout:(int)reconnectionTimeout encoderType:([QNVideoEncoderType](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))encoderType; * 用指定的 policy 、audioScene、reconnectionTimeout、encoderType,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCConfiguration # QNRTCConfiguration 最近更新时间: 2023-10-20 15:10:18 RTC 相关配置 Index Core Properties * policy * maintainResolutionEnabled * communicationModeOn * audioScene * reconnectionTimeout * encoderType * mcuDomains Core Methods * defaultConfiguration * initWithPolicy[1/6] * initWithPolicy[2/6] * initWithPolicy[3/6] * initWithPolicy[4/6] * initWithPolicy[5/6] * initWithPolicy[6/6] Core Properties policy * @property (nonatomic, assign, readonly) [QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) policy; * 媒体流的连接方式,默认 [QNRTCPolicyForceUDP](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) maintainResolutionEnabled * @property (nonatomic, assign, readonly) BOOL maintainResolutionEnabled; * 固定分辨率,默认为 NO > 该接口已废弃,请使用 > [QNVideoEncoderConfig.initWithBitrate[4/4]](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- > iOS/11944) communicationModeOn * @property (nonatomic, assign, readonly) BOOL communicationModeOn; * 是否使用通话模式,默认为 YES 使用声卡并配戴耳机的情况下,建议关闭该配置,可解决声卡模式不匹配带来的音频异常无效等问题 关闭该模式将直接关闭硬件回声消除,不佩戴耳机的情况下连麦,可能出现回声 > 该接口已废弃,请使用 > [QNRTCConfiguration.initWithPolicy[4/4]](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- > iOS/8838) audioScene * @property (nonatomic, assign, readonly) [QNAudioScene](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) audioScene; * 音频场景,默认为 [QNAudioSceneDefault](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) 可通过 QNRTC 调用 setAudioScene 动态设置 reconnectionTimeout * @property (nonatomic, assign, readonly) int reconnectionTimeout; * SDK 与七牛服务器由于网络原因断开后,内部尝试重连的超时时间,单位: ms,默认 30s 建议在重连超时收到 QNRTCErrorNetworkTimeout 后做新的业务处理 encoderType * @property (nonatomic, assign, readonly) [QNVideoEncoderType](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) encoderType; * 设置编码器类型,默认使用 [QNVideoEncoderToolboxH264](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254) mcuDomains * @property (nonatomic, strong) NSArray* mcuDomains; * 预设登录服务器域名。当设置 mcuDomain 自定义域名,默认优先访问自定义域名,自定义域名访问异常时,内部会自动会切到默认域名进行访 Core Methods defaultConfiguration * \+ (instancetype)defaultConfiguration; * 使用默认 UDP 的媒体流连接方式,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[1/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy; * 指定媒体流的连接方式,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[2/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy maintainResolutionEnabled:(BOOL)maintainResolutionEnabled; * 指定媒体流的连接方式、是否开关固定分辨率,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 > 该接口已废弃,请使用 > [QNVideoEncoderConfig.initWithBitrate[4/4]](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- > iOS/11944) Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[3/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy maintainResolutionEnabled:(BOOL)maintainResolutionEnabled communicationModeOn:(BOOL)communicationModeOn; * 指定媒体流的连接方式、是否开关固定分辨率、是否使用通话模式,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 > 该接口已废弃,请使用 > QNVideoEncoderConfig.initWithBitrate[4/4]、[QNRTCConfiguration.initWithPolicy[4/4]](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- > iOS/8838) Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[4/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy audioScene:([QNAudioScene](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))audioScene; * 用指定的 policy 、audioScene,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[5/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy audioScene:([QNAudioScene](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))audioScene reconnectionTimeout:(int)reconnectionTimeout; * 用指定的 policy 、audioScene,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) initWithPolicy[6/6] * \- (instancetype)initWithPolicy:([QNRTCPolicy](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))policy audioScene:(QNAudioScene)audioScene reconnectionTimeout:(int)reconnectionTimeout encoderType:([QNVideoEncoderType](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/9254))encoderType; * 用指定的 policy 、audioScene、reconnectionTimeout、encoderType,创建 [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration-iOS/8838/QNRTCConfiguration-iOS) 对象 Returns [QNRTCConfiguration](https://developer.qiniu.com/rtc/8838/QNRTCConfiguration- iOS/8838/QNRTCConfiguration-iOS) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,024
QNRTCLogConfiguration
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCLogConfiguration # QNRTCLogConfiguration 最近更新时间: 2023-07-07 21:12:39 日志文件相关配置 Index Core Properties * dir * tag * maxSizeInBytes * level Core Methods * defaultConfiguration * initWithLogLevel Core Properties dir * @property (nonatomic, strong) NSString *dir; * log 文件存储路径 默认日志文件位于 App Container/Library/Caches/Pili/Logs 目录内 tag * @property (nonatomic, strong) NSString *tag; * 唯一标识,用于区分客户及用户 建议传入用户 userID 等唯一标识符;若用户未设置,则默认使用 deviceID 区分 maxSizeInBytes * @property (nonatomic, assign) long maxSizeInBytes; * 文件最大 size 默认为 3MB,传 0 则代表不需要写日志 level * @property (nonatomic, assign) [QNRTCLogLevel](https://developer.qiniu.com/rtc/12502/QNRTCLogConfiguration/9254) level; * 日志等级 Core Methods defaultConfiguration * \+ (instancetype)defaultRTCLogConfig; * 初始化使用默认存储到 App 沙盒的 Container/Library/Caches/Pili/Logs 目录内 默认日志等级是 QNRTCLogLevelInfo,最多存储 3 个文件,默认每个文件大小的最大限制为 3MB,文件大小限制最多不可超过 10MB Returns [QNRTCLogConfiguration](https://developer.qiniu.com/rtc/12502/QNRTCLogConfiguration/12502/QNRTCLogConfiguration) initWithLogLevel * \- (instancetype)initWithLogLevel:([QNRTCLogLevel](https://developer.qiniu.com/rtc/12502/QNRTCLogConfiguration/9254))level; * 初始化使用自定义日志等级,配置存储到 App 沙盒 最多存储 3 个文件,默认每个文件大小的最大限制为 3MB,文件大小限制最多不可超过 10 MB Returns [QNRTCLogConfiguration](https://developer.qiniu.com/rtc/12502/QNRTCLogConfiguration/12502/QNRTCLogConfiguration) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCLogConfiguration # QNRTCLogConfiguration 最近更新时间: 2023-07-07 21:12:39 日志文件相关配置 Index Core Properties * dir * tag * maxSizeInBytes * level Core Methods * defaultConfiguration * initWithLogLevel Core Properties dir * @property (nonatomic, strong) NSString *dir; * log 文件存储路径 默认日志文件位于 App Container/Library/Caches/Pili/Logs 目录内 tag * @property (nonatomic, strong) NSString *tag; * 唯一标识,用于区分客户及用户 建议传入用户 userID 等唯一标识符;若用户未设置,则默认使用 deviceID 区分 maxSizeInBytes * @property (nonatomic, assign) long maxSizeInBytes; * 文件最大 size 默认为 3MB,传 0 则代表不需要写日志 level * @property (nonatomic, assign) [QNRTCLogLevel](https://developer.qiniu.com/rtc/12502/QNRTCLogConfiguration/9254) level; * 日志等级 Core Methods defaultConfiguration * \+ (instancetype)defaultRTCLogConfig; * 初始化使用默认存储到 App 沙盒的 Container/Library/Caches/Pili/Logs 目录内 默认日志等级是 QNRTCLogLevelInfo,最多存储 3 个文件,默认每个文件大小的最大限制为 3MB,文件大小限制最多不可超过 10MB Returns [QNRTCLogConfiguration](https://developer.qiniu.com/rtc/12502/QNRTCLogConfiguration/12502/QNRTCLogConfiguration) initWithLogLevel * \- (instancetype)initWithLogLevel:([QNRTCLogLevel](https://developer.qiniu.com/rtc/12502/QNRTCLogConfiguration/9254))level; * 初始化使用自定义日志等级,配置存储到 App 沙盒 最多存储 3 个文件,默认每个文件大小的最大限制为 3MB,文件大小限制最多不可超过 10 MB Returns [QNRTCLogConfiguration](https://developer.qiniu.com/rtc/12502/QNRTCLogConfiguration/12502/QNRTCLogConfiguration) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,031
QNClientConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNClientConfig # QNClientConfig 最近更新时间: 2022-06-30 15:07:23 用来配置 QNRTCClient 的相关信息 Index Core Properties * mode * role Core methods * defaultClientConfig * initWithMode[1/2] * initWithMode[2/2] Core Properties mode * @property (nonatomic, assign, readonly) [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) mode; * 使用场景,默认为 [QNClientModeRTC](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) role * @property (nonatomic, assign, readonly) [QNClientRole](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) role; * 用户角色,仅在 [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 为 [QNClientModeLive](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 时可用 Core methods defaultClientConfig * \+ (instancetype)defaultClientConfig; * 使用默认 [QNClientModeRTC](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254),创建 [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/undefined) 对象 Returns [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig- iOS/undefined) initWithMode[1/2] * \- (instancetype)initWithMode:([QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254))mode; * 使用用指定的 [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254),创建 [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/undefined) 对象 > 注意:调用此方法将场景设置为互动直播时,角色默认为观众 Parameters * mode: [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 使用场景 Returns [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig- iOS/undefined) initWithMode[2/2] * \- (instancetype)initWithMode:([QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254))mode role:([QNClientRole](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254))role; * 使用用指定的 [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254)、[QNClientRole](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254),创建 [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/undefined) 对象 > 注意:此方法适用于将场景设置为互动直播时,指定相应角色;场景设置为互动通信时,指定角色无效。 Parameters * mode: [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 使用场景 * role: [QNClientRole](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 用户角色 Returns [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig- iOS/undefined) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNClientConfig # QNClientConfig 最近更新时间: 2022-06-30 15:07:23 用来配置 QNRTCClient 的相关信息 Index Core Properties * mode * role Core methods * defaultClientConfig * initWithMode[1/2] * initWithMode[2/2] Core Properties mode * @property (nonatomic, assign, readonly) [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) mode; * 使用场景,默认为 [QNClientModeRTC](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) role * @property (nonatomic, assign, readonly) [QNClientRole](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) role; * 用户角色,仅在 [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 为 [QNClientModeLive](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 时可用 Core methods defaultClientConfig * \+ (instancetype)defaultClientConfig; * 使用默认 [QNClientModeRTC](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254),创建 [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/undefined) 对象 Returns [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig- iOS/undefined) initWithMode[1/2] * \- (instancetype)initWithMode:([QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254))mode; * 使用用指定的 [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254),创建 [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/undefined) 对象 > 注意:调用此方法将场景设置为互动直播时,角色默认为观众 Parameters * mode: [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 使用场景 Returns [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig- iOS/undefined) initWithMode[2/2] * \- (instancetype)initWithMode:([QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254))mode role:([QNClientRole](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254))role; * 使用用指定的 [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254)、[QNClientRole](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254),创建 [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/undefined) 对象 > 注意:此方法适用于将场景设置为互动直播时,指定相应角色;场景设置为互动通信时,指定角色无效。 Parameters * mode: [QNClientMode](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 使用场景 * role: [QNClientRole](https://developer.qiniu.com/rtc/10156/QNClientConfig-iOS/9254) 用户角色 Returns [QNClientConfig](https://developer.qiniu.com/rtc/10156/QNClientConfig- iOS/undefined) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,034
QNCDNStreamingConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCDNStreamingConfig # QNCDNStreamingConfig 最近更新时间: 2024-01-12 15:34:04 RTMP 推流的配置类 Index Core Properties * publishUrl * audioTrack * videoTrack * enableQuic * reconnectCount * bufferingTime Core Properties publishUrl * @property (nonatomic, copy) NSString *publishUrl; * RTMP 推流地址 audioTrack * @property (nonatomic, strong) [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12636/QNCDNStreamingConfig-iOS/8854/QNLocalAudioTrack-iOS) *audioTrack; * 推流需要的 audioTrack, 可以是 microphoneTrack 或者 customAudioTrack videoTrack * @property (nonatomic, strong) [QNLocalVideoTrack](https://developer.qiniu.com/rtc/12636/QNCDNStreamingConfig-iOS/8849/QNLocalVideoTrack-iOS) *videoTrack; * 推流需要的 videoTrack, 可以是 cameraTrack 或者 customVideoTrack enableQuic * @property (nonatomic, assign) BOOL enableQuic; * 是否打开 quic, 默认关闭 reconnectCount * @property (nonatomic, assign) uint32_t reconnectCount; * 重连次数,默认 3 次 bufferingTime * @property (nonatomic, assign) uint32_t bufferingTime; * 推流缓存最大时长, 单位ms, 默认 5000 ms 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCDNStreamingConfig # QNCDNStreamingConfig 最近更新时间: 2024-01-12 15:34:04 RTMP 推流的配置类 Index Core Properties * publishUrl * audioTrack * videoTrack * enableQuic * reconnectCount * bufferingTime Core Properties publishUrl * @property (nonatomic, copy) NSString *publishUrl; * RTMP 推流地址 audioTrack * @property (nonatomic, strong) [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12636/QNCDNStreamingConfig-iOS/8854/QNLocalAudioTrack-iOS) *audioTrack; * 推流需要的 audioTrack, 可以是 microphoneTrack 或者 customAudioTrack videoTrack * @property (nonatomic, strong) [QNLocalVideoTrack](https://developer.qiniu.com/rtc/12636/QNCDNStreamingConfig-iOS/8849/QNLocalVideoTrack-iOS) *videoTrack; * 推流需要的 videoTrack, 可以是 cameraTrack 或者 customVideoTrack enableQuic * @property (nonatomic, assign) BOOL enableQuic; * 是否打开 quic, 默认关闭 reconnectCount * @property (nonatomic, assign) uint32_t reconnectCount; * 重连次数,默认 3 次 bufferingTime * @property (nonatomic, assign) uint32_t bufferingTime; * 推流缓存最大时长, 单位ms, 默认 5000 ms 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,037
QNRTCClient
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCClient # QNRTCClient 最近更新时间: 2023-11-20 11:12:45 RTC 核心类,包含加入房间,离开房间,订阅、发布 Track,获取统计信息等功能 Index Core Properties * delegate * connectionState * autoSubscribe * remoteUserList * publishedTracks Core Methods * setClientRole * join[1/2] * join[2/2] * leave * publish[1/2] * publish[2/2] * unpublish * subscribe * unsubscribe * startLiveStreamingWithDirect * startLiveStreamingWithTranscoding * stopLiveStreamingWithDirect * stopLiveStreamingWithTranscoding * setTranscodingLiveStreamingID * removeTranscodingLiveStreamingID * startRoomMediaRelay * updateRoomMediaRelay * stopRoomMediaRelay * sendMessage * getRemoteUser * getUserNetworkQuality * getRemoteVideoTrackStats * getRemoteAudioTrackStats * getLocalVideoTrackStats * getLocalAudioTrackStats * enableAudioVolumeIndication Core Properties delegate * @property (nonatomic, weak) id<[QNRTCClientDelegate](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9248/QNRTCClientDelegate)> delegate; * RTC Client 的状态回调代理 connectionState * @property (nonatomic, assign, readonly) [QNConnectionState](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254) connectionState; * RTC client 的房间状态 autoSubscribe * @property (nonatomic, assign) BOOL autoSubscribe; * 是否自动订阅远端的流,默认为 YES 当开启此选项后,房间内有任意用户新发布 Track 的时候,会自动订阅此路 Track,订阅成功后,会触发 [QNRTCClientDelegate.didSubscribedRemoteVideoTracks](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 remoteUserList * @property (nonatomic, strong, readonly) NSArray<[QNRemoteUser](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8835/QNRemoteUser-iOS) *> *remoteUserList; * 远端用户列表 publishedTracks * @property (nonatomic, strong, readonly) NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS) *> *publishedTracks; * 已发布 Track 列表 Core Methods setClientRole * \- (void)setClientRole:([QNClientRole](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))role completeCallback:(nullable [QNClientRoleResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 设置用户角色 > 该方法在加入频道前后均可调用,该方法仅适用于直播场景。 Parameters * role: [QNClientRole](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254) 用户角色 join[1/2] * \- (void)join:(NSString *)token; * 加入房间 接口调用成功后,将会触发 [QNRTCClientDelegate.didConnectionStateChanged](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 > 请确保在 QNConnectionStateDisconnected 状态下调用该接口加入房间,否则接口调用无效 Parameters * token: NSString 房间 Token join[2/2] * \- (void)join:(NSString *)token userData:(NSString *)userData; * 加入房间 接口调用成功后,将会触发 [QNRTCClientDelegate.didConnectionStateChanged](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 > 请确保在 QNConnectionStateDisconnected 状态下调用该接口加入房间,否则接口调用无效 Parameters * token: NSString 房间 Token * userData: NSString 用户信息 leave * \- (void)leave; * 离开房间 成功离开房间后,会触发 [QNRTCClientDelegate.didConnectionStateChanged](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 publish[1/2] * -(void)publish:(NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS) *> *)tracks; * 发布本地 Track Parameters * tracks: NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS)> 要发布的本地 Track publish[2/2] * -(void)publish:(NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS) *> *)tracks completeCallback:([QNPublishResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 发布本地 Track 列表,若想获取发布结果,可实现 [QNPublishResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254) Parameters * tracks: NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS)> 要发布的本地 Track 列表 * callback: [QNPublishResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254) 发布本地 Track 列表是否成功的回调 unpublish * \- (void)unpublish:(NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS) *> *)tracks; * 取消发布本地 Track Parameters * tracks: NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS)> 要取消发布的本地 Track subscribe * \- (void)subscribe:(NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8857/QNRemoteTrack-iOS) *> *)tracks; * 订阅远端 Track,订阅成功后,会触发 [QNRTCClientDelegate.didSubscribedRemoteVideoTracks](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9248) 回调 Parameters * tracks: NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8857/QNRemoteTrack-iOS)> 要订阅的远端 Track unsubscribe * \- (void)unsubscribe:(NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8857/QNRemoteTrack-iOS) *> *)tracks; * 取消订阅远端 Track Parameters * tracks: NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8857/QNRemoteTrack-iOS)> 要取消订阅的远端 Track startLiveStreamingWithDirect * \- (void)startLiveStreamingWithDirect:([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8861/QNDirectLiveStreamingConfig-iOS) *)config; * 开始单路 CDN 转推 转推成功会触发 [QNRTCClientDelegate.didStartLiveStreaming](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 Parameters * config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8861/QNDirectLiveStreamingConfig-iOS) 单路转推配置 startLiveStreamingWithTranscoding * \- (void)startLiveStreamingWithTranscoding:([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8862/QNTranscodingLiveStreamingConfig-iOS) *)config; * 开始合流转码 CDN 转推 转推成功会触发 [QNRTCClientDelegate.didStartLiveStreaming](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 Parameters * config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8862/QNTranscodingLiveStreamingConfig-iOS) 合流转推配置 stopLiveStreamingWithDirect * \- (void)stopLiveStreamingWithDirect:([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8861/QNDirectLiveStreamingConfig-iOS) *)config; * 停止单路 CDN 转推 停止成功会触发 [QNRTCClientDelegate.didStopLiveStreaming](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 Parameters * config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8861/QNDirectLiveStreamingConfig-iOS) 单路 CDN 转推配置 stopLiveStreamingWithTranscoding * \- (void)stopLiveStreamingWithTranscoding:([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8862/QNTranscodingLiveStreamingConfig-iOS) *)config; * 停止合流转码 CDN 转推 停止成功会触发 [QNRTCClientDelegate.didStopLiveStreaming](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 Parameters * config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8862/QNTranscodingLiveStreamingConfig-iOS) 合流转推配置 setTranscodingLiveStreamingID * \- (void)setTranscodingLiveStreamingID:(NSString *)streamID withTracks:(NSArray <[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8863/QNTranscodingLiveStreamingTrack-iOS) *> *)tracks; * 新增、更新合流转推布局配置 更新成功会触发 [QNRTCClientDelegate.didTranscodingTracksUpdated](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 > 新增 Track 布局以及对已有的 Track 的合流布局进行更新均可通过该接口实现,只需修改 transcodingTracks 对应的 Track > 内容即可。 Parameters * streamID: NSString 合流任务 streamID * transcodingTracks: NSArray <[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8863/QNTranscodingLiveStreamingTrack-iOS)> 待新增、更新的合流转推布局配置 removeTranscodingLiveStreamingID * \- (void)removeTranscodingLiveStreamingID:(NSString *)streamID withTracks:(NSArray <[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8863/QNTranscodingLiveStreamingTrack-iOS) *> *)tracks; * 移除合流转推布局配置 Parameters * streamID: NSString 合流任务 streamID * transcodingTracks: NSArray <[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8863/QNTranscodingLiveStreamingTrack-iOS)> 待移除合流转推布局配置 startRoomMediaRelay * \- (void)startRoomMediaRelay:([QNRoomMediaRelayConfiguration](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/10143/QNRoomMediaRelayConfiguration-iOS) *_Nonnull)config completeCallback:(nullable [QNMediaRelayResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 开启跨房媒体转发,如果已经开启,则调用失败 > 当所有目标房间跨房媒体转发都失败,则本次跨房媒体转发请求视为失败,使用跨房媒体转发功能需要再次调用此方法 > > 当有任意一个目标或多个目标房间媒体转发成功,则本次跨房媒体转发请求视为成功,具体每个房间的状态参考回调结果。 > 该方法仅适用直播类型房间中角色类型为主播的用户 Parameters * config: [QNRoomMediaRelayConfiguration](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/10143/QNRoomMediaRelayConfiguration-iOS) 跨房间媒体转发参数配置 updateRoomMediaRelay * \- (void)updateRoomMediaRelay:([QNRoomMediaRelayConfiguration](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/10143/QNRoomMediaRelayConfiguration-iOS) *_Nonnull)config completeCallback:(nullable [QNMediaRelayResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 更新跨房媒体转发 > 成功开启跨房媒体转发后,如果你希望将流转发到多个目标房间,或退出当前正在转发的房间,可以调用该方法 > > 此 API 为全量更新,正在跨房媒体转发中却未被包含在参数 configuration 中的房间,将停止媒体转发。 > 调用此 API 前必须确保已经成功开启跨房媒体转发,否则将调用失败;该方法仅适用直播类型房间中角色类型为主播的用户。 Parameters * config: [QNRoomMediaRelayConfiguration](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/10143/QNRoomMediaRelayConfiguration-iOS) 跨房媒体转发参数配置 stopRoomMediaRelay * \- (void)stopRoomMediaRelay:(nullable [QNMediaRelayResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 停止跨房媒体转发,如果未开启,则调用失败。 > 一旦停止,会停止在所有目标房间中的媒体转发;该方法仅适用直播类型房间中角色类型为主播的用户。 sendMessage * \- (void)sendMessage:(NSString *)messsage toUsers:(nullable NSArray<NSString *> *)users messageId:(nullable NSString *)messageId; * 发送自定义消息到指定用户群,发送成功后,会触发远端用户的 [QNRTCClientDelegate.didReceiveMessage](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9248) 回调接口 Parameters * message: NSString 自定义消息 内容 * users: NSArray<NSString> 用户 ID 列表 * messageId: NSString 自定义消息 ID getRemoteUser * \- ([QNRemoteUser](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8835/QNRemoteUser-iOS) *)getRemoteUser:(NSString *)userID; * 获取对应 ID 的远端用户 Parameters * userID: NSString 远端用户 ID Returns [QNRemoteUser](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8835/QNRemoteUser-iOS) getUserNetworkQuality * \- (NSDictionary *)getUserNetworkQuality; * 获取当前订阅的远端用户网络质量 Returns NSDictionary<NSString, [QNNetworkQuality](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8869/QNNetworkQuality-iOS)> getRemoteVideoTrackStats * \- (NSDictionary *)getRemoteVideoTrackStats; * 获取已订阅的远端视频轨道统计信息 Returns NSDictionary<NSString, [QNRemoteVideoTrackStats](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8867/QNRemoteVideoTrackStats-iOS)> getRemoteAudioTrackStats * \- (NSDictionary *)getRemoteAudioTrackStats; * 获取已订阅的远端音频轨道统计信息 Returns NSDictionary<NSString, [QNRemoteAudioTrackStats](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8868/QNRemoteAudioTrackStats-iOS)> getLocalVideoTrackStats * \- (NSDictionary *)getLocalVideoTrackStats; * 获取已发布的近端视频轨道统计信息 Returns NSDictionary<NSString, <[QNLocalVideoTrackStats](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8870/QNLocalVideoTrackStats-iOS)>> getLocalAudioTrackStats * \- (NSDictionary *)getLocalAudioTrackStats; * 获取已发布的近端音频轨道统计信息 Returns NSDictionary<NSString, [QNLocalAudioTrackStats](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8871/QNLocalAudioTrackStats-iOS)> enableAudioVolumeIndication * \- (void)enableAudioVolumeIndication:(int)interval; * 开启语音音量监测 > 指定音量提示的时间间隔,≤ 0: 禁用音量提示功能,> 0: 音量提示的间隔,单位为毫秒,最小取值为 100。 Parameters * interval: int 音量提示的时间间隔 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCClient # QNRTCClient 最近更新时间: 2023-11-20 11:12:45 RTC 核心类,包含加入房间,离开房间,订阅、发布 Track,获取统计信息等功能 Index Core Properties * delegate * connectionState * autoSubscribe * remoteUserList * publishedTracks Core Methods * setClientRole * join[1/2] * join[2/2] * leave * publish[1/2] * publish[2/2] * unpublish * subscribe * unsubscribe * startLiveStreamingWithDirect * startLiveStreamingWithTranscoding * stopLiveStreamingWithDirect * stopLiveStreamingWithTranscoding * setTranscodingLiveStreamingID * removeTranscodingLiveStreamingID * startRoomMediaRelay * updateRoomMediaRelay * stopRoomMediaRelay * sendMessage * getRemoteUser * getUserNetworkQuality * getRemoteVideoTrackStats * getRemoteAudioTrackStats * getLocalVideoTrackStats * getLocalAudioTrackStats * enableAudioVolumeIndication Core Properties delegate * @property (nonatomic, weak) id<[QNRTCClientDelegate](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9248/QNRTCClientDelegate)> delegate; * RTC Client 的状态回调代理 connectionState * @property (nonatomic, assign, readonly) [QNConnectionState](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254) connectionState; * RTC client 的房间状态 autoSubscribe * @property (nonatomic, assign) BOOL autoSubscribe; * 是否自动订阅远端的流,默认为 YES 当开启此选项后,房间内有任意用户新发布 Track 的时候,会自动订阅此路 Track,订阅成功后,会触发 [QNRTCClientDelegate.didSubscribedRemoteVideoTracks](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 remoteUserList * @property (nonatomic, strong, readonly) NSArray<[QNRemoteUser](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8835/QNRemoteUser-iOS) *> *remoteUserList; * 远端用户列表 publishedTracks * @property (nonatomic, strong, readonly) NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS) *> *publishedTracks; * 已发布 Track 列表 Core Methods setClientRole * \- (void)setClientRole:([QNClientRole](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))role completeCallback:(nullable [QNClientRoleResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 设置用户角色 > 该方法在加入频道前后均可调用,该方法仅适用于直播场景。 Parameters * role: [QNClientRole](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254) 用户角色 join[1/2] * \- (void)join:(NSString *)token; * 加入房间 接口调用成功后,将会触发 [QNRTCClientDelegate.didConnectionStateChanged](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 > 请确保在 QNConnectionStateDisconnected 状态下调用该接口加入房间,否则接口调用无效 Parameters * token: NSString 房间 Token join[2/2] * \- (void)join:(NSString *)token userData:(NSString *)userData; * 加入房间 接口调用成功后,将会触发 [QNRTCClientDelegate.didConnectionStateChanged](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 > 请确保在 QNConnectionStateDisconnected 状态下调用该接口加入房间,否则接口调用无效 Parameters * token: NSString 房间 Token * userData: NSString 用户信息 leave * \- (void)leave; * 离开房间 成功离开房间后,会触发 [QNRTCClientDelegate.didConnectionStateChanged](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 publish[1/2] * -(void)publish:(NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS) *> *)tracks; * 发布本地 Track Parameters * tracks: NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS)> 要发布的本地 Track publish[2/2] * -(void)publish:(NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS) *> *)tracks completeCallback:([QNPublishResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 发布本地 Track 列表,若想获取发布结果,可实现 [QNPublishResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254) Parameters * tracks: NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS)> 要发布的本地 Track 列表 * callback: [QNPublishResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254) 发布本地 Track 列表是否成功的回调 unpublish * \- (void)unpublish:(NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS) *> *)tracks; * 取消发布本地 Track Parameters * tracks: NSArray<[QNLocalTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8847/QNLocalTrack-iOS)> 要取消发布的本地 Track subscribe * \- (void)subscribe:(NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8857/QNRemoteTrack-iOS) *> *)tracks; * 订阅远端 Track,订阅成功后,会触发 [QNRTCClientDelegate.didSubscribedRemoteVideoTracks](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9248) 回调 Parameters * tracks: NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8857/QNRemoteTrack-iOS)> 要订阅的远端 Track unsubscribe * \- (void)unsubscribe:(NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8857/QNRemoteTrack-iOS) *> *)tracks; * 取消订阅远端 Track Parameters * tracks: NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8857/QNRemoteTrack-iOS)> 要取消订阅的远端 Track startLiveStreamingWithDirect * \- (void)startLiveStreamingWithDirect:([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8861/QNDirectLiveStreamingConfig-iOS) *)config; * 开始单路 CDN 转推 转推成功会触发 [QNRTCClientDelegate.didStartLiveStreaming](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 Parameters * config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8861/QNDirectLiveStreamingConfig-iOS) 单路转推配置 startLiveStreamingWithTranscoding * \- (void)startLiveStreamingWithTranscoding:([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8862/QNTranscodingLiveStreamingConfig-iOS) *)config; * 开始合流转码 CDN 转推 转推成功会触发 [QNRTCClientDelegate.didStartLiveStreaming](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 Parameters * config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8862/QNTranscodingLiveStreamingConfig-iOS) 合流转推配置 stopLiveStreamingWithDirect * \- (void)stopLiveStreamingWithDirect:([QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8861/QNDirectLiveStreamingConfig-iOS) *)config; * 停止单路 CDN 转推 停止成功会触发 [QNRTCClientDelegate.didStopLiveStreaming](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 Parameters * config: [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8861/QNDirectLiveStreamingConfig-iOS) 单路 CDN 转推配置 stopLiveStreamingWithTranscoding * \- (void)stopLiveStreamingWithTranscoding:([QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8862/QNTranscodingLiveStreamingConfig-iOS) *)config; * 停止合流转码 CDN 转推 停止成功会触发 [QNRTCClientDelegate.didStopLiveStreaming](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 Parameters * config: [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8862/QNTranscodingLiveStreamingConfig-iOS) 合流转推配置 setTranscodingLiveStreamingID * \- (void)setTranscodingLiveStreamingID:(NSString *)streamID withTracks:(NSArray <[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8863/QNTranscodingLiveStreamingTrack-iOS) *> *)tracks; * 新增、更新合流转推布局配置 更新成功会触发 [QNRTCClientDelegate.didTranscodingTracksUpdated](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/9248) 回调 > 新增 Track 布局以及对已有的 Track 的合流布局进行更新均可通过该接口实现,只需修改 transcodingTracks 对应的 Track > 内容即可。 Parameters * streamID: NSString 合流任务 streamID * transcodingTracks: NSArray <[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8863/QNTranscodingLiveStreamingTrack-iOS)> 待新增、更新的合流转推布局配置 removeTranscodingLiveStreamingID * \- (void)removeTranscodingLiveStreamingID:(NSString *)streamID withTracks:(NSArray <[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8863/QNTranscodingLiveStreamingTrack-iOS) *> *)tracks; * 移除合流转推布局配置 Parameters * streamID: NSString 合流任务 streamID * transcodingTracks: NSArray <[QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8863/QNTranscodingLiveStreamingTrack-iOS)> 待移除合流转推布局配置 startRoomMediaRelay * \- (void)startRoomMediaRelay:([QNRoomMediaRelayConfiguration](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/10143/QNRoomMediaRelayConfiguration-iOS) *_Nonnull)config completeCallback:(nullable [QNMediaRelayResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 开启跨房媒体转发,如果已经开启,则调用失败 > 当所有目标房间跨房媒体转发都失败,则本次跨房媒体转发请求视为失败,使用跨房媒体转发功能需要再次调用此方法 > > 当有任意一个目标或多个目标房间媒体转发成功,则本次跨房媒体转发请求视为成功,具体每个房间的状态参考回调结果。 > 该方法仅适用直播类型房间中角色类型为主播的用户 Parameters * config: [QNRoomMediaRelayConfiguration](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/10143/QNRoomMediaRelayConfiguration-iOS) 跨房间媒体转发参数配置 updateRoomMediaRelay * \- (void)updateRoomMediaRelay:([QNRoomMediaRelayConfiguration](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/10143/QNRoomMediaRelayConfiguration-iOS) *_Nonnull)config completeCallback:(nullable [QNMediaRelayResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 更新跨房媒体转发 > 成功开启跨房媒体转发后,如果你希望将流转发到多个目标房间,或退出当前正在转发的房间,可以调用该方法 > > 此 API 为全量更新,正在跨房媒体转发中却未被包含在参数 configuration 中的房间,将停止媒体转发。 > 调用此 API 前必须确保已经成功开启跨房媒体转发,否则将调用失败;该方法仅适用直播类型房间中角色类型为主播的用户。 Parameters * config: [QNRoomMediaRelayConfiguration](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/10143/QNRoomMediaRelayConfiguration-iOS) 跨房媒体转发参数配置 stopRoomMediaRelay * \- (void)stopRoomMediaRelay:(nullable [QNMediaRelayResultCallback](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9254))callback; * 停止跨房媒体转发,如果未开启,则调用失败。 > 一旦停止,会停止在所有目标房间中的媒体转发;该方法仅适用直播类型房间中角色类型为主播的用户。 sendMessage * \- (void)sendMessage:(NSString *)messsage toUsers:(nullable NSArray<NSString *> *)users messageId:(nullable NSString *)messageId; * 发送自定义消息到指定用户群,发送成功后,会触发远端用户的 [QNRTCClientDelegate.didReceiveMessage](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/9248) 回调接口 Parameters * message: NSString 自定义消息 内容 * users: NSArray<NSString> 用户 ID 列表 * messageId: NSString 自定义消息 ID getRemoteUser * \- ([QNRemoteUser](https://developer.qiniu.com/rtc/8836/QNRTCClient-iOS/8835/QNRemoteUser-iOS) *)getRemoteUser:(NSString *)userID; * 获取对应 ID 的远端用户 Parameters * userID: NSString 远端用户 ID Returns [QNRemoteUser](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8835/QNRemoteUser-iOS) getUserNetworkQuality * \- (NSDictionary *)getUserNetworkQuality; * 获取当前订阅的远端用户网络质量 Returns NSDictionary<NSString, [QNNetworkQuality](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8869/QNNetworkQuality-iOS)> getRemoteVideoTrackStats * \- (NSDictionary *)getRemoteVideoTrackStats; * 获取已订阅的远端视频轨道统计信息 Returns NSDictionary<NSString, [QNRemoteVideoTrackStats](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8867/QNRemoteVideoTrackStats-iOS)> getRemoteAudioTrackStats * \- (NSDictionary *)getRemoteAudioTrackStats; * 获取已订阅的远端音频轨道统计信息 Returns NSDictionary<NSString, [QNRemoteAudioTrackStats](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8868/QNRemoteAudioTrackStats-iOS)> getLocalVideoTrackStats * \- (NSDictionary *)getLocalVideoTrackStats; * 获取已发布的近端视频轨道统计信息 Returns NSDictionary<NSString, <[QNLocalVideoTrackStats](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8870/QNLocalVideoTrackStats-iOS)>> getLocalAudioTrackStats * \- (NSDictionary *)getLocalAudioTrackStats; * 获取已发布的近端音频轨道统计信息 Returns NSDictionary<NSString, [QNLocalAudioTrackStats](https://developer.qiniu.com/rtc/8836/QNRTCClient- iOS/8871/QNLocalAudioTrackStats-iOS)> enableAudioVolumeIndication * \- (void)enableAudioVolumeIndication:(int)interval; * 开启语音音量监测 > 指定音量提示的时间间隔,≤ 0: 禁用音量提示功能,> 0: 音量提示的间隔,单位为毫秒,最小取值为 100。 Parameters * interval: int 音量提示的时间间隔 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,039
QNCDNStreamingClient
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCDNStreamingClient # QNCDNStreamingClient 最近更新时间: 2024-01-12 15:33:36 RTMP 直推 CDN 核心类,包含开始推流、停止推流,获取统计信息等功能 Index Core Properties * delegate Core Methods * startWithConfig * stop Core Properties delegate * @property (nonatomic, weak) id<[QNCDNStreamingDelegate](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient-iOS/12635/QNCDNStreamingDelegate)> delegate; * CDN Streaming Client 的状态回调和统计信息代理 Core Methods startWithConfig * \- (int)startWithConfig:([QNCDNStreamingConfig](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient-iOS/12636/QNCDNStreamingConfig-iOS))config; * 开始推流 接口调用成功后,将会触发 [QNCDNStreamingDelegate.didCDNStreamingConnectionStateChanged](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient- iOS/12635) 回调 > 调用该方法之前,请确保 config 中的 video track 和 audio track 参数正确 Parameters * config: [QNCDNStreamingConfig](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient-iOS/12636/QNCDNStreamingConfig-iOS) 推流配置参数 stop * \- (int)stop; * 停止推流 接口调用成功后,将会触发 [QNCDNStreamingDelegate.didCDNStreamingConnectionStateChanged](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient- iOS/12635) 回调 > 请确保在 > [QNCDNStreamingConfig](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient- > iOS/12636/QNCDNStreamingConfig-iOS) 中的 videoTrack 和 audioTrack, 在 stop > 之前是有效的 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCDNStreamingClient # QNCDNStreamingClient 最近更新时间: 2024-01-12 15:33:36 RTMP 直推 CDN 核心类,包含开始推流、停止推流,获取统计信息等功能 Index Core Properties * delegate Core Methods * startWithConfig * stop Core Properties delegate * @property (nonatomic, weak) id<[QNCDNStreamingDelegate](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient-iOS/12635/QNCDNStreamingDelegate)> delegate; * CDN Streaming Client 的状态回调和统计信息代理 Core Methods startWithConfig * \- (int)startWithConfig:([QNCDNStreamingConfig](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient-iOS/12636/QNCDNStreamingConfig-iOS))config; * 开始推流 接口调用成功后,将会触发 [QNCDNStreamingDelegate.didCDNStreamingConnectionStateChanged](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient- iOS/12635) 回调 > 调用该方法之前,请确保 config 中的 video track 和 audio track 参数正确 Parameters * config: [QNCDNStreamingConfig](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient-iOS/12636/QNCDNStreamingConfig-iOS) 推流配置参数 stop * \- (int)stop; * 停止推流 接口调用成功后,将会触发 [QNCDNStreamingDelegate.didCDNStreamingConnectionStateChanged](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient- iOS/12635) 回调 > 请确保在 > [QNCDNStreamingConfig](https://developer.qiniu.com/rtc/12634/QNCDNStreamingClient- > iOS/12636/QNCDNStreamingConfig-iOS) 中的 videoTrack 和 audioTrack, 在 stop > 之前是有效的 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,053
QNMediaRecorder
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaRecorder # QNMediaRecorder 最近更新时间: 2024-06-28 16:41:41 音视频本地录制核心类,包含开始录制、停止录制,录制状态及信息回调等功能 Index Core Properties * delegate Core Methods * startRecording * stopRecording Core Properties delegate * @property (nonatomic, weak) id<[QNMediaRecorderDelegate](https://developer.qiniu.com/rtc/12685/QNMediaRecorder-iOS/12688/QNMediaRecorderDelegate-iOS)> delegate; * 录制信息回调代理 Core Methods startRecording * \- (int)startRecording:([QNMediaRecorderConfig](https://developer.qiniu.com/rtc/12685/QNMediaRecorder-iOS/12687/QNMediaRecorderConfig-iOS) *)configuration * 开始录制 接口调用成功后,将会触发 [QNMediaRecorderDelegate.stateDidChanged](https://developer.qiniu.com/rtc/12685/QNMediaRecorder- iOS/12688) 回调 > 调用该方法之前,请确保 config 中的 video track 和 audio track 参数正确 Parameters * config: [QNMediaRecorderConfig](https://developer.qiniu.com/rtc/12685/QNMediaRecorder-iOS/12687/QNMediaRecorderConfig-iOS) 录制配置参数 Returns int stopRecording * \- (int)stopRecording; * 停止录制 接口调用成功后,将会触发 [QNMediaRecorderDelegate.stateDidChanged](https://developer.qiniu.com/rtc/12685/QNMediaRecorder- iOS/12688) 回调 > 请确保在 > [QNMediaRecorderConfig](https://developer.qiniu.com/rtc/12685/QNMediaRecorder- > iOS/12687/QNMediaRecorderConfig-iOS) 中的 videoTrack 和 audioTrack, 在 stop > 之前是有效的 Returns int 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaRecorder # QNMediaRecorder 最近更新时间: 2024-06-28 16:41:41 音视频本地录制核心类,包含开始录制、停止录制,录制状态及信息回调等功能 Index Core Properties * delegate Core Methods * startRecording * stopRecording Core Properties delegate * @property (nonatomic, weak) id<[QNMediaRecorderDelegate](https://developer.qiniu.com/rtc/12685/QNMediaRecorder-iOS/12688/QNMediaRecorderDelegate-iOS)> delegate; * 录制信息回调代理 Core Methods startRecording * \- (int)startRecording:([QNMediaRecorderConfig](https://developer.qiniu.com/rtc/12685/QNMediaRecorder-iOS/12687/QNMediaRecorderConfig-iOS) *)configuration * 开始录制 接口调用成功后,将会触发 [QNMediaRecorderDelegate.stateDidChanged](https://developer.qiniu.com/rtc/12685/QNMediaRecorder- iOS/12688) 回调 > 调用该方法之前,请确保 config 中的 video track 和 audio track 参数正确 Parameters * config: [QNMediaRecorderConfig](https://developer.qiniu.com/rtc/12685/QNMediaRecorder-iOS/12687/QNMediaRecorderConfig-iOS) 录制配置参数 Returns int stopRecording * \- (int)stopRecording; * 停止录制 接口调用成功后,将会触发 [QNMediaRecorderDelegate.stateDidChanged](https://developer.qiniu.com/rtc/12685/QNMediaRecorder- iOS/12688) 回调 > 请确保在 > [QNMediaRecorderConfig](https://developer.qiniu.com/rtc/12685/QNMediaRecorder- > iOS/12687/QNMediaRecorderConfig-iOS) 中的 videoTrack 和 audioTrack, 在 stop > 之前是有效的 Returns int 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,055
QNTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTrack # QNTrack 最近更新时间: 2022-06-30 16:44:13 音视频 Track 基类 Hierarchy * QNTrack * [QNLocalTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTrack # QNTrack 最近更新时间: 2022-06-30 16:44:13 音视频 Track 基类 Hierarchy * QNTrack * [QNLocalTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8851/QNTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,057
QNLocalTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalTrack # QNLocalTrack 最近更新时间: 2022-06-30 15:26:52 音视频本地 Track 基类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8851/QNTrack-iOS) * QNLocalTrack * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted Core Methods * updateMute * destroy Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteAudioTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8847/QNLocalTrack- iOS/11948) 或 [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8847/QNLocalTrack- iOS/11947) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalTrack # QNLocalTrack 最近更新时间: 2022-06-30 15:26:52 音视频本地 Track 基类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8851/QNTrack-iOS) * QNLocalTrack * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted Core Methods * updateMute * destroy Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8847/QNLocalTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteAudioTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8847/QNLocalTrack- iOS/11948) 或 [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8847/QNLocalTrack- iOS/11947) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,060
QNLocalVideoTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalVideoTrack # QNLocalVideoTrack 最近更新时间: 2023-07-07 21:16:59 本地视频 Track 基类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8847/QNLocalTrack-iOS) * QNLocalVideoTrack * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate Core Methods * updateMute * destroy * sendSEI * sendSEIWithData * play * setVideoEncoderConfig Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/11970/QNLocalVideoTrackDelegate)> delegate; * 本地视频 Track 回调代理。 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack- iOS/11947) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 sendSEI * \- (void)sendSEI:(NSString *)videoSEI uuid:(NSString *)uuid repeatNmuber:(NSNumber *)repeatNumber; * 发送 SEI > 该接口已废弃,请使用 > [QNLocalVideoTrack.sendSEIWithData](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack- > iOS/8849) > 需要停止发送 SEI,可以设置 videoSEI 为 nil,repeatNumber 为 0 即可 Parameters * videoSEI: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatNumber: NSNumber 重复次数 sendSEIWithData * \- (void)sendSEIWithData:(NSData *)SEIData uuid:(NSData *)uuid repeatCount:(NSNumber *)repeatCount; * 发送 SEI > SEIData SEI 内容,不超过 4096 个字节 > > 需要停止发送 SEI,可以设置 SEIData 为 nil,repeatCount 为 0 即可 Parameters * SEIData: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatCount: NSNumber 重复次数 play * \- (void)play:([QNVideoGLView](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/11950/QNVideoGLView-iOS) *)videoView; * 视频 Track 渲染 Parameters * videoView: [QNVideoGLView](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/11950/QNVideoGLView-iOS) 渲染的 view setVideoEncoderConfig * \- (void)setVideoEncoderConfig:(QNVideoEncoderConfig *)config; * 动态修改编码配置 Parameters * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/11944/QNVideoEncoderConfig-iOS) 编码参数配置 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalVideoTrack # QNLocalVideoTrack 最近更新时间: 2023-07-07 21:16:59 本地视频 Track 基类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8847/QNLocalTrack-iOS) * QNLocalVideoTrack * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate Core Methods * updateMute * destroy * sendSEI * sendSEIWithData * play * setVideoEncoderConfig Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/11970/QNLocalVideoTrackDelegate)> delegate; * 本地视频 Track 回调代理。 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack- iOS/11947) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 sendSEI * \- (void)sendSEI:(NSString *)videoSEI uuid:(NSString *)uuid repeatNmuber:(NSNumber *)repeatNumber; * 发送 SEI > 该接口已废弃,请使用 > [QNLocalVideoTrack.sendSEIWithData](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack- > iOS/8849) > 需要停止发送 SEI,可以设置 videoSEI 为 nil,repeatNumber 为 0 即可 Parameters * videoSEI: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatNumber: NSNumber 重复次数 sendSEIWithData * \- (void)sendSEIWithData:(NSData *)SEIData uuid:(NSData *)uuid repeatCount:(NSNumber *)repeatCount; * 发送 SEI > SEIData SEI 内容,不超过 4096 个字节 > > 需要停止发送 SEI,可以设置 SEIData 为 nil,repeatCount 为 0 即可 Parameters * SEIData: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatCount: NSNumber 重复次数 play * \- (void)play:([QNVideoGLView](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/11950/QNVideoGLView-iOS) *)videoView; * 视频 Track 渲染 Parameters * videoView: [QNVideoGLView](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/11950/QNVideoGLView-iOS) 渲染的 view setVideoEncoderConfig * \- (void)setVideoEncoderConfig:(QNVideoEncoderConfig *)config; * 动态修改编码配置 Parameters * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8849/QNLocalVideoTrack-iOS/11944/QNVideoEncoderConfig-iOS) 编码参数配置 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,064
QNCameraVideoTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCameraVideoTrack # QNCameraVideoTrack 最近更新时间: 2023-07-07 21:14:23 本地视频相机 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8849/QNLocalVideoTrack-iOS) * QNCameraVideoTrack * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate * cameraDelegate * captureDevicePosition * videoOrientation * torchOn * continuousAutofocusEnable * smoothAutoFocusEnabled * manualFocus * videoZoomFactor * supportedVideoFormats * videoActiveFormat * videoFormat * videoFrameRate * previewMirrorFrontFacing * previewMirrorRearFacing * encodeMirrorFrontFacing * encodeMirrorRearFacing Core Methods * updateMute * destroy * sendSEI * sendSEIWithData * play * switchCamera[1/2] * switchCamera[2/2] * setBeautifyModeOn * setSmoothLevel * setWhiten * setRedden * setWaterMarkWithImage * clearWaterMark * pushImage * startCapture * stopCapture * setVideoEncoderConfig Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/11970/QNLocalVideoTrackDelegate)> delegate; * 视频 Track 回调代理 cameraDelegate * @property (nonatomic, weak) id<[QNCameraVideoTrackDelegate](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/12438/QNCameraVideoTrackDelegate)> cameraDelegate; * 摄像头采集 Track 回调代理 captureDevicePosition * @property (nonatomic, assign, readonly) AVCaptureDevicePosition captureDevicePosition; * 摄像头的位置,只读变量,默认为 AVCaptureDevicePositionFront 前置 如需设置,请在 [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack- iOS/8844/QNCameraVideoTrackConfig-iOS) 中设置 videoOrientation * @property (nonatomic, assign) AVCaptureVideoOrientation videoOrientation; * 开启 camera 时的采集摄像头的旋转方向,默认为 AVCaptureVideoOrientationPortrait torchOn * @property (nonatomic, assign, getter=isTorchOn) BOOL torchOn; * 是否开启手电筒,默认为 NO continuousAutofocusEnable * @property (nonatomic, assign, getter=isContinuousAutofocusEnable) BOOL continuousAutofocusEnable; * 是否连续自动对焦,默认为 YES smoothAutoFocusEnabled * @property (nonatomic, assign, getter=isSmoothAutoFocusEnabled) BOOL smoothAutoFocusEnabled; * 是否平滑对焦减缓抖动感,默认为 YES > 适用于视频拍摄过程中,用来减缓因自动对焦产生的镜头伸缩,使画面不因快速的对焦而产生抖动感 manualFocus * @property (nonatomic, assign) CGPoint manualFocus; * 聚焦的位置,默认为 (0.5, 0.5),即中间位置 (0,0) 代表左上, (1,1) 代表右下 videoZoomFactor * @property (nonatomic, assign) CGFloat videoZoomFactor; * 控制摄像头的缩放,默认为 1.0 > 设置的数值,务必小于等于 videoActiveForat.videoMaxZoomFactor,否则会设置失败 supportedVideoFormats * @property (nonatomic, strong, readonly) NSArray<AVCaptureDeviceFormat *> *supportedVideoFormats; * 设备支持的 formats videoActiveFormat * @property (nonatomic, strong) AVCaptureDeviceFormat *videoActiveFormat; * 设备当前的 format videoFormat * @property (nonatomic, copy) NSString *videoFormat; * 视频采集的分辨率,默认为 AVCaptureSessionPreset640x480 videoFrameRate * @property (nonatomic, assign) NSUInteger videoFrameRate; * 采集的视频数据的帧率,默认为 24 previewMirrorFrontFacing * @property (nonatomic, assign) BOOL previewMirrorFrontFacing; * 前置摄像头,预览是否开启镜像,默认为 YES previewMirrorRearFacing * @property (nonatomic, assign) BOOL previewMirrorRearFacing; * 后置摄像头,预览是否开启镜像,默认为 NO encodeMirrorFrontFacing * @property (nonatomic, assign) BOOL encodeMirrorFrontFacing; * 前置摄像头,对方观看时是否开启镜像,默认 NO encodeMirrorRearFacing * @property (nonatomic, assign) BOOL encodeMirrorRearFacing; * 后置摄像头,对方观看时是否开启镜像,默认 NO Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack- iOS/11947) 的回调 > 需要发布成功后才可以执行 mute 操作 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 sendSEI * \- (void)sendSEI:(NSString *)videoSEI uuid:(NSString *)uuid repeatNmuber:(NSNumber *)repeatNumber; * 发送 SEI > 该接口已废弃,请使用 > [QNLocalVideoTrack.sendSEIWithData](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack- > iOS/8849) > 需要停止发送 SEI,可以设置 videoSEI 为 nil,repeatNumber 为 0 即可 Parameters * videoSEI: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatNumber: NSNumber 重复次数 sendSEIWithData * \- (void)sendSEIWithData:(NSData *)SEIData uuid:(NSData *)uuid repeatCount:(NSNumber *)repeatCount; * 发送 SEI > SEIData SEI 内容,不超过 4096 个字节 > > 需要停止发送 SEI,可以设置 SEIData 为 nil,repeatCount 为 0 即可 Parameters * SEIData: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatCount: NSNumber 重复次数 play * \- (void)play:([QNVideoGLView](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/11950/QNVideoGLView-iOS) *)videoView; * 视频 Track 渲染 Parameters * videoView: [QNVideoGLView](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/11950/QNVideoGLView-iOS) 渲染的 view switchCamera[1/2] * \- (void)switchCamera; * 切换前后摄像头 > 该接口废弃,请使用 > [QNCameraVideoTrack.switchCamera[2/2]](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack- > iOS/8852) switchCamera[2/2] * \- (void)switchCamera:(nullable [QNCameraSwitchResultCallback](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/9254))callback; * 切换前后摄像头 Parameters * callback: [QNCameraSwitchResultCallback](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/9254) 切换摄像头返回结果的 Callback setBeautifyModeOn * -(void)setBeautifyModeOn:(BOOL)beautifyModeOn; * 是否开启美颜 Parameters * beautifyModeOn: BOOL 美颜开关 setSmoothLevel * -(void)setSmoothLevel:(CGFloat)smoothLevel; * 设置磨皮程度参数,范围从 0 ~ 1 > 如果美颜不开启,设置该参数无效 Parameters * beautify: CGFloat 美颜程度 setWhiten * -(void)setWhiten:(CGFloat)whiten; * 设置美白程度参数,范围从 0 ~ 1 > 如果美颜不开启,设置该参数无效 Parameters * whiten: CGFloat 美白程度 setRedden * -(void)setRedden:(CGFloat)redden; * 设置红润的程度参数,范围从 0 ~ 1 > 如果美颜不开启,设置该参数无效 Parameters * redden: CGFloat 红润程度 setWaterMarkWithImage * -(void)setWaterMarkWithImage:(UIImage *)waterMarkImage position:(CGPoint)position; * 设置水印 Parameters * waterMarkImage: UIImage 水印图片 * position: CGPoint 水印位置 clearWaterMark * -(void)clearWaterMark; * 移除水印 pushImage * \- (void)pushImage:(nullable UIImage *)image; * 设置摄像头 Track 发送图片数据 > 由于某些特殊原因不想使用摄像头采集的数据作为发送视频数据时,可以使用该接口设置一张图片来替代。传入 nil 则关闭该功能。 > 请确保传入的 image 的宽和高是 16 的整数倍 > > 请勿在 applicationState 为 UIApplicationStateBackground 时调用该接口,否则将出错。 Parameters * image: UIImage 图片 startCapture * \- (void)startCapture; * 开启摄像头采集 stopCapture * \- (void)stopCapture; * 关闭摄像头采集 setVideoEncoderConfig * \- (void)setVideoEncoderConfig:(QNVideoEncoderConfig *)config; * 动态修改编码配置 Parameters * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/11944/QNVideoEncoderConfig-iOS) 编码参数配置 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCameraVideoTrack # QNCameraVideoTrack 最近更新时间: 2023-07-07 21:14:23 本地视频相机 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8849/QNLocalVideoTrack-iOS) * QNCameraVideoTrack * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate * cameraDelegate * captureDevicePosition * videoOrientation * torchOn * continuousAutofocusEnable * smoothAutoFocusEnabled * manualFocus * videoZoomFactor * supportedVideoFormats * videoActiveFormat * videoFormat * videoFrameRate * previewMirrorFrontFacing * previewMirrorRearFacing * encodeMirrorFrontFacing * encodeMirrorRearFacing Core Methods * updateMute * destroy * sendSEI * sendSEIWithData * play * switchCamera[1/2] * switchCamera[2/2] * setBeautifyModeOn * setSmoothLevel * setWhiten * setRedden * setWaterMarkWithImage * clearWaterMark * pushImage * startCapture * stopCapture * setVideoEncoderConfig Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/11970/QNLocalVideoTrackDelegate)> delegate; * 视频 Track 回调代理 cameraDelegate * @property (nonatomic, weak) id<[QNCameraVideoTrackDelegate](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/12438/QNCameraVideoTrackDelegate)> cameraDelegate; * 摄像头采集 Track 回调代理 captureDevicePosition * @property (nonatomic, assign, readonly) AVCaptureDevicePosition captureDevicePosition; * 摄像头的位置,只读变量,默认为 AVCaptureDevicePositionFront 前置 如需设置,请在 [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack- iOS/8844/QNCameraVideoTrackConfig-iOS) 中设置 videoOrientation * @property (nonatomic, assign) AVCaptureVideoOrientation videoOrientation; * 开启 camera 时的采集摄像头的旋转方向,默认为 AVCaptureVideoOrientationPortrait torchOn * @property (nonatomic, assign, getter=isTorchOn) BOOL torchOn; * 是否开启手电筒,默认为 NO continuousAutofocusEnable * @property (nonatomic, assign, getter=isContinuousAutofocusEnable) BOOL continuousAutofocusEnable; * 是否连续自动对焦,默认为 YES smoothAutoFocusEnabled * @property (nonatomic, assign, getter=isSmoothAutoFocusEnabled) BOOL smoothAutoFocusEnabled; * 是否平滑对焦减缓抖动感,默认为 YES > 适用于视频拍摄过程中,用来减缓因自动对焦产生的镜头伸缩,使画面不因快速的对焦而产生抖动感 manualFocus * @property (nonatomic, assign) CGPoint manualFocus; * 聚焦的位置,默认为 (0.5, 0.5),即中间位置 (0,0) 代表左上, (1,1) 代表右下 videoZoomFactor * @property (nonatomic, assign) CGFloat videoZoomFactor; * 控制摄像头的缩放,默认为 1.0 > 设置的数值,务必小于等于 videoActiveForat.videoMaxZoomFactor,否则会设置失败 supportedVideoFormats * @property (nonatomic, strong, readonly) NSArray<AVCaptureDeviceFormat *> *supportedVideoFormats; * 设备支持的 formats videoActiveFormat * @property (nonatomic, strong) AVCaptureDeviceFormat *videoActiveFormat; * 设备当前的 format videoFormat * @property (nonatomic, copy) NSString *videoFormat; * 视频采集的分辨率,默认为 AVCaptureSessionPreset640x480 videoFrameRate * @property (nonatomic, assign) NSUInteger videoFrameRate; * 采集的视频数据的帧率,默认为 24 previewMirrorFrontFacing * @property (nonatomic, assign) BOOL previewMirrorFrontFacing; * 前置摄像头,预览是否开启镜像,默认为 YES previewMirrorRearFacing * @property (nonatomic, assign) BOOL previewMirrorRearFacing; * 后置摄像头,预览是否开启镜像,默认为 NO encodeMirrorFrontFacing * @property (nonatomic, assign) BOOL encodeMirrorFrontFacing; * 前置摄像头,对方观看时是否开启镜像,默认 NO encodeMirrorRearFacing * @property (nonatomic, assign) BOOL encodeMirrorRearFacing; * 后置摄像头,对方观看时是否开启镜像,默认 NO Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack- iOS/11947) 的回调 > 需要发布成功后才可以执行 mute 操作 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 sendSEI * \- (void)sendSEI:(NSString *)videoSEI uuid:(NSString *)uuid repeatNmuber:(NSNumber *)repeatNumber; * 发送 SEI > 该接口已废弃,请使用 > [QNLocalVideoTrack.sendSEIWithData](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack- > iOS/8849) > 需要停止发送 SEI,可以设置 videoSEI 为 nil,repeatNumber 为 0 即可 Parameters * videoSEI: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatNumber: NSNumber 重复次数 sendSEIWithData * \- (void)sendSEIWithData:(NSData *)SEIData uuid:(NSData *)uuid repeatCount:(NSNumber *)repeatCount; * 发送 SEI > SEIData SEI 内容,不超过 4096 个字节 > > 需要停止发送 SEI,可以设置 SEIData 为 nil,repeatCount 为 0 即可 Parameters * SEIData: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatCount: NSNumber 重复次数 play * \- (void)play:([QNVideoGLView](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/11950/QNVideoGLView-iOS) *)videoView; * 视频 Track 渲染 Parameters * videoView: [QNVideoGLView](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/11950/QNVideoGLView-iOS) 渲染的 view switchCamera[1/2] * \- (void)switchCamera; * 切换前后摄像头 > 该接口废弃,请使用 > [QNCameraVideoTrack.switchCamera[2/2]](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack- > iOS/8852) switchCamera[2/2] * \- (void)switchCamera:(nullable [QNCameraSwitchResultCallback](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/9254))callback; * 切换前后摄像头 Parameters * callback: [QNCameraSwitchResultCallback](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/9254) 切换摄像头返回结果的 Callback setBeautifyModeOn * -(void)setBeautifyModeOn:(BOOL)beautifyModeOn; * 是否开启美颜 Parameters * beautifyModeOn: BOOL 美颜开关 setSmoothLevel * -(void)setSmoothLevel:(CGFloat)smoothLevel; * 设置磨皮程度参数,范围从 0 ~ 1 > 如果美颜不开启,设置该参数无效 Parameters * beautify: CGFloat 美颜程度 setWhiten * -(void)setWhiten:(CGFloat)whiten; * 设置美白程度参数,范围从 0 ~ 1 > 如果美颜不开启,设置该参数无效 Parameters * whiten: CGFloat 美白程度 setRedden * -(void)setRedden:(CGFloat)redden; * 设置红润的程度参数,范围从 0 ~ 1 > 如果美颜不开启,设置该参数无效 Parameters * redden: CGFloat 红润程度 setWaterMarkWithImage * -(void)setWaterMarkWithImage:(UIImage *)waterMarkImage position:(CGPoint)position; * 设置水印 Parameters * waterMarkImage: UIImage 水印图片 * position: CGPoint 水印位置 clearWaterMark * -(void)clearWaterMark; * 移除水印 pushImage * \- (void)pushImage:(nullable UIImage *)image; * 设置摄像头 Track 发送图片数据 > 由于某些特殊原因不想使用摄像头采集的数据作为发送视频数据时,可以使用该接口设置一张图片来替代。传入 nil 则关闭该功能。 > 请确保传入的 image 的宽和高是 16 的整数倍 > > 请勿在 applicationState 为 UIApplicationStateBackground 时调用该接口,否则将出错。 Parameters * image: UIImage 图片 startCapture * \- (void)startCapture; * 开启摄像头采集 stopCapture * \- (void)stopCapture; * 关闭摄像头采集 setVideoEncoderConfig * \- (void)setVideoEncoderConfig:(QNVideoEncoderConfig *)config; * 动态修改编码配置 Parameters * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8852/QNCameraVideoTrack-iOS/11944/QNVideoEncoderConfig-iOS) 编码参数配置 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,069
QNScreenVideoTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNScreenVideoTrack # QNScreenVideoTrack 最近更新时间: 2023-07-07 21:17:43 本地视频录屏 Track 类 > 屏幕录制 Track 的创建需要发起系统屏幕录制的申请,具体使用姿势请参考[屏幕录制 Track > 使用](https://developer.qiniu.com/rtc/development_guidelines/9258/audio-and- > video-collection-iOS#2)。 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8852/QNCameraVideoTrack-iOS) * QNScreenVideoTrack * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate * screenDelegate Core Methods * updateMute * destroy * sendSEI * sendSEIWithData * play * isScreenRecorderAvailable * setVideoEncoderConfig Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/11970/QNLocalVideoTrackDelegate)> delegate; * 本地视频 Track 回调代理。 screenDelegate * @property (nonatomic, weak) id<[QNScreenVideoTrackDelegate](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/9582/QNScreenVideoTrackDelegate)> screenDelegate; * 录屏 Track 回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 > 当静默状态改变后,远端用户将会收到 > [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack- > iOS/11947) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 sendSEI * \- (void)sendSEI:(NSString *)videoSEI uuid:(NSString *)uuid repeatNmuber:(NSNumber *)repeatNumber; * 发送 SEI > 该接口已废弃,请使用 > [QNLocalVideoTrack.sendSEIWithData](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack- > iOS/8849) > 需要停止发送 SEI,可以设置 videoSEI 为 nil,repeatNumber 为 0 即可 Parameters * videoSEI: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatNumber: NSNumber 重复次数 sendSEIWithData * \- (void)sendSEIWithData:(NSData *)SEIData uuid:(NSData *)uuid repeatCount:(NSNumber *)repeatCount; * 发送 SEI > SEIData SEI 内容,不超过 4096 个字节 > > 需要停止发送 SEI,可以设置 SEIData 为 nil,repeatCount 为 0 即可 Parameters * SEIData: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatCount: NSNumber 重复次数 play * \- (void)play:([QNVideoGLView](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/11950/QNVideoGLView-iOS) *)videoView; * 视频 Track 渲染 Parameters * videoView: [QNVideoGLView](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/11950/QNVideoGLView-iOS) 渲染的 view isScreenRecorderAvailable * \+ (BOOL)isScreenRecorderAvailable; * 判断屏幕录制功能是否可用 > 屏幕录制功能仅在 iOS 11 及以上版本可用 Returns BOOL setVideoEncoderConfig * \- (void)setVideoEncoderConfig:(QNVideoEncoderConfig *)config; * 动态修改编码配置 Parameters * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/11944/QNVideoEncoderConfig-iOS) 编码参数配置 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNScreenVideoTrack # QNScreenVideoTrack 最近更新时间: 2023-07-07 21:17:43 本地视频录屏 Track 类 > 屏幕录制 Track 的创建需要发起系统屏幕录制的申请,具体使用姿势请参考[屏幕录制 Track > 使用](https://developer.qiniu.com/rtc/development_guidelines/9258/audio-and- > video-collection-iOS#2)。 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8852/QNCameraVideoTrack-iOS) * QNScreenVideoTrack * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate * screenDelegate Core Methods * updateMute * destroy * sendSEI * sendSEIWithData * play * isScreenRecorderAvailable * setVideoEncoderConfig Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/11970/QNLocalVideoTrackDelegate)> delegate; * 本地视频 Track 回调代理。 screenDelegate * @property (nonatomic, weak) id<[QNScreenVideoTrackDelegate](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/9582/QNScreenVideoTrackDelegate)> screenDelegate; * 录屏 Track 回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 > 当静默状态改变后,远端用户将会收到 > [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack- > iOS/11947) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 sendSEI * \- (void)sendSEI:(NSString *)videoSEI uuid:(NSString *)uuid repeatNmuber:(NSNumber *)repeatNumber; * 发送 SEI > 该接口已废弃,请使用 > [QNLocalVideoTrack.sendSEIWithData](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack- > iOS/8849) > 需要停止发送 SEI,可以设置 videoSEI 为 nil,repeatNumber 为 0 即可 Parameters * videoSEI: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatNumber: NSNumber 重复次数 sendSEIWithData * \- (void)sendSEIWithData:(NSData *)SEIData uuid:(NSData *)uuid repeatCount:(NSNumber *)repeatCount; * 发送 SEI > SEIData SEI 内容,不超过 4096 个字节 > > 需要停止发送 SEI,可以设置 SEIData 为 nil,repeatCount 为 0 即可 Parameters * SEIData: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatCount: NSNumber 重复次数 play * \- (void)play:([QNVideoGLView](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/11950/QNVideoGLView-iOS) *)videoView; * 视频 Track 渲染 Parameters * videoView: [QNVideoGLView](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/11950/QNVideoGLView-iOS) 渲染的 view isScreenRecorderAvailable * \+ (BOOL)isScreenRecorderAvailable; * 判断屏幕录制功能是否可用 > 屏幕录制功能仅在 iOS 11 及以上版本可用 Returns BOOL setVideoEncoderConfig * \- (void)setVideoEncoderConfig:(QNVideoEncoderConfig *)config; * 动态修改编码配置 Parameters * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8850/QNScreenVideoTrack-iOS/11944/QNVideoEncoderConfig-iOS) 编码参数配置 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,081
QNCustomVideoTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomVideoTrack # QNCustomVideoTrack 最近更新时间: 2023-07-07 21:17:13 本地视频自定义导入 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8850/QNScreenVideoTrack-iOS) * QNCustomVideoTrack * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate Core Methods * updateMute * destroy * sendSEI * sendSEIWithData * play * pushVideoSampleBuffer * pushPixelBuffer Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/11970/QNLocalVideoTrackDelegate)> delegate; * 视频 Track 回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack- iOS/11947) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 sendSEI * \- (void)sendSEI:(NSString *)videoSEI uuid:(NSString *)uuid repeatNmuber:(NSNumber *)repeatNumber; * 发送 SEI > 该接口已废弃,请使用 > [QNLocalVideoTrack.sendSEIWithData](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack- > iOS/8849) > 需要停止发送 SEI,可以设置 videoSEI 为 nil,repeatNumber 为 0 即可 Parameters * videoSEI: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatNumber: NSNumber 重复次数 sendSEIWithData * \- (void)sendSEIWithData:(NSData *)SEIData uuid:(NSData *)uuid repeatCount:(NSNumber *)repeatCount; * 发送 SEI > SEIData SEI 内容,不超过 4096 个字节 > > 需要停止发送 SEI,可以设置 SEIData 为 nil,repeatCount 为 0 即可 Parameters * SEIData: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatCount: NSNumber 重复次数 play * \- (void)play:([QNVideoGLView](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/11950/QNVideoGLView-iOS) *)videoView; * 视频 Track 渲染 Parameters * videoView: [QNVideoGLView](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/11950/QNVideoGLView-iOS) 渲染的 view pushVideoSampleBuffer * \- (void)pushVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer; * 导入视频数据 > 支持导入的视频数据格式为:kCVPixelFormatType_420YpCbCr8BiPlanarFullRange 和 > kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange Parameters * sampleBuffer: CMSampleBufferRef CMSampleBufferRef 格式的视频数据 pushPixelBuffer * \- (void)pushPixelBuffer:(CVPixelBufferRef)pixelBuffer; * 导入视频数据 > 支持导入的视频数据格式为:kCVPixelFormatType_420YpCbCr8BiPlanarFullRange 和 > kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange Parameters * pixelBuffer: CVPixelBufferRef CVPixelBufferRef 格式的视频数据 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomVideoTrack # QNCustomVideoTrack 最近更新时间: 2023-07-07 21:17:13 本地视频自定义导入 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8850/QNScreenVideoTrack-iOS) * QNCustomVideoTrack * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate Core Methods * updateMute * destroy * sendSEI * sendSEIWithData * play * pushVideoSampleBuffer * pushPixelBuffer Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalVideoTrackDelegate](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/11970/QNLocalVideoTrackDelegate)> delegate; * 视频 Track 回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteVideoTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack- iOS/11947) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 sendSEI * \- (void)sendSEI:(NSString *)videoSEI uuid:(NSString *)uuid repeatNmuber:(NSNumber *)repeatNumber; * 发送 SEI > 该接口已废弃,请使用 > [QNLocalVideoTrack.sendSEIWithData](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack- > iOS/8849) > 需要停止发送 SEI,可以设置 videoSEI 为 nil,repeatNumber 为 0 即可 Parameters * videoSEI: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatNumber: NSNumber 重复次数 sendSEIWithData * \- (void)sendSEIWithData:(NSData *)SEIData uuid:(NSData *)uuid repeatCount:(NSNumber *)repeatCount; * 发送 SEI > SEIData SEI 内容,不超过 4096 个字节 > > 需要停止发送 SEI,可以设置 SEIData 为 nil,repeatCount 为 0 即可 Parameters * SEIData: NSString SEI 的消息内容 * uuid: NSString 设备 UUID * repeatCount: NSNumber 重复次数 play * \- (void)play:([QNVideoGLView](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/11950/QNVideoGLView-iOS) *)videoView; * 视频 Track 渲染 Parameters * videoView: [QNVideoGLView](https://developer.qiniu.com/rtc/8853/QNCustomVideoTrack-iOS/11950/QNVideoGLView-iOS) 渲染的 view pushVideoSampleBuffer * \- (void)pushVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer; * 导入视频数据 > 支持导入的视频数据格式为:kCVPixelFormatType_420YpCbCr8BiPlanarFullRange 和 > kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange Parameters * sampleBuffer: CMSampleBufferRef CMSampleBufferRef 格式的视频数据 pushPixelBuffer * \- (void)pushPixelBuffer:(CVPixelBufferRef)pixelBuffer; * 导入视频数据 > 支持导入的视频数据格式为:kCVPixelFormatType_420YpCbCr8BiPlanarFullRange 和 > kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange Parameters * pixelBuffer: CVPixelBufferRef CVPixelBufferRef 格式的视频数据 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,087
QNLocalAudioTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalAudioTrack # QNLocalAudioTrack 最近更新时间: 2024-01-18 16:05:23 本地音频 Track 基类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8853/QNCustomVideoTrack-iOS) * QNLocalAudioTrack * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate * encryptDelegate Core Methods * updateMute * destroy * setVolume * getVolumeLevel * setEarMonitorEnabled * getEarMonitorEnabled * setPlayingVolume * getPlayingVolume * addAudioFilter * removeAudioFilter Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalAudioTrackDelegate](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/11969/QNLocalAudioTrackDelegate)> delegate; * 本地音频 Track 回调代理 encryptDelegate * @property (nonatomic, weak) id<[QNAudioEncryptDelegate](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/12618/qnaudioencryptdelegate)> encryptDelegate; * 本地音频 Track 加密回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteAudioTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack- iOS/11948) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 setVolume * \- (void)setVolume:(double)volume; * 设置当前音频输入设备采集的音量大小 > 音量值在 0.0 ~ 1.0 之间为软件缩小;1.0 为原始音量;大于 1.0 且小于 10.0 为软件放大 > > 在需要放大时,应从 1.x 开始设置,用最小的放大值来取得合适的播放效果,过大将会导致音频音调异常 > > 该设置可以用于适度对采集音量做放大或者缩小 Parameters * volume: double 采集音量大小,范围 0.0 ~ 10.0,默认为 1.0 getVolumeLevel * \- (float)getVolumeLevel; * 获取当前音频输入设备采集的音量大小 > 可通过定时调用该方法获取音量值的方式来判断当前用户是否在讲话 > > 在安静的环境下,获取到 0.0x 大小的数值为预期现象,您可根据您的需求自行决定判断的阈值 Returns float setEarMonitorEnabled * \- (void)setEarMonitorEnabled:(BOOL)enabled; * 设置耳返开关,默认为 NO > 为达到最佳体验,建议佩戴耳机的场景下,使用该功能 Parameters * enabled: BOOL 开关 getEarMonitorEnabled * \- (BOOL)getEarMonitorEnabled; * 是否开启了耳返 Returns BOOL setPlayingVolume * \- (void)setPlayingVolume:(float)volume; * 设置混音、返听场景下,本地播放的音量大小,范围 0 ~ 1.0 Parameters * volume: float 播放音量 getPlayingVolume * \- (float)getPlayingVolume * 获取播放音量 Returns float,范围 0 ~ 1.0 addAudioFilter * \- (BOOL)addAudioFilter:(id<QNAudioFilterProtocol>)filter * 增加 filter 模块。目前支持设置 QNAudioMusicMixer、QNAudioEffectMixer、QNAudioSourceMixer 等内置 Filter Returns BOOL removeAudioFilter * \- (BOOL)removeAudioFilter:(id<QNAudioFilterProtocol>)filter * 移除 filter 模块 Returns BOOL 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalAudioTrack # QNLocalAudioTrack 最近更新时间: 2024-01-18 16:05:23 本地音频 Track 基类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8853/QNCustomVideoTrack-iOS) * QNLocalAudioTrack * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate * encryptDelegate Core Methods * updateMute * destroy * setVolume * getVolumeLevel * setEarMonitorEnabled * getEarMonitorEnabled * setPlayingVolume * getPlayingVolume * addAudioFilter * removeAudioFilter Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalAudioTrackDelegate](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/11969/QNLocalAudioTrackDelegate)> delegate; * 本地音频 Track 回调代理 encryptDelegate * @property (nonatomic, weak) id<[QNAudioEncryptDelegate](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack-iOS/12618/qnaudioencryptdelegate)> encryptDelegate; * 本地音频 Track 加密回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteAudioTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8854/QNLocalAudioTrack- iOS/11948) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 setVolume * \- (void)setVolume:(double)volume; * 设置当前音频输入设备采集的音量大小 > 音量值在 0.0 ~ 1.0 之间为软件缩小;1.0 为原始音量;大于 1.0 且小于 10.0 为软件放大 > > 在需要放大时,应从 1.x 开始设置,用最小的放大值来取得合适的播放效果,过大将会导致音频音调异常 > > 该设置可以用于适度对采集音量做放大或者缩小 Parameters * volume: double 采集音量大小,范围 0.0 ~ 10.0,默认为 1.0 getVolumeLevel * \- (float)getVolumeLevel; * 获取当前音频输入设备采集的音量大小 > 可通过定时调用该方法获取音量值的方式来判断当前用户是否在讲话 > > 在安静的环境下,获取到 0.0x 大小的数值为预期现象,您可根据您的需求自行决定判断的阈值 Returns float setEarMonitorEnabled * \- (void)setEarMonitorEnabled:(BOOL)enabled; * 设置耳返开关,默认为 NO > 为达到最佳体验,建议佩戴耳机的场景下,使用该功能 Parameters * enabled: BOOL 开关 getEarMonitorEnabled * \- (BOOL)getEarMonitorEnabled; * 是否开启了耳返 Returns BOOL setPlayingVolume * \- (void)setPlayingVolume:(float)volume; * 设置混音、返听场景下,本地播放的音量大小,范围 0 ~ 1.0 Parameters * volume: float 播放音量 getPlayingVolume * \- (float)getPlayingVolume * 获取播放音量 Returns float,范围 0 ~ 1.0 addAudioFilter * \- (BOOL)addAudioFilter:(id<QNAudioFilterProtocol>)filter * 增加 filter 模块。目前支持设置 QNAudioMusicMixer、QNAudioEffectMixer、QNAudioSourceMixer 等内置 Filter Returns BOOL removeAudioFilter * \- (BOOL)removeAudioFilter:(id<QNAudioFilterProtocol>)filter * 移除 filter 模块 Returns BOOL 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,093
QNMicrophoneAudioTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMicrophoneAudioTrack # QNMicrophoneAudioTrack 最近更新时间: 2023-11-20 10:33:12 本地音频麦克风 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8854/QNLocalAudioTrack-iOS) * QNMicrophoneAudioTrack * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate * microphoneDelegate Core Methods * updateMute * destroy * startRecording * stopRecording Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalAudioTrackDelegate](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/11969/QNLocalAudioTrackDelegate)> delegate; * 本地音频 Track 回调代理 microphoneDelegate * @property (nonatomic, weak) id<[QNMicrophoneAudioTrackDelegate](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/12582/QNMicrophoneAudioTrackDelegate)> microphoneDelegate; * 麦克风 Track 回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteAudioTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack- iOS/11948) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 startRecording * \- (BOOL)startRecording; * 开始麦克风采集 > 请根据调用此接口返回的结果,进行下一步业务逻辑处理 Returns 是否调用成功 stopRecording * \- (BOOL)stopRecording; * 停止麦克风采集 > 请根据调用此接口返回的结果,进行下一步业务逻辑处理 Returns 是否调用成功 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMicrophoneAudioTrack # QNMicrophoneAudioTrack 最近更新时间: 2023-11-20 10:33:12 本地音频麦克风 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8854/QNLocalAudioTrack-iOS) * QNMicrophoneAudioTrack * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * delegate * microphoneDelegate Core Methods * updateMute * destroy * startRecording * stopRecording Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 delegate * @property (nonatomic, weak) id<[QNLocalAudioTrackDelegate](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/11969/QNLocalAudioTrackDelegate)> delegate; * 本地音频 Track 回调代理 microphoneDelegate * @property (nonatomic, weak) id<[QNMicrophoneAudioTrackDelegate](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack-iOS/12582/QNMicrophoneAudioTrackDelegate)> microphoneDelegate; * 麦克风 Track 回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteAudioTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8855/QNMicrophoneAudioTrack- iOS/11948) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 startRecording * \- (BOOL)startRecording; * 开始麦克风采集 > 请根据调用此接口返回的结果,进行下一步业务逻辑处理 Returns 是否调用成功 stopRecording * \- (BOOL)stopRecording; * 停止麦克风采集 > 请根据调用此接口返回的结果,进行下一步业务逻辑处理 Returns 是否调用成功 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,099
QNCustomAudioTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomAudioTrack # QNCustomAudioTrack 最近更新时间: 2022-06-30 15:11:53 本地音频自定义导入 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * QNCustomAudioTrack * [QNRemoteTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * customAudioDelegate Core Methods * updateMute * destroy * setVolume * getVolumeLevel * pushAudioBuffer[1/2] * pushAudioBuffer[2/2] Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 customAudioDelegate * @property (nonatomic, weak) id<[QNCustomAudioTrackDelegate](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/11946/QNCustomAudioTrackDelegate)> customAudioDelegate; * 自定义音频 Track 回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteAudioTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack- iOS/11948) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 setVolume * \- (void)setVolume:(double)volume; * 设置当前音频输入设备的音量大小,范围 0 ~ 10,默认为 1 > 音量值在 0.0 ~ 1.0 之间为软件缩小;1.0 为原始音量;大于 1.0 且小于 10.0 为软件放大 > > 在需要放大时,应从 1.x 开始设置,用最小的放大值来取得合适的播放效果,过大将会导致音频音调异常 > > 该设置可以用于适度对数据音量做放大或者缩小 Parameters * volume: double 音量值 getVolumeLevel * \- (float)getVolumeLevel; * 获取当前音频输入设备采集的音量大小 > 可通过定时调用该方法获取音量值的方式来判断当前用户是否在讲话 > > 在安静的环境下,获取到 0.0x 大小的数值为预期现象,您可根据您的需求自行决定判断的阈值 Returns float 范围 0 ~ 10 pushAudioBuffer[1/2] * \- (void)pushAudioBuffer:(AudioBuffer *)audioBuffer; * 导入自定义音频数据 > 支持的音频数据格式为:PCM 格式,48000 采样率,16 位宽,单声道 Parameters * audioBuffer: AudioBuffer 音频数据 buffer pushAudioBuffer[2/2] * \- (void)pushAudioBuffer:(AudioBuffer *)audioBuffer asbd:(AudioStreamBasicDescription *)asbd; * 导入自定义 PCM 音频数据 > 支持的音频数据格式为:PCM 格式 > 音频数据的格式信息,请务必对应实际数据信息传入,否则可能出现音频声音异常等情况 Parameters * audioBuffer: AudioBuffer 音频数据 buffer * asbd: AudioStreamBasicDescription 音频数据格式信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomAudioTrack # QNCustomAudioTrack 最近更新时间: 2022-06-30 15:11:53 本地音频自定义导入 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * QNCustomAudioTrack * [QNRemoteTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * customAudioDelegate Core Methods * updateMute * destroy * setVolume * getVolumeLevel * pushAudioBuffer[1/2] * pushAudioBuffer[2/2] Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 customAudioDelegate * @property (nonatomic, weak) id<[QNCustomAudioTrackDelegate](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack-iOS/11946/QNCustomAudioTrackDelegate)> customAudioDelegate; * 自定义音频 Track 回调代理 Core Methods updateMute * \- (void)updateMute:(BOOL)mute; * 更新当前 Track 的 mute 值,静默后,SDK 将会发送静默帧数据 当静默状态改变后,远端用户将会收到 [QNRemoteAudioTrackDelegate.didMuteStateChanged](https://developer.qiniu.com/rtc/8856/QNCustomAudioTrack- iOS/11948) 的回调 Parameters * mute: BOOL 是否静默 Track destroy * \- (void)destroy; * 销毁本地音/视频 Track > 在不使用该 Track 之后,请务必调用此接口 setVolume * \- (void)setVolume:(double)volume; * 设置当前音频输入设备的音量大小,范围 0 ~ 10,默认为 1 > 音量值在 0.0 ~ 1.0 之间为软件缩小;1.0 为原始音量;大于 1.0 且小于 10.0 为软件放大 > > 在需要放大时,应从 1.x 开始设置,用最小的放大值来取得合适的播放效果,过大将会导致音频音调异常 > > 该设置可以用于适度对数据音量做放大或者缩小 Parameters * volume: double 音量值 getVolumeLevel * \- (float)getVolumeLevel; * 获取当前音频输入设备采集的音量大小 > 可通过定时调用该方法获取音量值的方式来判断当前用户是否在讲话 > > 在安静的环境下,获取到 0.0x 大小的数值为预期现象,您可根据您的需求自行决定判断的阈值 Returns float 范围 0 ~ 10 pushAudioBuffer[1/2] * \- (void)pushAudioBuffer:(AudioBuffer *)audioBuffer; * 导入自定义音频数据 > 支持的音频数据格式为:PCM 格式,48000 采样率,16 位宽,单声道 Parameters * audioBuffer: AudioBuffer 音频数据 buffer pushAudioBuffer[2/2] * \- (void)pushAudioBuffer:(AudioBuffer *)audioBuffer asbd:(AudioStreamBasicDescription *)asbd; * 导入自定义 PCM 音频数据 > 支持的音频数据格式为:PCM 格式 > 音频数据的格式信息,请务必对应实际数据信息传入,否则可能出现音频声音异常等情况 Parameters * audioBuffer: AudioBuffer 音频数据 buffer * asbd: AudioStreamBasicDescription 音频数据格式信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,103
QNCDNStreamingStats
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCDNStreamingStats # QNCDNStreamingStats 最近更新时间: 2024-01-12 15:33:55 推流的统计数据 Index Core Properties * sendVideoFps * videoBitrate * audioBitrate * droppedVideoFrames Core Properties sendVideoFps * @property (nonatomic, assign) uint32_t sendVideoFps; * 发送到 CDN 的视频 fps videoBitrate * @property (nonatomic, assign) uint32_t videoBitrate; * 发送的视频码率,单位 kbps audioBitrate * @property (nonatomic, assign) uint32_t audioBitrate; * 发送的音频码率,单位 kbps droppedVideoFrames * @property (nonatomic, assign) uint32_t droppedVideoFrames; * 每秒的视频丢帧数 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCDNStreamingStats # QNCDNStreamingStats 最近更新时间: 2024-01-12 15:33:55 推流的统计数据 Index Core Properties * sendVideoFps * videoBitrate * audioBitrate * droppedVideoFrames Core Properties sendVideoFps * @property (nonatomic, assign) uint32_t sendVideoFps; * 发送到 CDN 的视频 fps videoBitrate * @property (nonatomic, assign) uint32_t videoBitrate; * 发送的视频码率,单位 kbps audioBitrate * @property (nonatomic, assign) uint32_t audioBitrate; * 发送的音频码率,单位 kbps droppedVideoFrames * @property (nonatomic, assign) uint32_t droppedVideoFrames; * 每秒的视频丢帧数 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,109
QNRemoteTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteTrack # QNRemoteTrack 最近更新时间: 2022-06-30 15:44:34 音视频远端 Track 基类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8856/QNCustomAudioTrack-iOS) * QNRemoteTrack * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * isSubscribed Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 isSubscribed * @property (nonatomic, readonly)BOOL isSubscribed; * 是否被订阅,只读属性 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteTrack # QNRemoteTrack 最近更新时间: 2022-06-30 15:44:34 音视频远端 Track 基类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8856/QNCustomAudioTrack-iOS) * QNRemoteTrack * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8858/QNRemoteVideoTrack-iOS) * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * isSubscribed Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8857/QNRemoteTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 isSubscribed * @property (nonatomic, readonly)BOOL isSubscribed; * 是否被订阅,只读属性 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,110
QNRemoteVideoTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteVideoTrack # QNRemoteVideoTrack 最近更新时间: 2022-06-30 15:49:12 视频远端 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8857/QNRemoteTrack-iOS) * QNRemoteVideoTrack * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * isSubscribed * delegate * isMultiProfileEnabled * profile Core Methods * play * setProfile Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 isSubscribed * @property (nonatomic, readonly)BOOL isSubscribed; * 是否被订阅,只读属性 delegate * @property (nonatomic, weak) id<[QNRemoteVideoTrackDelegate](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/11947/QNRemoteVideoTrackDelegate)> delegate; * 远端视频 Track 回调代理 isMultiProfileEnabled * @property (nonatomic, assign, readonly) BOOL isMultiProfileEnabled; * 是否开启大小流,只读属性 profile * @property (nonatomic, assign, readonly) [QNTrackProfile](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/9254) profile; * 当前大小流等级,只读属性 Core Methods play * \- (void)play:(nullable [QNVideoGLView](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/11950/QNVideoGLView-iOS) *)renderView; * 渲染远端 Track 视图 Parameters * renderView: [QNVideoGLView](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/11950/QNVideoGLView-iOS) 需要渲染的视图 setProfile * \- (void)setProfile:([QNTrackProfile](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/9254))profile; * 设置大小流分辨率等级 > 该接口仅用来设置预期的订阅流质量等级,并不代表实际的订阅等级,若实际发送端还未发送指定等级的流,则将无法订阅到指定的 profile > > 实际订阅质量等级的改变会触发 > [QNRemoteVideoTrackDelegate.didVideoProfileChanged](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack- > iOS/11947) 回调,可按需实现相关代理 > > > 关于视频大小流分辨率等级的详细内容,可参阅[视频大小流](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack- > iOS/9259/multi-stream-iOS)使用指南文档 Parameters * profile: [QNTrackProfile](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/9254) 分辨率等级 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteVideoTrack # QNRemoteVideoTrack 最近更新时间: 2022-06-30 15:49:12 视频远端 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8857/QNRemoteTrack-iOS) * QNRemoteVideoTrack * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/8859/QNRemoteAudioTrack-iOS) Index Core Properties * userID * trackID * kind * tag * muted * isSubscribed * delegate * isMultiProfileEnabled * profile Core Methods * play * setProfile Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag > 当发布多路视频 Track 时,可用 tag 来作区分 muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 isSubscribed * @property (nonatomic, readonly)BOOL isSubscribed; * 是否被订阅,只读属性 delegate * @property (nonatomic, weak) id<[QNRemoteVideoTrackDelegate](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/11947/QNRemoteVideoTrackDelegate)> delegate; * 远端视频 Track 回调代理 isMultiProfileEnabled * @property (nonatomic, assign, readonly) BOOL isMultiProfileEnabled; * 是否开启大小流,只读属性 profile * @property (nonatomic, assign, readonly) [QNTrackProfile](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/9254) profile; * 当前大小流等级,只读属性 Core Methods play * \- (void)play:(nullable [QNVideoGLView](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/11950/QNVideoGLView-iOS) *)renderView; * 渲染远端 Track 视图 Parameters * renderView: [QNVideoGLView](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/11950/QNVideoGLView-iOS) 需要渲染的视图 setProfile * \- (void)setProfile:([QNTrackProfile](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/9254))profile; * 设置大小流分辨率等级 > 该接口仅用来设置预期的订阅流质量等级,并不代表实际的订阅等级,若实际发送端还未发送指定等级的流,则将无法订阅到指定的 profile > > 实际订阅质量等级的改变会触发 > [QNRemoteVideoTrackDelegate.didVideoProfileChanged](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack- > iOS/11947) 回调,可按需实现相关代理 > > > 关于视频大小流分辨率等级的详细内容,可参阅[视频大小流](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack- > iOS/9259/multi-stream-iOS)使用指南文档 Parameters * profile: [QNTrackProfile](https://developer.qiniu.com/rtc/8858/QNRemoteVideoTrack-iOS/9254) 分辨率等级 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,113
QNRemoteAudioTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteAudioTrack # QNRemoteAudioTrack 最近更新时间: 2024-01-18 16:06:26 音频远端 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8858/QNRemoteVideoTrack-iOS) * QNRemoteAudioTrack Index Core Properties * userID * trackID * kind * tag * muted * isSubscribed * delegate * decryptDelegate Core Methods * setVolume * getVolumeLevel Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 isSubscribed * @property (nonatomic, readonly)BOOL isSubscribed; * 是否已订阅 delegate * @property (nonatomic, weak) id<[QNRemoteAudioTrackDelegate](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/11948/QNRemoteAudioTrackDelegate)> delegate; * 远端音频 Track 的代理 decryptDelegate * @property (nonatomic, weak) id<[QNAudioDecryptDelegate](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/12617/qnaudiodecryptdelegate)> decryptDelegate; * 远端音频 Track 解密的代理 Core Methods setVolume * \- (void)setVolume:(double)volume; * 设置当前 Track 播放音量大小,范围 0.0 ~ 10.0,默认为 1.0 > 音量值在 0.0 ~ 1.0 之间为软件缩小;1.0 为原始音量;大于 1.0 且小于 10.0 为软件放大 > > 在需要放大时,应从 1.x 开始设置,用最小的放大值来取得合适的播放效果,过大将会导致音频音调异常 > > 该设置可以用于适度对播放音量做放大或者缩小,不影响远端音频数据的原始音量 > 部分机型调整音量放大会出现低频噪音 Parameters * volume: double 播放音量大小 getVolumeLevel * \- (float)getVolumeLevel; * 获取当前 Track 播放音量大小 > 可通过定时调用该方法获取音量值的方式来判断当前用户是否在讲话 > > 在安静的环境下,获取到 0.0x 大小的数值为预期现象,您可根据您的需求自行决定判断的阈值 Returns float 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteAudioTrack # QNRemoteAudioTrack 最近更新时间: 2024-01-18 16:06:26 音频远端 Track 类 Hierarchy * [QNTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8851/QNTrack-iOS) * [QNLocalTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8847/QNLocalTrack-iOS) * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8849/QNLocalVideoTrack-iOS) * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8852/QNCameraVideoTrack-iOS) * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8850/QNScreenVideoTrack-iOS) * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8853/QNCustomVideoTrack-iOS) * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8854/QNLocalAudioTrack-iOS) * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8855/QNMicrophoneAudioTrack-iOS) * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8856/QNCustomAudioTrack-iOS) * [QNRemoteTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8857/QNRemoteTrack-iOS) * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/8858/QNRemoteVideoTrack-iOS) * QNRemoteAudioTrack Index Core Properties * userID * trackID * kind * tag * muted * isSubscribed * delegate * decryptDelegate Core Methods * setVolume * getVolumeLevel Core Properties userID * @property (nonatomic, readonly) NSString *userID; * 一路 Track 所属用户的唯一标识 trackID * @property (nonatomic, strong) NSString *trackID; * 一路 Track 在 Server 端的唯一标识 > 发布成功时由 SDK 自动生成,订阅/Mute 等操作依据此 trackID 来确定相应的 Track kind * @property (nonatomic, readonly) [QNTrackKind](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/9254) kind; * 标识该路 Track 是音频还是视频 tag * @property (nonatomic, strong) NSString *tag; * Track 的 tag muted * @property (nonatomic, assign, readonly) BOOL muted; * 标识 Track 是否为 mute 状态 isSubscribed * @property (nonatomic, readonly)BOOL isSubscribed; * 是否已订阅 delegate * @property (nonatomic, weak) id<[QNRemoteAudioTrackDelegate](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/11948/QNRemoteAudioTrackDelegate)> delegate; * 远端音频 Track 的代理 decryptDelegate * @property (nonatomic, weak) id<[QNAudioDecryptDelegate](https://developer.qiniu.com/rtc/8859/QNRemoteAudioTrack-iOS/12617/qnaudiodecryptdelegate)> decryptDelegate; * 远端音频 Track 解密的代理 Core Methods setVolume * \- (void)setVolume:(double)volume; * 设置当前 Track 播放音量大小,范围 0.0 ~ 10.0,默认为 1.0 > 音量值在 0.0 ~ 1.0 之间为软件缩小;1.0 为原始音量;大于 1.0 且小于 10.0 为软件放大 > > 在需要放大时,应从 1.x 开始设置,用最小的放大值来取得合适的播放效果,过大将会导致音频音调异常 > > 该设置可以用于适度对播放音量做放大或者缩小,不影响远端音频数据的原始音量 > 部分机型调整音量放大会出现低频噪音 Parameters * volume: double 播放音量大小 getVolumeLevel * \- (float)getVolumeLevel; * 获取当前 Track 播放音量大小 > 可通过定时调用该方法获取音量值的方式来判断当前用户是否在讲话 > > 在安静的环境下,获取到 0.0x 大小的数值为预期现象,您可根据您的需求自行决定判断的阈值 Returns float 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,118
QNAudioQuality
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioQuality # QNAudioQuality 最近更新时间: 2022-06-30 14:51:04 Track 音频编码配置类 Index Core Properties * bitrate Core Methods * defaultAudioQuality * initWithBitrate Core Properties bitrate * @property (nonatomic, assign, readonly) NSUInteger bitrate; * 音频编码码率,默认 64kbps,单位 kbps Core Methods defaultAudioQuality * \+ (instancetype)defaultAudioQuality; * 初始化默认音频编码配置,默认码率为 64kbps Returns [QNAudioQuality](https://developer.qiniu.com/rtc/11936/QNAudioQuality- iOS/11936/QNAudioQuality-iOS) 实例对象 initWithBitrate * \- (instancetype)initWithBitrate:(NSUInteger)bitrate; * 初始化指定码率音频编码配置,单位 kbps Parameters * bitrate: NSUInteger 音频码率 Returns [QNAudioQuality](https://developer.qiniu.com/rtc/11936/QNAudioQuality- iOS/11936/QNAudioQuality-iOS) 实例对象 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioQuality # QNAudioQuality 最近更新时间: 2022-06-30 14:51:04 Track 音频编码配置类 Index Core Properties * bitrate Core Methods * defaultAudioQuality * initWithBitrate Core Properties bitrate * @property (nonatomic, assign, readonly) NSUInteger bitrate; * 音频编码码率,默认 64kbps,单位 kbps Core Methods defaultAudioQuality * \+ (instancetype)defaultAudioQuality; * 初始化默认音频编码配置,默认码率为 64kbps Returns [QNAudioQuality](https://developer.qiniu.com/rtc/11936/QNAudioQuality- iOS/11936/QNAudioQuality-iOS) 实例对象 initWithBitrate * \- (instancetype)initWithBitrate:(NSUInteger)bitrate; * 初始化指定码率音频编码配置,单位 kbps Parameters * bitrate: NSUInteger 音频码率 Returns [QNAudioQuality](https://developer.qiniu.com/rtc/11936/QNAudioQuality- iOS/11936/QNAudioQuality-iOS) 实例对象 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,122
QNVideoEncoderConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNVideoEncoderConfig # QNVideoEncoderConfig 最近更新时间: 2023-08-22 12:06:57 Track 视频编码配置类 Index Core Properties * bitrate * bitrate * bitrate * preference * formatPreset Core Methods * defaultVideoEncoderConfig * initWithBitrate[1/4] * initWithBitrate[2/4] * initWithBitrate[3/4] * initWithBitrate[4/4] * initWithPreference Core Properties bitrate * @property (nonatomic, assign, readonly) NSUInteger bitrate; * Track 的 bitrate (单位 kbps),默认码率为 600kbps bitrate * @property (nonatomic, assign, readonly) CGSize videoEncodeSize; * Track 编码画面大小,默认 480x640 > 若视频编码分辨率无法达到设置值,则以实际采集分辨率为准 bitrate * @property (nonatomic, assign, readonly) NSUInteger videoFrameRate; * Track 编码帧数,默认 24 帧 > 若视频输入帧数无法达到设置值,则以实际输入帧数为准 preference * @property (nonatomic, assign, readonly) [QNDegradationPreference](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) preference; * 视频质量降级模式,默认是 QNDegradationDefault formatPreset * @property (nonatomic, assign, readonly) [QNVideoFormatPreset](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) formatPreset; * 视频编码预设 Core Methods defaultVideoEncoderConfig * \+ (instancetype)defaultVideoEncoderConfig; * 初始化默认编码配置 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithBitrate[1/4] * \- (instancetype)initWithBitrate:(NSUInteger)bitrate; * 初始化指定 bitrate 参数的编码配置 Parameters * bitrate: NSUInteger 视频码率,单位 kbps Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithBitrate[2/4] * \- (instancetype)initWithBitrate:(NSUInteger)bitrate videoEncodeSize:(CGSize)videoEncodeSize; * 初始化指定 bitrate、videoEncodeSize 参数的编码配置 Parameters * bitrate: NSUInteger 视频码率,单位 kbps * videoEncodeSize: CGSize 视频编码尺寸 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithBitrate[3/4] * \- (instancetype)initWithBitrate:(NSUInteger)bitrate videoEncodeSize:(CGSize)videoEncodeSize videoFrameRate:(NSUInteger)videoFrameRate * 初始化指定 bitrate、videoEncodeSize、videoFrameRate 参数的编码配置 Parameters * bitrate: NSUInteger 视频码率,单位 kbps * videoEncodeSize: CGSize 视频编码尺寸 * videoFrameRate: NSUInteger 视频编码帧率 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithBitrate[4/4] * \- (instancetype)initWithBitrate:(NSUInteger)bitrate videoEncodeSize:(CGSize)videoEncodeSize videoFrameRate:(NSUInteger)videoFrameRate preference:([QNDegradationPreference](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254))preference * 初始化指定 bitrate、videoEncodeSize、videoFrameRate、preference 参数的编码配置 Parameters * bitrate: NSUInteger 视频码率,单位 kbps * videoEncodeSize: CGSize 视频编码尺寸 * videoFrameRate: NSUInteger 视频编码帧率 * preference: [QNDegradationPreference](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) 视频质量降级模式 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithPreference * \- (instancetype)initWithPreference:(QNDegradationPreference)preference formatPreset:(QNVideoFormatPreset)formatPreset; * 初始化指定 preference、formatPreset 参数的编码配置 Parameters * preference: [QNDegradationPreference](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) 视频质量降级模式 * formatPreset: [QNVideoFormatPreset](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) 视频编码预设 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNVideoEncoderConfig # QNVideoEncoderConfig 最近更新时间: 2023-08-22 12:06:57 Track 视频编码配置类 Index Core Properties * bitrate * bitrate * bitrate * preference * formatPreset Core Methods * defaultVideoEncoderConfig * initWithBitrate[1/4] * initWithBitrate[2/4] * initWithBitrate[3/4] * initWithBitrate[4/4] * initWithPreference Core Properties bitrate * @property (nonatomic, assign, readonly) NSUInteger bitrate; * Track 的 bitrate (单位 kbps),默认码率为 600kbps bitrate * @property (nonatomic, assign, readonly) CGSize videoEncodeSize; * Track 编码画面大小,默认 480x640 > 若视频编码分辨率无法达到设置值,则以实际采集分辨率为准 bitrate * @property (nonatomic, assign, readonly) NSUInteger videoFrameRate; * Track 编码帧数,默认 24 帧 > 若视频输入帧数无法达到设置值,则以实际输入帧数为准 preference * @property (nonatomic, assign, readonly) [QNDegradationPreference](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) preference; * 视频质量降级模式,默认是 QNDegradationDefault formatPreset * @property (nonatomic, assign, readonly) [QNVideoFormatPreset](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) formatPreset; * 视频编码预设 Core Methods defaultVideoEncoderConfig * \+ (instancetype)defaultVideoEncoderConfig; * 初始化默认编码配置 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithBitrate[1/4] * \- (instancetype)initWithBitrate:(NSUInteger)bitrate; * 初始化指定 bitrate 参数的编码配置 Parameters * bitrate: NSUInteger 视频码率,单位 kbps Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithBitrate[2/4] * \- (instancetype)initWithBitrate:(NSUInteger)bitrate videoEncodeSize:(CGSize)videoEncodeSize; * 初始化指定 bitrate、videoEncodeSize 参数的编码配置 Parameters * bitrate: NSUInteger 视频码率,单位 kbps * videoEncodeSize: CGSize 视频编码尺寸 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithBitrate[3/4] * \- (instancetype)initWithBitrate:(NSUInteger)bitrate videoEncodeSize:(CGSize)videoEncodeSize videoFrameRate:(NSUInteger)videoFrameRate * 初始化指定 bitrate、videoEncodeSize、videoFrameRate 参数的编码配置 Parameters * bitrate: NSUInteger 视频码率,单位 kbps * videoEncodeSize: CGSize 视频编码尺寸 * videoFrameRate: NSUInteger 视频编码帧率 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithBitrate[4/4] * \- (instancetype)initWithBitrate:(NSUInteger)bitrate videoEncodeSize:(CGSize)videoEncodeSize videoFrameRate:(NSUInteger)videoFrameRate preference:([QNDegradationPreference](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254))preference * 初始化指定 bitrate、videoEncodeSize、videoFrameRate、preference 参数的编码配置 Parameters * bitrate: NSUInteger 视频码率,单位 kbps * videoEncodeSize: CGSize 视频编码尺寸 * videoFrameRate: NSUInteger 视频编码帧率 * preference: [QNDegradationPreference](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) 视频质量降级模式 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) initWithPreference * \- (instancetype)initWithPreference:(QNDegradationPreference)preference formatPreset:(QNVideoFormatPreset)formatPreset; * 初始化指定 preference、formatPreset 参数的编码配置 Parameters * preference: [QNDegradationPreference](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) 视频质量降级模式 * formatPreset: [QNVideoFormatPreset](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig-iOS/9254) 视频编码预设 Returns [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/11944/QNVideoEncoderConfig- iOS/11944/QNVideoEncoderConfig-iOS) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,124
QNMediaRecordInfo
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaRecordInfo # QNMediaRecordInfo 最近更新时间: 2024-06-28 16:41:34 音视频本地录制的信息 Index Core Properties * filePath * fileSize * duration Core Properties filePath * @property(nonatomic, copy, readonly) NSString * _Nullable filePath; * 录制文件的存储路径 fileSize * @property(nonatomic, assign, readonly) int32_t fileSize; * 录制文件的大小,单位为字节 duration * @property(nonatomic, assign, readonly) int64_t duration; * 录制文件的时长,单位毫秒 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaRecordInfo # QNMediaRecordInfo 最近更新时间: 2024-06-28 16:41:34 音视频本地录制的信息 Index Core Properties * filePath * fileSize * duration Core Properties filePath * @property(nonatomic, copy, readonly) NSString * _Nullable filePath; * 录制文件的存储路径 fileSize * @property(nonatomic, assign, readonly) int32_t fileSize; * 录制文件的大小,单位为字节 duration * @property(nonatomic, assign, readonly) int64_t duration; * 录制文件的时长,单位毫秒 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,131
QNMediaRecorderConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaRecorderConfig # QNMediaRecorderConfig 最近更新时间: 2024-06-28 16:41:23 用来配置 QNMediaRecorder 的相关信息 Index Core Properties * filePath * localAudioTrack * localVideoTrack Core methods * initWithFilePath Core Properties filePath * @property (nonatomic, copy, readonly) NSString * _Nullable filePath; * 请确保路径完整精确到文件名和类型,存在有效且可读可写 支持 aac、wav、mp4 localAudioTrack * @property (nonatomic, strong, readonly) [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8854/QNLocalAudioTrack-iOS) *localAudioTrack; * 本地音频,支持麦克风或自定义音频 仅支持一路音频轨的设置,重复设置会被覆盖 localVideoTrack * @property (nonatomic, strong, readonly) [QNLocalVideoTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8849/QNLocalVideoTrack-iOS) *localVideoTrack; * 本地视频,支持摄像头或自定义视频 仅支持一路视频轨的设置,重复设置会被覆盖 Core methods initWithFilePath * \- (instancetype)initWithFilePath:(NSString *_Nullable)filePath localAudioTrack:([QNLocalAudioTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8854/QNLocalAudioTrack-iOS) *_Nullable)localAudioTrack localVideoTrack:([QNLocalVideoTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8849/QNLocalVideoTrack-iOS) *_Nullable)localVideoTrack; * 初始化指定文件路径、本地音频录制 Track > 注意:文件路径,传空默认存储在 App Container/Library/Caches/Pili/RecordFile Parameters * filePath: NSString 文件路径 * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8854/QNLocalAudioTrack-iOS) 本地音频 Track * localVideoTrack: [QNLocalVideoTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8849/QNLocalVideoTrack-iOS) 本地视频 Track Returns [QNMediaRecorderConfig](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig- iOS/undefined) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaRecorderConfig # QNMediaRecorderConfig 最近更新时间: 2024-06-28 16:41:23 用来配置 QNMediaRecorder 的相关信息 Index Core Properties * filePath * localAudioTrack * localVideoTrack Core methods * initWithFilePath Core Properties filePath * @property (nonatomic, copy, readonly) NSString * _Nullable filePath; * 请确保路径完整精确到文件名和类型,存在有效且可读可写 支持 aac、wav、mp4 localAudioTrack * @property (nonatomic, strong, readonly) [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8854/QNLocalAudioTrack-iOS) *localAudioTrack; * 本地音频,支持麦克风或自定义音频 仅支持一路音频轨的设置,重复设置会被覆盖 localVideoTrack * @property (nonatomic, strong, readonly) [QNLocalVideoTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8849/QNLocalVideoTrack-iOS) *localVideoTrack; * 本地视频,支持摄像头或自定义视频 仅支持一路视频轨的设置,重复设置会被覆盖 Core methods initWithFilePath * \- (instancetype)initWithFilePath:(NSString *_Nullable)filePath localAudioTrack:([QNLocalAudioTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8854/QNLocalAudioTrack-iOS) *_Nullable)localAudioTrack localVideoTrack:([QNLocalVideoTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8849/QNLocalVideoTrack-iOS) *_Nullable)localVideoTrack; * 初始化指定文件路径、本地音频录制 Track > 注意:文件路径,传空默认存储在 App Container/Library/Caches/Pili/RecordFile Parameters * filePath: NSString 文件路径 * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8854/QNLocalAudioTrack-iOS) 本地音频 Track * localVideoTrack: [QNLocalVideoTrack](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig-iOS/8849/QNLocalVideoTrack-iOS) 本地视频 Track Returns [QNMediaRecorderConfig](https://developer.qiniu.com/rtc/12687/QNMediaRecorderConfig- iOS/undefined) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,132
QNCameraVideoTrackConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCameraVideoTrackConfig # QNCameraVideoTrackConfig 最近更新时间: 2022-06-30 15:05:36 摄像头视频采集 Track 的配置类 Index Core Properties * tag * multiStreamEnable * captureDevicePosition * config Core Methods * defaultCameraVideoTrackConfig * initWithSourceTag[1/3] * initWithSourceTag[2/3] * initWithSourceTag[3/3] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端 > 当发布多路 Track 时可用 tag 来作区分 multiStreamEnable * @property (nonatomic, assign) BOOL multiStreamEnable; * Track 是否开启大小流 关于大小流功能,可参考[视频大小流使用指南](https://developer.qiniu.com/rtc/development_guidelines/9259/multi- stream-iOS) captureDevicePosition * @property (nonatomic, assign) AVCaptureDevicePosition captureDevicePosition; * 摄像头的位置,默认为 AVCaptureDevicePositionFront config * @property (nonatomic, strong, readonly) [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *config; * Track 的视频编码配置 Core Methods defaultCameraVideoTrackConfig * \+ (instancetype)defaultCameraVideoTrackConfig; * 初始化默认 Track 配置,tag 为""、码率 600kbps、编码尺寸 480x640、24 帧、前置、关闭大小流 Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/8844/QNCameraVideoTrackConfig-iOS) initWithSourceTag[1/3] * \- (instancetype)initWithSourceTag:(NSString *)tag; * 初始化指定 tag 参数的 Track 配置,码率 600kbps、编码尺寸 480x640、24 帧、前置、关闭大小流 Parameters * tag: NSString Track 的 tag Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/8844/QNCameraVideoTrackConfig-iOS) initWithSourceTag[2/3] * \- (instancetype)initWithSourceTag:(NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config; * 初始化指定 tag、config 参数的 Track 配置,关闭大小流 其中,码率、编码尺寸、帧率均由 [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/11944/QNVideoEncoderConfig-iOS) 配置决定 Parameters * tag: NSString Track 的 tag * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置 Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/8844/QNCameraVideoTrackConfig-iOS) initWithSourceTag[3/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config multiStreamEnable:(BOOL)multiStreamEnable * 初始化指定 tag、config、multiStreamEnable 参数的 Track 配置 其中,码率、编码尺寸、帧率均由 [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/11944/QNVideoEncoderConfig-iOS) 配置决定 Parameters * tag: NSString Track 的 tag * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置 * multiStreamEnable: BOOL Track 是否开启大小流 Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/8844/QNCameraVideoTrackConfig-iOS) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCameraVideoTrackConfig # QNCameraVideoTrackConfig 最近更新时间: 2022-06-30 15:05:36 摄像头视频采集 Track 的配置类 Index Core Properties * tag * multiStreamEnable * captureDevicePosition * config Core Methods * defaultCameraVideoTrackConfig * initWithSourceTag[1/3] * initWithSourceTag[2/3] * initWithSourceTag[3/3] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端 > 当发布多路 Track 时可用 tag 来作区分 multiStreamEnable * @property (nonatomic, assign) BOOL multiStreamEnable; * Track 是否开启大小流 关于大小流功能,可参考[视频大小流使用指南](https://developer.qiniu.com/rtc/development_guidelines/9259/multi- stream-iOS) captureDevicePosition * @property (nonatomic, assign) AVCaptureDevicePosition captureDevicePosition; * 摄像头的位置,默认为 AVCaptureDevicePositionFront config * @property (nonatomic, strong, readonly) [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *config; * Track 的视频编码配置 Core Methods defaultCameraVideoTrackConfig * \+ (instancetype)defaultCameraVideoTrackConfig; * 初始化默认 Track 配置,tag 为""、码率 600kbps、编码尺寸 480x640、24 帧、前置、关闭大小流 Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/8844/QNCameraVideoTrackConfig-iOS) initWithSourceTag[1/3] * \- (instancetype)initWithSourceTag:(NSString *)tag; * 初始化指定 tag 参数的 Track 配置,码率 600kbps、编码尺寸 480x640、24 帧、前置、关闭大小流 Parameters * tag: NSString Track 的 tag Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/8844/QNCameraVideoTrackConfig-iOS) initWithSourceTag[2/3] * \- (instancetype)initWithSourceTag:(NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config; * 初始化指定 tag、config 参数的 Track 配置,关闭大小流 其中,码率、编码尺寸、帧率均由 [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/11944/QNVideoEncoderConfig-iOS) 配置决定 Parameters * tag: NSString Track 的 tag * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置 Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/8844/QNCameraVideoTrackConfig-iOS) initWithSourceTag[3/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config multiStreamEnable:(BOOL)multiStreamEnable * 初始化指定 tag、config、multiStreamEnable 参数的 Track 配置 其中,码率、编码尺寸、帧率均由 [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/11944/QNVideoEncoderConfig-iOS) 配置决定 Parameters * tag: NSString Track 的 tag * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置 * multiStreamEnable: BOOL Track 是否开启大小流 Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8844/QNCameraVideoTrackConfig- iOS/8844/QNCameraVideoTrackConfig-iOS) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,134
QNScreenVideoTrackConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNScreenVideoTrackConfig # QNScreenVideoTrackConfig 最近更新时间: 2022-06-30 16:30:38 屏幕录制 Track 的配置类 Index Core Properties * tag * config * multiStreamEnable Core Methods * defaultScreenVideoTrackConfig * initWithSourceTag[1/3] * initWithSourceTag[2/3] * initWithSourceTag[3/3] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分。 config * @property (nonatomic, strong, readonly) [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *config; * Track 的视频编码配置 multiStreamEnable * @property (nonatomic, assign) BOOL multiStreamEnable; * Track 是否开启大小流 关于大小流功能,可参考[视频大小流使用指南](https://developer.qiniu.com/rtc/development_guidelines/9259/multi- stream-iOS) Core Methods defaultScreenVideoTrackConfig * \+ (instancetype)defaultScreenVideoTrackConfig; * 初始化默认 Track 配置,tag 为"" Returns [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig- iOS/8845/QNScreenVideoTrackConfig-iOS) initWithSourceTag[1/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag; * 初始化指定 tag 参数的 Track 配置 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 Returns [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig- iOS/8845/QNScreenVideoTrackConfig-iOS) initWithSourceTag[2/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config * 初始化指定 tag、config 参数的 Track 配置 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置 Returns [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig- iOS/8845/QNScreenVideoTrackConfig-iOS) initWithSourceTag[3/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config multiStreamEnable:(BOOL)multiStreamEnable; * 初始化指定 tag、config、multiStreamEnable 参数的 Track 配置 Parameters * tag: NSString Track 的 tag * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置 * multiStreamEnable: BOOL 是否允许多路流 Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig- iOS/undefined) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNScreenVideoTrackConfig # QNScreenVideoTrackConfig 最近更新时间: 2022-06-30 16:30:38 屏幕录制 Track 的配置类 Index Core Properties * tag * config * multiStreamEnable Core Methods * defaultScreenVideoTrackConfig * initWithSourceTag[1/3] * initWithSourceTag[2/3] * initWithSourceTag[3/3] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分。 config * @property (nonatomic, strong, readonly) [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *config; * Track 的视频编码配置 multiStreamEnable * @property (nonatomic, assign) BOOL multiStreamEnable; * Track 是否开启大小流 关于大小流功能,可参考[视频大小流使用指南](https://developer.qiniu.com/rtc/development_guidelines/9259/multi- stream-iOS) Core Methods defaultScreenVideoTrackConfig * \+ (instancetype)defaultScreenVideoTrackConfig; * 初始化默认 Track 配置,tag 为"" Returns [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig- iOS/8845/QNScreenVideoTrackConfig-iOS) initWithSourceTag[1/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag; * 初始化指定 tag 参数的 Track 配置 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 Returns [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig- iOS/8845/QNScreenVideoTrackConfig-iOS) initWithSourceTag[2/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config * 初始化指定 tag、config 参数的 Track 配置 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置 Returns [QNScreenVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig- iOS/8845/QNScreenVideoTrackConfig-iOS) initWithSourceTag[3/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config multiStreamEnable:(BOOL)multiStreamEnable; * 初始化指定 tag、config、multiStreamEnable 参数的 Track 配置 Parameters * tag: NSString Track 的 tag * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置 * multiStreamEnable: BOOL 是否允许多路流 Returns [QNCameraVideoTrackConfig](https://developer.qiniu.com/rtc/8845/QNScreenVideoTrackConfig- iOS/undefined) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,139
QNCustomVideoTrackConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomVideoTrackConfig # QNCustomVideoTrackConfig 最近更新时间: 2022-06-30 15:18:17 自定义视频采集 Track 的配置类 Index Core Properties * tag * config * multiStreamEnable Core Methods * defaultCustomVideoTrackConfig * initWithSourceTag[1/3] * initWithSourceTag[2/3] * initWithSourceTag[3/3] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分。 config * @property (nonatomic, strong, readonly) [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *config; * Track 的视频编码配置 multiStreamEnable * @property (nonatomic, assign) BOOL multiStreamEnable; * Track 是否开启大小流 关于大小流功能,可参考[视频大小流使用指南](https://developer.qiniu.com/rtc/development_guidelines/9259/multi- stream-iOS) Core Methods defaultCustomVideoTrackConfig * \+ (instancetype)defaultCustomVideoTrackConfig; * 初始化默认 Track 配置,tag 为""、默认前置、编码尺寸 480x640、24 帧、码率 600kbps、关闭大小流 Returns [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/8846/QNCustomVideoTrackConfig-iOS) initWithSourceTag[1/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag; * 初始化指定 tag 参数的 Track 配置,默认前置、编码尺寸 480x640、24 帧、码率 600kbps、关闭大小流 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 Returns [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/8846/QNCustomVideoTrackConfig-iOS) initWithSourceTag[2/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config * 初始化指定 tag、config 参数的 Track 配置 其中编码尺寸、码率、帧率由 [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/11944/QNVideoEncoderConfig-iOS) 配置决定 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置,包括编码尺寸、码率、帧率 Returns [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/8846/QNCustomVideoTrackConfig-iOS) initWithSourceTag[3/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config multiStreamEnable:(BOOL)multiStreamEnable; * 初始化指定 tag、config、 multiStreamEnable 参数的 Track 配置 其中编码尺寸、码率、帧率由 [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/11944/QNVideoEncoderConfig-iOS) 配置决定 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置,包括编码尺寸、码率、帧率 * multiStreamEnable: BOOL Track 是否开启大小流,关于大小流功能,可参考[视频大小流使用指南](https://developer.qiniu.com/rtc/development_guidelines/9259/multi- stream-iOS) Returns [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/8846/QNCustomVideoTrackConfig-iOS) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomVideoTrackConfig # QNCustomVideoTrackConfig 最近更新时间: 2022-06-30 15:18:17 自定义视频采集 Track 的配置类 Index Core Properties * tag * config * multiStreamEnable Core Methods * defaultCustomVideoTrackConfig * initWithSourceTag[1/3] * initWithSourceTag[2/3] * initWithSourceTag[3/3] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分。 config * @property (nonatomic, strong, readonly) [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *config; * Track 的视频编码配置 multiStreamEnable * @property (nonatomic, assign) BOOL multiStreamEnable; * Track 是否开启大小流 关于大小流功能,可参考[视频大小流使用指南](https://developer.qiniu.com/rtc/development_guidelines/9259/multi- stream-iOS) Core Methods defaultCustomVideoTrackConfig * \+ (instancetype)defaultCustomVideoTrackConfig; * 初始化默认 Track 配置,tag 为""、默认前置、编码尺寸 480x640、24 帧、码率 600kbps、关闭大小流 Returns [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/8846/QNCustomVideoTrackConfig-iOS) initWithSourceTag[1/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag; * 初始化指定 tag 参数的 Track 配置,默认前置、编码尺寸 480x640、24 帧、码率 600kbps、关闭大小流 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 Returns [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/8846/QNCustomVideoTrackConfig-iOS) initWithSourceTag[2/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config * 初始化指定 tag、config 参数的 Track 配置 其中编码尺寸、码率、帧率由 [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/11944/QNVideoEncoderConfig-iOS) 配置决定 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置,包括编码尺寸、码率、帧率 Returns [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/8846/QNCustomVideoTrackConfig-iOS) initWithSourceTag[3/3] * \- (instancetype)initWithSourceTag:(nullable NSString *)tag config:([QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) *)config multiStreamEnable:(BOOL)multiStreamEnable; * 初始化指定 tag、config、 multiStreamEnable 参数的 Track 配置 其中编码尺寸、码率、帧率由 [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/11944/QNVideoEncoderConfig-iOS) 配置决定 Parameters * tag: NSString Track 的标签,可通过它来携带 Track 信息,区分 Track 对象 * config: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig-iOS/11944/QNVideoEncoderConfig-iOS) Track 的视频编码配置,包括编码尺寸、码率、帧率 * multiStreamEnable: BOOL Track 是否开启大小流,关于大小流功能,可参考[视频大小流使用指南](https://developer.qiniu.com/rtc/development_guidelines/9259/multi- stream-iOS) Returns [QNCustomVideoTrackConfig](https://developer.qiniu.com/rtc/8846/QNCustomVideoTrackConfig- iOS/8846/QNCustomVideoTrackConfig-iOS) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,143
QNMicrophoneAudioTrackConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMicrophoneAudioTrackConfig # QNMicrophoneAudioTrackConfig 最近更新时间: 2022-06-30 15:38:21 麦克风音频 Track 配置类 Index Core Properties * tag * audioQuality Core Methods * defaultMicrophoneAudioTrackConfig * initWithTag[1/2] * initWithTag[2/2] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分 audioQuality * @property (nonatomic, strong, readonly) [QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *audioQuality; * Track 的音频编码配置 Core Methods defaultMicrophoneAudioTrackConfig * \+ (instancetype)defaultMicrophoneAudioTrackConfig; * 初始化默认 Track 配置,tag 为 ""、默认码率为 64kbps Returns [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig- iOS/8837/QNMicrophoneAudioTrackConfig-iOS) initWithTag[1/2] * \- (instancetype)initWithTag:(NSString *)tag; * 初始化指定 tag 参数的 Track,默认码率为 64kbps Parameters * tag: NSString Track 的 tag Returns [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig- iOS/8837/QNMicrophoneAudioTrackConfig-iOS) initWithTag[2/2] * \- (instancetype)initWithTag:(NSString *)tag audioQuality:([QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *)audioQuality; * 初始化指定 tag、[QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) 参数的 Track 配置 其中,码率由 [QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig- iOS/11936/QNAudioQuality-iOS) 配置决定 Parameters * tag: NSString Track 的 tag * audioQuality: [QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) Track 的音频编码配置 Returns [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig- iOS/8837/QNMicrophoneAudioTrackConfig-iOS) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMicrophoneAudioTrackConfig # QNMicrophoneAudioTrackConfig 最近更新时间: 2022-06-30 15:38:21 麦克风音频 Track 配置类 Index Core Properties * tag * audioQuality Core Methods * defaultMicrophoneAudioTrackConfig * initWithTag[1/2] * initWithTag[2/2] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分 audioQuality * @property (nonatomic, strong, readonly) [QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *audioQuality; * Track 的音频编码配置 Core Methods defaultMicrophoneAudioTrackConfig * \+ (instancetype)defaultMicrophoneAudioTrackConfig; * 初始化默认 Track 配置,tag 为 ""、默认码率为 64kbps Returns [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig- iOS/8837/QNMicrophoneAudioTrackConfig-iOS) initWithTag[1/2] * \- (instancetype)initWithTag:(NSString *)tag; * 初始化指定 tag 参数的 Track,默认码率为 64kbps Parameters * tag: NSString Track 的 tag Returns [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig- iOS/8837/QNMicrophoneAudioTrackConfig-iOS) initWithTag[2/2] * \- (instancetype)initWithTag:(NSString *)tag audioQuality:([QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *)audioQuality; * 初始化指定 tag、[QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) 参数的 Track 配置 其中,码率由 [QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig- iOS/11936/QNAudioQuality-iOS) 配置决定 Parameters * tag: NSString Track 的 tag * audioQuality: [QNAudioQuality](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) Track 的音频编码配置 Returns [QNMicrophoneAudioTrackConfig](https://developer.qiniu.com/rtc/8837/QNMicrophoneAudioTrackConfig- iOS/8837/QNMicrophoneAudioTrackConfig-iOS) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,148
QNCustomAudioTrackConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomAudioTrackConfig # QNCustomAudioTrackConfig 最近更新时间: 2022-06-30 15:13:11 自定义音频 Track 配置类 Index Core Properties * tag * audioQuality Core Methods * defaultCustomAudioTrackConfig * initWithTag[1/2] * initWithTag[2/2] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分 audioQuality * @property (nonatomic, strong, readonly) [QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *audioQuality; * Track 的音频编码配置 Core Methods defaultCustomAudioTrackConfig * \+ (instancetype)defaultCustomAudioTrackConfig; * 初始化默认 Track 配置,tag 为 ""、默认码率为 64kbps Returns [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig- iOS/8843/QNCustomAudioTrackConfig-iOS) initWithTag[1/2] * \- (instancetype)initWithTag:(NSString *)tag; * 初始化指定 tag 参数的 Track 配置,默认码率为 64kbps Parameters * tag: NSString Track 的 tag Returns [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig- iOS/8843/QNCustomAudioTrackConfig-iOS) initWithTag[2/2] * \- (instancetype)initWithTag:(NSString *)tag audioQuality:([QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *)audioQuality; * 初始化指定 tag、audioQuality 参数的 Track 配置 其中,码率由 [QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig- iOS/11936/QNAudioQuality-iOS) 配置决定 Parameters * tag: NSString Track 的 tag * audioQuality: [QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) Track 的音频编码配置 Returns [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig- iOS/8843/QNCustomAudioTrackConfig-iOS) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomAudioTrackConfig # QNCustomAudioTrackConfig 最近更新时间: 2022-06-30 15:13:11 自定义音频 Track 配置类 Index Core Properties * tag * audioQuality Core Methods * defaultCustomAudioTrackConfig * initWithTag[1/2] * initWithTag[2/2] Core Properties tag * @property (nonatomic, strong) NSString * tag; * Track 的 tag,SDK 会将其透传到远端,当发布多路 Track 时可用 tag 来作区分 audioQuality * @property (nonatomic, strong, readonly) [QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *audioQuality; * Track 的音频编码配置 Core Methods defaultCustomAudioTrackConfig * \+ (instancetype)defaultCustomAudioTrackConfig; * 初始化默认 Track 配置,tag 为 ""、默认码率为 64kbps Returns [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig- iOS/8843/QNCustomAudioTrackConfig-iOS) initWithTag[1/2] * \- (instancetype)initWithTag:(NSString *)tag; * 初始化指定 tag 参数的 Track 配置,默认码率为 64kbps Parameters * tag: NSString Track 的 tag Returns [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig- iOS/8843/QNCustomAudioTrackConfig-iOS) initWithTag[2/2] * \- (instancetype)initWithTag:(NSString *)tag audioQuality:([QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) *)audioQuality; * 初始化指定 tag、audioQuality 参数的 Track 配置 其中,码率由 [QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig- iOS/11936/QNAudioQuality-iOS) 配置决定 Parameters * tag: NSString Track 的 tag * audioQuality: [QNAudioQuality](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig-iOS/11936/QNAudioQuality-iOS) Track 的音频编码配置 Returns [QNCustomAudioTrackConfig](https://developer.qiniu.com/rtc/8843/QNCustomAudioTrackConfig- iOS/8843/QNCustomAudioTrackConfig-iOS) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,151
QNRTCDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCDelegate # QNRTCDelegate 最近更新时间: 2022-06-30 16:17:25 QNRTC 回调代理 Index Core Methods * RTCDidAudioRouteChanged Core Methods RTCDidAudioRouteChanged * \- (void)RTCDidAudioRouteChanged:([QNAudioDeviceType](https://developer.qiniu.com/rtc/9551/QNRTCDelegate/9254))deviceType; * 音频输出设备变更的回调 Parameters * deviceType: [QNAudioDeviceType](https://developer.qiniu.com/rtc/9551/QNRTCDelegate/9254) 音频输出设备 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCDelegate # QNRTCDelegate 最近更新时间: 2022-06-30 16:17:25 QNRTC 回调代理 Index Core Methods * RTCDidAudioRouteChanged Core Methods RTCDidAudioRouteChanged * \- (void)RTCDidAudioRouteChanged:([QNAudioDeviceType](https://developer.qiniu.com/rtc/9551/QNRTCDelegate/9254))deviceType; * 音频输出设备变更的回调 Parameters * deviceType: [QNAudioDeviceType](https://developer.qiniu.com/rtc/9551/QNRTCDelegate/9254) 音频输出设备 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,154
QNRTCClientDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCClientDelegate # QNRTCClientDelegate 最近更新时间: 2023-11-20 11:12:51 QNRTCClient 事件回调接口,用于回调 RTC 房间相关的事件,如房间状态改变等。可以在 QNRTCClient 的初始化后遵守并实现该代理。 Index Core Methods * didConnectionStateChanged * didJoinOfUserID * didLeaveOfUserID * didSubscribedRemoteVideoTracks * didUserPublishTracks * didUserUnpublishTracks * didReconnectingOfUserID * didReconnectedOfUserID * didStartLiveStreaming * didStopLiveStreaming * didTranscodingTracksUpdated * didErrorLiveStreaming * didReceiveMessage * firstVideoDidDecodeOfTrack * didDetachRenderTrack * didMediaRelayStateChanged * remoteTrackMixedDidGetAudioBuffer * didNetworkQualityNotified * didUserVolumeIndication Core Methods didConnectionStateChanged * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didConnectionStateChanged:([QNConnectionState](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254))state disconnectedInfo:([QNConnectionDisconnectedInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8866/QNConnectionDisconnectedInfo-iOS) *)info; * 房间状态变更会触发此回调 > 当状态变为 QNConnectionStateReconnecting 时,SDK 会为您自动重连,重连过程中,如果希望退出,直接调用 leave > 即可。重连成功后的状态将变为 QNConnectionStateReconnected。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * state: [QNConnectionState](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254) 房间状态 * info: [QNConnectionDisconnectedInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8866/QNConnectionDisconnectedInfo-iOS) 房间失去连接的具体信息 didJoinOfUserID * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didJoinOfUserID:(NSString *)userID userData:(NSString *)userData; * 远端用户加入房间会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userID: NSString 用户 ID * userData: NSString 用户信息 didLeaveOfUserID * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didLeaveOfUserID:(NSString *)userID; * 远端用户离开房会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userID: NSString 用户 ID didSubscribedRemoteVideoTracks * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didSubscribedRemoteVideoTracks:(NSArray<[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) *> *)videoTracks audioTracks:(NSArray<[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8859/QNRemoteAudioTrack-iOS) *> *)audioTracks ofUserID:(NSString *)userID; * 订阅远端用户成功会触发此回调 > 无论手动订阅还是自动订阅都会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * videoTracks: NSArray<[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS)> 远端视频 Tracks * audioTracks: NSArray<[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8859/QNRemoteAudioTrack-iOS)> 远端音频 Tracks * userID: NSString 用户 ID didUserPublishTracks * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didUserPublishTracks:(NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8857/QNRemoteTrack-iOS) *> *)tracks ofUserID:(NSString *)userID; * 远端用户发布音/视频会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * tracks: NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8857/QNRemoteTrack-iOS)> 远端 Tracks * userID: NSString 用户 ID didUserUnpublishTracks * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didUserUnpublishTracks:(NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8857/QNRemoteTrack-iOS) *> *)tracks ofUserID:(NSString *)userID; * 远端用户取消发布音/视频会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * tracks: NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8857/QNRemoteTrack-iOS)> 远端 Tracks * userID: NSString 用户 ID didReconnectingOfUserID * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didReconnectingOfUserID:(NSString *)userID; * 远端用户发生重连会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userID: NSString 用户 ID didReconnectedOfUserID * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didReconnectedOfUserID:(NSString *)userID; * 远端用户重连成功会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userID: NSString 用户 ID didStartLiveStreaming * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didStartLiveStreaming:(NSString *)streamID; * 成功创建转推/合流转推任务会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * streamID: NSString 流 ID didStopLiveStreaming * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didStopLiveStreaming:(NSString *)streamID; * 停止转推/合流转推任务会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * streamID: NSString 流 ID didTranscodingTracksUpdated * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didTranscodingTracksUpdated:(BOOL)success withStreamID:(NSString *)streamID; * 更新合流布局会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * success: BOOL 是否成功 * streamID: NSString 流 ID didErrorLiveStreaming * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didErrorLiveStreaming:(NSString *)streamID errorInfo:([QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8864/QNLiveStreamingErrorInfo-iOS) *)errorInfo; * 单路转推或合流转推出错会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * streamID: NSString 流 ID * errorInfo: [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8864/QNLiveStreamingErrorInfo-iOS) 错误信息 didReceiveMessage * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didReceiveMessage:([QNMessageInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9264/QNMessageInfo) *)message; * 收到远端用户发送给自己的消息时会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * message: [QNMessageInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9264/QNMessageInfo) 消息信息对象 firstVideoDidDecodeOfTrack * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client firstVideoDidDecodeOfTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) *)videoTrack remoteUserID:(NSString *)userID; * 远端用户视频数据首帧渲染会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * videoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) 远端视频 Track * userID: NSString 用户 ID didDetachRenderTrack * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didDetachRenderTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) *)videoTrack remoteUserID:(NSString *)userID; * 取消渲染远端用户视频数据会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * videoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) 远端视频 Track * userID: NSString 用户 ID didMediaRelayStateChanged * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didMediaRelayStateChanged:(NSString *)relayRoom state:([QNMediaRelayState](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254))state; * 跨房媒体转发状态变更的回调 > 非主动调用触发,由目标房间状态变化引起此通知。目前仅当目标房间关闭 > [QNMediaRelayStateRoomClosed](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254) > 时,会触发此通知。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * relayRoom: NSString 目标房间名称 * state: [QNMediaRelayState](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254) 目标房间媒体转发状态 remoteTrackMixedDidGetAudioBuffer * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client remoteTrackMixedDidGetAudioBuffer:(AudioBuffer *)audioBuffer; * 远端音频 track mix 数据的回调。 > 该回调在 AU Remote IO 线程,请不要做过于耗时的操作,否则可能阻塞该线程影响音频输出或其他未知问题。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * audioBuffer: AudioBuffer 音频数据 buffer didNetworkQualityNotified * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didNetworkQualityNotified:([QNNetworkQuality](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8869/QNNetworkQuality-iOS) *)quality; * 本地网络质量信息的回调。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * quality: [QNNetworkQuality](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8869/QNNetworkQuality-iOS) 上下行的网络质量 didUserVolumeIndication * \- (void)RTCClient:(QNRTCClient *)client didUserVolumeIndication:(NSArray<[QNAudioVolumeInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/12589/qnaudiovolumeinfo) *>*)userVolumeList; * 用户音量提示回调,本地远端一起回调,本地 user id 为空。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userVolumeList: NSArray<[QNAudioVolumeInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/12589/qnaudiovolumeinfo) *>* 用户音量信息,按音量由高到低排序 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRTCClientDelegate # QNRTCClientDelegate 最近更新时间: 2023-11-20 11:12:51 QNRTCClient 事件回调接口,用于回调 RTC 房间相关的事件,如房间状态改变等。可以在 QNRTCClient 的初始化后遵守并实现该代理。 Index Core Methods * didConnectionStateChanged * didJoinOfUserID * didLeaveOfUserID * didSubscribedRemoteVideoTracks * didUserPublishTracks * didUserUnpublishTracks * didReconnectingOfUserID * didReconnectedOfUserID * didStartLiveStreaming * didStopLiveStreaming * didTranscodingTracksUpdated * didErrorLiveStreaming * didReceiveMessage * firstVideoDidDecodeOfTrack * didDetachRenderTrack * didMediaRelayStateChanged * remoteTrackMixedDidGetAudioBuffer * didNetworkQualityNotified * didUserVolumeIndication Core Methods didConnectionStateChanged * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didConnectionStateChanged:([QNConnectionState](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254))state disconnectedInfo:([QNConnectionDisconnectedInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8866/QNConnectionDisconnectedInfo-iOS) *)info; * 房间状态变更会触发此回调 > 当状态变为 QNConnectionStateReconnecting 时,SDK 会为您自动重连,重连过程中,如果希望退出,直接调用 leave > 即可。重连成功后的状态将变为 QNConnectionStateReconnected。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * state: [QNConnectionState](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254) 房间状态 * info: [QNConnectionDisconnectedInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8866/QNConnectionDisconnectedInfo-iOS) 房间失去连接的具体信息 didJoinOfUserID * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didJoinOfUserID:(NSString *)userID userData:(NSString *)userData; * 远端用户加入房间会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userID: NSString 用户 ID * userData: NSString 用户信息 didLeaveOfUserID * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didLeaveOfUserID:(NSString *)userID; * 远端用户离开房会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userID: NSString 用户 ID didSubscribedRemoteVideoTracks * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didSubscribedRemoteVideoTracks:(NSArray<[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) *> *)videoTracks audioTracks:(NSArray<[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8859/QNRemoteAudioTrack-iOS) *> *)audioTracks ofUserID:(NSString *)userID; * 订阅远端用户成功会触发此回调 > 无论手动订阅还是自动订阅都会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * videoTracks: NSArray<[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS)> 远端视频 Tracks * audioTracks: NSArray<[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8859/QNRemoteAudioTrack-iOS)> 远端音频 Tracks * userID: NSString 用户 ID didUserPublishTracks * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didUserPublishTracks:(NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8857/QNRemoteTrack-iOS) *> *)tracks ofUserID:(NSString *)userID; * 远端用户发布音/视频会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * tracks: NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8857/QNRemoteTrack-iOS)> 远端 Tracks * userID: NSString 用户 ID didUserUnpublishTracks * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didUserUnpublishTracks:(NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8857/QNRemoteTrack-iOS) *> *)tracks ofUserID:(NSString *)userID; * 远端用户取消发布音/视频会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * tracks: NSArray<[QNRemoteTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8857/QNRemoteTrack-iOS)> 远端 Tracks * userID: NSString 用户 ID didReconnectingOfUserID * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didReconnectingOfUserID:(NSString *)userID; * 远端用户发生重连会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userID: NSString 用户 ID didReconnectedOfUserID * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didReconnectedOfUserID:(NSString *)userID; * 远端用户重连成功会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userID: NSString 用户 ID didStartLiveStreaming * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didStartLiveStreaming:(NSString *)streamID; * 成功创建转推/合流转推任务会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * streamID: NSString 流 ID didStopLiveStreaming * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didStopLiveStreaming:(NSString *)streamID; * 停止转推/合流转推任务会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * streamID: NSString 流 ID didTranscodingTracksUpdated * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didTranscodingTracksUpdated:(BOOL)success withStreamID:(NSString *)streamID; * 更新合流布局会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * success: BOOL 是否成功 * streamID: NSString 流 ID didErrorLiveStreaming * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didErrorLiveStreaming:(NSString *)streamID errorInfo:([QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8864/QNLiveStreamingErrorInfo-iOS) *)errorInfo; * 单路转推或合流转推出错会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * streamID: NSString 流 ID * errorInfo: [QNLiveStreamingErrorInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8864/QNLiveStreamingErrorInfo-iOS) 错误信息 didReceiveMessage * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didReceiveMessage:([QNMessageInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9264/QNMessageInfo) *)message; * 收到远端用户发送给自己的消息时会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * message: [QNMessageInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9264/QNMessageInfo) 消息信息对象 firstVideoDidDecodeOfTrack * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client firstVideoDidDecodeOfTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) *)videoTrack remoteUserID:(NSString *)userID; * 远端用户视频数据首帧渲染会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * videoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) 远端视频 Track * userID: NSString 用户 ID didDetachRenderTrack * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didDetachRenderTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) *)videoTrack remoteUserID:(NSString *)userID; * 取消渲染远端用户视频数据会触发此回调 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * videoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8858/QNRemoteVideoTrack-iOS) 远端视频 Track * userID: NSString 用户 ID didMediaRelayStateChanged * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didMediaRelayStateChanged:(NSString *)relayRoom state:([QNMediaRelayState](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254))state; * 跨房媒体转发状态变更的回调 > 非主动调用触发,由目标房间状态变化引起此通知。目前仅当目标房间关闭 > [QNMediaRelayStateRoomClosed](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254) > 时,会触发此通知。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * relayRoom: NSString 目标房间名称 * state: [QNMediaRelayState](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/9254) 目标房间媒体转发状态 remoteTrackMixedDidGetAudioBuffer * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client remoteTrackMixedDidGetAudioBuffer:(AudioBuffer *)audioBuffer; * 远端音频 track mix 数据的回调。 > 该回调在 AU Remote IO 线程,请不要做过于耗时的操作,否则可能阻塞该线程影响音频输出或其他未知问题。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * audioBuffer: AudioBuffer 音频数据 buffer didNetworkQualityNotified * \- (void)RTCClient:([QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) *)client didNetworkQualityNotified:([QNNetworkQuality](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8869/QNNetworkQuality-iOS) *)quality; * 本地网络质量信息的回调。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * quality: [QNNetworkQuality](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8869/QNNetworkQuality-iOS) 上下行的网络质量 didUserVolumeIndication * \- (void)RTCClient:(QNRTCClient *)client didUserVolumeIndication:(NSArray<[QNAudioVolumeInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/12589/qnaudiovolumeinfo) *>*)userVolumeList; * 用户音量提示回调,本地远端一起回调,本地 user id 为空。 Parameters * client: [QNRTCClient](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/8836/QNRTCClient-iOS) QNRTCClient 实例 * userVolumeList: NSArray<[QNAudioVolumeInfo](https://developer.qiniu.com/rtc/9248/QNRTCClientDelegate/12589/qnaudiovolumeinfo) *>* 用户音量信息,按音量由高到低排序 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,155
QNCDNStreamingDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCDNStreamingDelegate # QNCDNStreamingDelegate 最近更新时间: 2024-01-12 15:33:46 推流状态和统计信息回调,可通过 [QNCDNStreamingClient.delegate](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/undefined) 设置。 Index Core Methods * didCDNStreamingConnectionStateChanged * didCDNStreamingStats Core Methods didCDNStreamingConnectionStateChanged * \- (void)cdnStreamingClient:([QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) *)client didCDNStreamingConnectionStateChanged:([QNConnectionState](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/9254))state errorCode:(int)code message:(NSString *)message; * 推流状态的回调 Parameters * client: [QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) 推流实例对象 * state: [QNConnectionState](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/9254) 连接状态 * code: int 错误码 * message: NSString 错误信息 didCDNStreamingStats * \- (void)cdnStreamingClient:([QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) *)client didCDNStreamingStats:([QNCDNStreamingStats](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12637/QNCDNStreamingStats-iOS) *)stats; * 推流统计信息回调 Parameters * client: [QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) 推流实例对象 * stats: [QNCDNStreamingStats](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12637/QNCDNStreamingStats-iOS) 统计信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCDNStreamingDelegate # QNCDNStreamingDelegate 最近更新时间: 2024-01-12 15:33:46 推流状态和统计信息回调,可通过 [QNCDNStreamingClient.delegate](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/undefined) 设置。 Index Core Methods * didCDNStreamingConnectionStateChanged * didCDNStreamingStats Core Methods didCDNStreamingConnectionStateChanged * \- (void)cdnStreamingClient:([QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) *)client didCDNStreamingConnectionStateChanged:([QNConnectionState](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/9254))state errorCode:(int)code message:(NSString *)message; * 推流状态的回调 Parameters * client: [QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) 推流实例对象 * state: [QNConnectionState](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/9254) 连接状态 * code: int 错误码 * message: NSString 错误信息 didCDNStreamingStats * \- (void)cdnStreamingClient:([QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) *)client didCDNStreamingStats:([QNCDNStreamingStats](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12637/QNCDNStreamingStats-iOS) *)stats; * 推流统计信息回调 Parameters * client: [QNCDNStreamingClient](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12634/QNCDNStreamingClient-iOS) 推流实例对象 * stats: [QNCDNStreamingStats](https://developer.qiniu.com/rtc/12635/QNCDNStreamingDelegate/12637/QNCDNStreamingStats-iOS) 统计信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,166
QNMediaRecorderDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaRecorderDelegate # QNMediaRecorderDelegate 最近更新时间: 2024-06-28 16:41:15 QNRTC 回调代理 Index Core Methods * infoDidUpdated * stateDidChanged Core Methods infoDidUpdated * \- (void)mediaRecorder:([QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS)* _Nonnull)recorder infoDidUpdated:([QNMediaRecordInfo](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12686/QNMediaRecordInfo-iOS)* _Nonnull)info; * 录制信息更新回调 Parameters * recorder: [QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS) 媒体录制实例 * info: [QNMediaRecordInfo](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12686/QNMediaRecordInfo-iOS) 媒体录制完成的信息 stateDidChanged * \- (void)mediaRecorder:([QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS)* _Nonnull)recorder stateDidChanged:([QNMediaRecorderState](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254))state reason:([QNMediaRecorderReasonCode](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254))reason; * 录制状态发生变化回调 Parameters * recorder: [QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS) 媒体录制实例 * state: [QNMediaRecorderState](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254) 录制状态 * reason: [QNMediaRecorderReasonCode](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254) 录制错误信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaRecorderDelegate # QNMediaRecorderDelegate 最近更新时间: 2024-06-28 16:41:15 QNRTC 回调代理 Index Core Methods * infoDidUpdated * stateDidChanged Core Methods infoDidUpdated * \- (void)mediaRecorder:([QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS)* _Nonnull)recorder infoDidUpdated:([QNMediaRecordInfo](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12686/QNMediaRecordInfo-iOS)* _Nonnull)info; * 录制信息更新回调 Parameters * recorder: [QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS) 媒体录制实例 * info: [QNMediaRecordInfo](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12686/QNMediaRecordInfo-iOS) 媒体录制完成的信息 stateDidChanged * \- (void)mediaRecorder:([QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS)* _Nonnull)recorder stateDidChanged:([QNMediaRecorderState](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254))state reason:([QNMediaRecorderReasonCode](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254))reason; * 录制状态发生变化回调 Parameters * recorder: [QNMediaRecorder](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/12685/QNMediaRecorder-iOS) 媒体录制实例 * state: [QNMediaRecorderState](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254) 录制状态 * reason: [QNMediaRecorderReasonCode](https://developer.qiniu.com/rtc/12688/QNMediaRecorderDelegate-iOS/9254) 录制错误信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,168
QNAudioDecryptDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioDecryptDelegate # QNAudioDecryptDelegate 最近更新时间: 2024-01-18 16:09:33 远端音频 Track 解密回调代理,可通过 [QNRemoteAudioTrack.decryptDelegate](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859) 进行设置,用来实现远端音频 Track 数据解密的回调。 Index Core Methods * onGetExtraData * onSetMaxDecryptSize * onDecrypt Core Methods onGetExtraData * \- (void)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack onGetExtraData:(uint8_t *)extraData dataSize:(int)dataSize; * 远端音频 Track 扩展数据回调 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * extraData: uint8_t 音频扩展数据 * dataSize: int 扩展数据大小 onSetMaxDecryptSize * \- (int)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack onSetMaxDecryptSize:(int)frameSize; * 设置解密后的最大字节数 > 注意配合 onDecrypt 使用 > > 注意返回 frameSize,没有任何处理则返回 0 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * frameSize: int 数据大小 Returns 最大字节数 onDecrypt * \- (int)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack onDecrypt:(uint8_t *)frame frameSize:(int)frameSize decryptedFrame:(uint8_t *)decryptedFrame; * 解密回调接口 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * frame: uint8_t * 解密前的数据 * frameSize: int 解密前的数据大小 * decryptedFrame: uint8_t * 解密后的数据 Returns 解密后的数据大小 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioDecryptDelegate # QNAudioDecryptDelegate 最近更新时间: 2024-01-18 16:09:33 远端音频 Track 解密回调代理,可通过 [QNRemoteAudioTrack.decryptDelegate](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859) 进行设置,用来实现远端音频 Track 数据解密的回调。 Index Core Methods * onGetExtraData * onSetMaxDecryptSize * onDecrypt Core Methods onGetExtraData * \- (void)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack onGetExtraData:(uint8_t *)extraData dataSize:(int)dataSize; * 远端音频 Track 扩展数据回调 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * extraData: uint8_t 音频扩展数据 * dataSize: int 扩展数据大小 onSetMaxDecryptSize * \- (int)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack onSetMaxDecryptSize:(int)frameSize; * 设置解密后的最大字节数 > 注意配合 onDecrypt 使用 > > 注意返回 frameSize,没有任何处理则返回 0 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * frameSize: int 数据大小 Returns 最大字节数 onDecrypt * \- (int)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack onDecrypt:(uint8_t *)frame frameSize:(int)frameSize decryptedFrame:(uint8_t *)decryptedFrame; * 解密回调接口 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/12617/qnaudiodecryptdelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * frame: uint8_t * 解密前的数据 * frameSize: int 解密前的数据大小 * decryptedFrame: uint8_t * 解密后的数据 Returns 解密后的数据大小 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,170
QNAudioEncryptDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioEncryptDelegate # QNAudioEncryptDelegate 最近更新时间: 2024-01-18 16:10:15 本地音频 Track 加密回调代理,可通过 [QNLocalAudioTrack.encryptDelegate](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854) 进行设置,本地音频 Track 加密的回调。 Index Core Methods * onGetExtraData * onSetMaxEncryptSize * onEncrypt Core Methods onGetExtraData * \- (int)localAudioTrack:([QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS) *)localAudioTrack onPutExtraData:(uint8_t *)extraData maxSize:(int)maxSize; * 远端音频 Track 扩展数据回调 Parameters * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS) 远端音频 Track * extraData: uint8_t 音频扩展数据 * maxSize: int 扩展数据大小 onSetMaxEncryptSize * \- (int)localAudioTrack:(QNLocalAudioTrack *)localAudioTrack onSetMaxEncryptSize:(int)frameSize; * 设置加密后的最大字节数 > 注意配合 onEncrypt 使用 > > 注意不超过 1000 字节,若存在 extra data 则除了加上 extra data 大小外,还需额外添加 6 个字节的 SDK > 内置标识分割符大小,没有任何处理则返回 0 Parameters * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS) 远端音频 Track * frameSize: int 数据大小 Returns 返回音频处理后的总字节数,包括加密的数据以及自定义数据;若添加自定义数据,则需额外增加 6 个字节的内置标识分隔符大小 onEncrypt * \- (int)localAudioTrack:(QNLocalAudioTrack *)localAudioTrack onEncrypt:(uint8_t *)frame frameSize:(int)frameSize encryptedFrame:(uint8_t *)encryptedFrame; * 加密回调接口 Parameters * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS) 远端音频 Track * frame: uint8_t * 加密前的数据 * frameSize: int 加密前的数据大小 * encryptedFrame: uint8_t * 加密后的数据 Returns 加密后的数据大小 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioEncryptDelegate # QNAudioEncryptDelegate 最近更新时间: 2024-01-18 16:10:15 本地音频 Track 加密回调代理,可通过 [QNLocalAudioTrack.encryptDelegate](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854) 进行设置,本地音频 Track 加密的回调。 Index Core Methods * onGetExtraData * onSetMaxEncryptSize * onEncrypt Core Methods onGetExtraData * \- (int)localAudioTrack:([QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS) *)localAudioTrack onPutExtraData:(uint8_t *)extraData maxSize:(int)maxSize; * 远端音频 Track 扩展数据回调 Parameters * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS) 远端音频 Track * extraData: uint8_t 音频扩展数据 * maxSize: int 扩展数据大小 onSetMaxEncryptSize * \- (int)localAudioTrack:(QNLocalAudioTrack *)localAudioTrack onSetMaxEncryptSize:(int)frameSize; * 设置加密后的最大字节数 > 注意配合 onEncrypt 使用 > > 注意不超过 1000 字节,若存在 extra data 则除了加上 extra data 大小外,还需额外添加 6 个字节的 SDK > 内置标识分割符大小,没有任何处理则返回 0 Parameters * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS) 远端音频 Track * frameSize: int 数据大小 Returns 返回音频处理后的总字节数,包括加密的数据以及自定义数据;若添加自定义数据,则需额外增加 6 个字节的内置标识分隔符大小 onEncrypt * \- (int)localAudioTrack:(QNLocalAudioTrack *)localAudioTrack onEncrypt:(uint8_t *)frame frameSize:(int)frameSize encryptedFrame:(uint8_t *)encryptedFrame; * 加密回调接口 Parameters * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/12618/qnaudioencryptdelegate/8854/QNLocalAudioTrack-iOS) 远端音频 Track * frame: uint8_t * 加密前的数据 * frameSize: int 加密前的数据大小 * encryptedFrame: uint8_t * 加密后的数据 Returns 加密后的数据大小 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,172
QNMicrophoneAudioTrackDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMicrophoneAudioTrackDelegate # QNMicrophoneAudioTrackDelegate 最近更新时间: 2023-11-20 10:26:35 麦克风 Track 回调代理,可通过 [QNMicrophoneAudioTrack.microphoneDelegate](https://developer.qiniu.com/rtc/12582/QNMicrophoneAudioTrackDelegate/8855) 进行设置。 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)microphoneAudioTrack:([QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/12582/QNMicrophoneAudioTrackDelegate/8855/QNMicrophoneAudioTrack-iOS) *)microphoneAudioTrack didFailWithError:(NSError *)error; * 远端音频 Track 的数据回调 Parameters * microphoneAudioTrack: [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/12582/QNMicrophoneAudioTrackDelegate/8855/QNMicrophoneAudioTrack-iOS) 远端音频 Track * error: NSError 错误信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMicrophoneAudioTrackDelegate # QNMicrophoneAudioTrackDelegate 最近更新时间: 2023-11-20 10:26:35 麦克风 Track 回调代理,可通过 [QNMicrophoneAudioTrack.microphoneDelegate](https://developer.qiniu.com/rtc/12582/QNMicrophoneAudioTrackDelegate/8855) 进行设置。 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)microphoneAudioTrack:([QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/12582/QNMicrophoneAudioTrackDelegate/8855/QNMicrophoneAudioTrack-iOS) *)microphoneAudioTrack didFailWithError:(NSError *)error; * 远端音频 Track 的数据回调 Parameters * microphoneAudioTrack: [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/12582/QNMicrophoneAudioTrackDelegate/8855/QNMicrophoneAudioTrack-iOS) 远端音频 Track * error: NSError 错误信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,175
QNLocalAudioTrackDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalAudioTrackDelegate # QNLocalAudioTrackDelegate 最近更新时间: 2022-06-30 15:24:30 本地音频 Track 回调代理,可通过 [QNLocalAudioTrack.delegate](https://developer.qiniu.com/rtc/11969/QNLocalAudioTrackDelegate/8854) 进行设置,本地音频 Track 视频数据的回调。 Index Core Methods * didGetAudioBuffer Core Methods didGetAudioBuffer * \- (void)localAudioTrack:([QNLocalAudioTrack](https://developer.qiniu.com/rtc/11969/QNLocalAudioTrackDelegate/8854/QNLocalAudioTrack-iOS) *)localAudioTrack didGetAudioBuffer:(AudioBuffer *)audioBuffer bitsPerSample:(NSUInteger)bitsPerSample sampleRate:(NSUInteger)sampleRate; * 本地音频 Track 的数据回调 > 该回调在 AU Remote IO 线程,请不要做过于耗时的操作,否则可能阻塞该线程影响音频输出或其他未知问题。 Parameters * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11969/QNLocalAudioTrackDelegate/8854/QNLocalAudioTrack-iOS) 本地音频 Track * audioBuffer: AudioBuffer 音频数据 * bitsPerSample: NSUInteger 音频数据位宽 * sampleRate: NSUInteger 音频数据采样率 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalAudioTrackDelegate # QNLocalAudioTrackDelegate 最近更新时间: 2022-06-30 15:24:30 本地音频 Track 回调代理,可通过 [QNLocalAudioTrack.delegate](https://developer.qiniu.com/rtc/11969/QNLocalAudioTrackDelegate/8854) 进行设置,本地音频 Track 视频数据的回调。 Index Core Methods * didGetAudioBuffer Core Methods didGetAudioBuffer * \- (void)localAudioTrack:([QNLocalAudioTrack](https://developer.qiniu.com/rtc/11969/QNLocalAudioTrackDelegate/8854/QNLocalAudioTrack-iOS) *)localAudioTrack didGetAudioBuffer:(AudioBuffer *)audioBuffer bitsPerSample:(NSUInteger)bitsPerSample sampleRate:(NSUInteger)sampleRate; * 本地音频 Track 的数据回调 > 该回调在 AU Remote IO 线程,请不要做过于耗时的操作,否则可能阻塞该线程影响音频输出或其他未知问题。 Parameters * localAudioTrack: [QNLocalAudioTrack](https://developer.qiniu.com/rtc/11969/QNLocalAudioTrackDelegate/8854/QNLocalAudioTrack-iOS) 本地音频 Track * audioBuffer: AudioBuffer 音频数据 * bitsPerSample: NSUInteger 音频数据位宽 * sampleRate: NSUInteger 音频数据采样率 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,176
QNLocalVideoTrackDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalVideoTrackDelegate # QNLocalVideoTrackDelegate 最近更新时间: 2022-06-30 15:28:49 本地视频 Track 回调代理,可通过 [QNLocalVideoTrack.delegate](https://developer.qiniu.com/rtc/11970/QNLocalVideoTrackDelegate/8849) 进行设置,本地视频 Track 视频数据的回调。 Index Core Methods * didGetPixelBuffer Core Methods didGetPixelBuffer * \- (void)localVideoTrack:([QNLocalVideoTrack](https://developer.qiniu.com/rtc/11970/QNLocalVideoTrackDelegate/8849/QNLocalVideoTrack-iOS) *)localVideoTrack didGetPixelBuffer:(CVPixelBufferRef)pixelBuffer; * 本地视频 Track 的数据回调 > 该回调在视频数据的输出线程,请不要做过于耗时的操作,否则可能会导致编码帧率下降。 Parameters * localVideoTrack: [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11970/QNLocalVideoTrackDelegate/8849/QNLocalVideoTrack-iOS) 本地视频 Track * pixelBuffer: CVPixelBufferRef 具体的视频数据格式,可通过 CVPixelBufferGetPixelFormatType 获取 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalVideoTrackDelegate # QNLocalVideoTrackDelegate 最近更新时间: 2022-06-30 15:28:49 本地视频 Track 回调代理,可通过 [QNLocalVideoTrack.delegate](https://developer.qiniu.com/rtc/11970/QNLocalVideoTrackDelegate/8849) 进行设置,本地视频 Track 视频数据的回调。 Index Core Methods * didGetPixelBuffer Core Methods didGetPixelBuffer * \- (void)localVideoTrack:([QNLocalVideoTrack](https://developer.qiniu.com/rtc/11970/QNLocalVideoTrackDelegate/8849/QNLocalVideoTrack-iOS) *)localVideoTrack didGetPixelBuffer:(CVPixelBufferRef)pixelBuffer; * 本地视频 Track 的数据回调 > 该回调在视频数据的输出线程,请不要做过于耗时的操作,否则可能会导致编码帧率下降。 Parameters * localVideoTrack: [QNLocalVideoTrack](https://developer.qiniu.com/rtc/11970/QNLocalVideoTrackDelegate/8849/QNLocalVideoTrack-iOS) 本地视频 Track * pixelBuffer: CVPixelBufferRef 具体的视频数据格式,可通过 CVPixelBufferGetPixelFormatType 获取 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,178
QNCameraVideoTrackDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCameraVideoTrackDelegate # QNCameraVideoTrackDelegate 最近更新时间: 2023-07-07 21:16:16 摄像头采集 Track 回调代理,可通过 [QNCameraVideoTrack.cameraDelegate](https://developer.qiniu.com/rtc/12438/QNCameraVideoTrackDelegate/8852) 进行设置,摄像头采集 Track 内部处理发生错误时的回调。 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)cameraVideoTrack:(QNCameraVideoTrack *)cameraVideoTrack didFailWithError:(NSError *)error; * 摄像头采集 Track 运行过程中发生错误的回调 Parameters * cameraVideoTrack: [QNCameraVideoTrack](https://developer.qiniu.com/rtc/12438/QNCameraVideoTrackDelegate/8852/QNCameraVideoTrack-iOS) 摄像头采集 Track * error: NSError 错误信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCameraVideoTrackDelegate # QNCameraVideoTrackDelegate 最近更新时间: 2023-07-07 21:16:16 摄像头采集 Track 回调代理,可通过 [QNCameraVideoTrack.cameraDelegate](https://developer.qiniu.com/rtc/12438/QNCameraVideoTrackDelegate/8852) 进行设置,摄像头采集 Track 内部处理发生错误时的回调。 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)cameraVideoTrack:(QNCameraVideoTrack *)cameraVideoTrack didFailWithError:(NSError *)error; * 摄像头采集 Track 运行过程中发生错误的回调 Parameters * cameraVideoTrack: [QNCameraVideoTrack](https://developer.qiniu.com/rtc/12438/QNCameraVideoTrackDelegate/8852/QNCameraVideoTrack-iOS) 摄像头采集 Track * error: NSError 错误信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,180
QNCustomAudioTrackDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomAudioTrackDelegate # QNCustomAudioTrackDelegate 最近更新时间: 2022-06-30 15:14:13 自定义音频 Track 回调代理,可通过 [QNCustomAudioTrack.customAudioDelegate](https://developer.qiniu.com/rtc/11946/QNCustomAudioTrackDelegate/8856) 进行设置,自定义音频 Track 内部处理发生错误时的回调。 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)customAudioTrack:([QNCustomAudioTrack](https://developer.qiniu.com/rtc/11946/QNCustomAudioTrackDelegate/8856/QNCustomAudioTrack-iOS) *)customAudioTrack didFailWithError:(NSError *)error; * 本地音频 Track 的数据回调 Parameters * customAudioTrack: [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11946/QNCustomAudioTrackDelegate/8856/QNCustomAudioTrack-iOS) 自定义音频 Track * error: NSError 错误信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNCustomAudioTrackDelegate # QNCustomAudioTrackDelegate 最近更新时间: 2022-06-30 15:14:13 自定义音频 Track 回调代理,可通过 [QNCustomAudioTrack.customAudioDelegate](https://developer.qiniu.com/rtc/11946/QNCustomAudioTrackDelegate/8856) 进行设置,自定义音频 Track 内部处理发生错误时的回调。 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)customAudioTrack:([QNCustomAudioTrack](https://developer.qiniu.com/rtc/11946/QNCustomAudioTrackDelegate/8856/QNCustomAudioTrack-iOS) *)customAudioTrack didFailWithError:(NSError *)error; * 本地音频 Track 的数据回调 Parameters * customAudioTrack: [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11946/QNCustomAudioTrackDelegate/8856/QNCustomAudioTrack-iOS) 自定义音频 Track * error: NSError 错误信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,182
QNRemoteAudioTrackDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteAudioTrackDelegate # QNRemoteAudioTrackDelegate 最近更新时间: 2022-06-30 15:41:07 远端音频 Track 回调代理,可通过 [QNRemoteAudioTrack.delegate](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859) 进行设置,用来实现远端音频 Track 数据及开关静默的回调。 Index Core Methods * didGetAudioBuffer * didMuteStateChanged Core Methods didGetAudioBuffer * \- (void)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack didGetAudioBuffer:(AudioBuffer *)audioBuffer bitsPerSample:(NSUInteger)bitsPerSample sampleRate:(NSUInteger)sampleRate; * 远端音频 Track 的数据回调 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * audioBuffer: AudioBuffer 音频数据 * bitsPerSample: NSUInteger 音频数据位数 * sampleRate: NSUInteger 音频采样率 didMuteStateChanged * \- (void)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack didMuteStateChanged:(BOOL)isMuted; * 远端音频 Track 静默的回调 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * isMuted: BOOL 是否静默 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteAudioTrackDelegate # QNRemoteAudioTrackDelegate 最近更新时间: 2022-06-30 15:41:07 远端音频 Track 回调代理,可通过 [QNRemoteAudioTrack.delegate](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859) 进行设置,用来实现远端音频 Track 数据及开关静默的回调。 Index Core Methods * didGetAudioBuffer * didMuteStateChanged Core Methods didGetAudioBuffer * \- (void)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack didGetAudioBuffer:(AudioBuffer *)audioBuffer bitsPerSample:(NSUInteger)bitsPerSample sampleRate:(NSUInteger)sampleRate; * 远端音频 Track 的数据回调 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * audioBuffer: AudioBuffer 音频数据 * bitsPerSample: NSUInteger 音频数据位数 * sampleRate: NSUInteger 音频采样率 didMuteStateChanged * \- (void)remoteAudioTrack:([QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) *)remoteAudioTrack didMuteStateChanged:(BOOL)isMuted; * 远端音频 Track 静默的回调 Parameters * remoteAudioTrack: [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/11948/QNRemoteAudioTrackDelegate/8859/QNRemoteAudioTrack-iOS) 远端音频 Track * isMuted: BOOL 是否静默 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,184
QNRemoteVideoTrackDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteVideoTrackDelegate # QNRemoteVideoTrackDelegate 最近更新时间: 2022-06-30 15:50:27 远端视频 Track 回调代理,可通过 [QNRemoteVideoTrack.delegate](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858) 进行设置,用来实现远端视频 Track 数据以及发生变化的回调。 Index Core Methods * didGetPixelBuffer * didMuteStateChanged * didVideoProfileChanged Core Methods didGetPixelBuffer * \- (void)remoteVideoTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) *)remoteVideoTrack didGetPixelBuffer:(CVPixelBufferRef)pixelBuffer * 远端视频 Track 的视频数据回调 Parameters * remoteVideoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) 远端视频 Track * pixelBuffer: CVPixelBufferRef 具体的视频数据格式,可通过 CVPixelBufferGetPixelFormatType 获取 didMuteStateChanged * \- (void)remoteVideoTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) *)remoteVideoTrack didMuteStateChanged:(BOOL)isMuted; * 远端视频 Track 静默的回调 Parameters * remoteVideoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) 远端音频 Track * isMuted: BOOL 是否静默 didVideoProfileChanged * \- (void)remoteVideoTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) *)remoteVideoTrack didVideoProfileChanged:([QNTrackProfile](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/9254))profile; * 远端视频 Track 分辨率发生变化的回调 Parameters * remoteVideoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) 远端视频 Track * profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/9254) 分辨率等级 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteVideoTrackDelegate # QNRemoteVideoTrackDelegate 最近更新时间: 2022-06-30 15:50:27 远端视频 Track 回调代理,可通过 [QNRemoteVideoTrack.delegate](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858) 进行设置,用来实现远端视频 Track 数据以及发生变化的回调。 Index Core Methods * didGetPixelBuffer * didMuteStateChanged * didVideoProfileChanged Core Methods didGetPixelBuffer * \- (void)remoteVideoTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) *)remoteVideoTrack didGetPixelBuffer:(CVPixelBufferRef)pixelBuffer * 远端视频 Track 的视频数据回调 Parameters * remoteVideoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) 远端视频 Track * pixelBuffer: CVPixelBufferRef 具体的视频数据格式,可通过 CVPixelBufferGetPixelFormatType 获取 didMuteStateChanged * \- (void)remoteVideoTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) *)remoteVideoTrack didMuteStateChanged:(BOOL)isMuted; * 远端视频 Track 静默的回调 Parameters * remoteVideoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) 远端音频 Track * isMuted: BOOL 是否静默 didVideoProfileChanged * \- (void)remoteVideoTrack:([QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) *)remoteVideoTrack didVideoProfileChanged:([QNTrackProfile](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/9254))profile; * 远端视频 Track 分辨率发生变化的回调 Parameters * remoteVideoTrack: [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/8858/QNRemoteVideoTrack-iOS) 远端视频 Track * profile: [QNTrackProfile](https://developer.qiniu.com/rtc/11947/QNRemoteVideoTrackDelegate/9254) 分辨率等级 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,186
QNScreenVideoTrackDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNScreenVideoTrackDelegate # QNScreenVideoTrackDelegate 最近更新时间: 2022-06-30 16:42:09 录屏 Track 回调代理,可通过 [QNScreenVideoTrack.screenDelegate](https://developer.qiniu.com/rtc/9582/QNScreenVideoTrackDelegate/8850) 进行设置,用来实现录屏 Track 发生错误时的回调。 > 若有录屏 Track 实现,请务必设置 > [QNScreenVideoTrack.screenDelegate](https://developer.qiniu.com/rtc/9582/QNScreenVideoTrackDelegate/8850) > 代理,实现该回调方法,便于及时对系统录屏产生的错误做处理 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)screenVideoTrack:([QNScreenVideoTrack](https://developer.qiniu.com/rtc/9582/QNScreenVideoTrackDelegate/8850/QNScreenVideoTrack-iOS) *)screenVideoTrack didFailWithError:(NSError *)error; * 录屏运行过程中发生错误会通过该方法回调 Parameters * error: NSError error 错误 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNScreenVideoTrackDelegate # QNScreenVideoTrackDelegate 最近更新时间: 2022-06-30 16:42:09 录屏 Track 回调代理,可通过 [QNScreenVideoTrack.screenDelegate](https://developer.qiniu.com/rtc/9582/QNScreenVideoTrackDelegate/8850) 进行设置,用来实现录屏 Track 发生错误时的回调。 > 若有录屏 Track 实现,请务必设置 > [QNScreenVideoTrack.screenDelegate](https://developer.qiniu.com/rtc/9582/QNScreenVideoTrackDelegate/8850) > 代理,实现该回调方法,便于及时对系统录屏产生的错误做处理 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)screenVideoTrack:([QNScreenVideoTrack](https://developer.qiniu.com/rtc/9582/QNScreenVideoTrackDelegate/8850/QNScreenVideoTrack-iOS) *)screenVideoTrack didFailWithError:(NSError *)error; * 录屏运行过程中发生错误会通过该方法回调 Parameters * error: NSError error 错误 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,189
QNTypeDefines
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTypeDefines # QNTypeDefines 最近更新时间: 2024-08-16 17:44:33 类型定义管理类 Index Enum * QNRTCLogLevel * QNRTCErrorDomain * QNAudioMixErrorDomain * QNMediaRelayErrorDomain * QNMediaRecorderReasonCode * QNMediaPlayerReasonCode * QNConnectionState * QNAuthorizationStatus * QNAudioMusicMixerState * QNTrackKind * QNAudioDeviceType * QNRTCPolicy * QNDegradationPreference * QNAudioScene * QNVideoEncoderType * QNVideoFormatPreset * QNNetworkGrade * QNClientMode * QNClientRole * QNMediaRelayState * QNVideoFillModeType * QNTrackProfile * QNConnectionDisconnectedReason * QNMediaRecorderState * QNPlayerState * QNPlayerEvent Block * QNPublishResultCallback * QNClientRoleResultCallback * QNMediaRelayResultCallback * QNUploadLogResultCallback * QNCameraSwitchResultCallback Enum QNRTCLogLevel * @typedef NS_ENUM(NSUInteger, QNRTCLogLevel) * 日志输出等级 code | describe | message ---|---|--- QNRTCLogLevelVerbose | Verbose 日志输出 | 无 QNRTCLogLevelInfo | Info 日志输出 | 无 QNRTCLogLevelWarning | Warning 日志输出 | 无 QNRTCLogLevelError | Error 日志输出 | 无 QNRTCLogLevelNone | None 日志输出 | 无 QNRTCErrorDomain * NS_ERROR_ENUM(QNRTCErrorDomain) * 异常的错误码,指代具体出现错误的原因 code | describe | message ---|---|--- QNRTCErrorTokenError | 鉴权失败 | 建议用户收到此错误代码时尝试重新获取 RoomToken 后再次加入房间 QNRTCErrorTokenExpired | RoomToken 过期 | 建议用户收到此错误代码时尝试重新获取 RoomToken 后再次加入房间 QNRTCErrorRoomClosed | 房间被管理员关闭 | 请联系服务器 QNRTCErrorRoomIsFull | 房间人数已超过限制 | 请联系服务器 QNRTCErrorUserAlreadyExist | 用户已存在,该用户可能已使用其他设备进入房间 | 请确认是否已使用其他设备进入房间 QNRTCErrorNoPermission | 当在进行踢人合流等操作没有权限时会返回此错误代码 | 请确定用户在进行操作时是否有对应权限 QNRTCErrorInvalidParameter | 参数错误 | 请确定当前操作输入参数是否合法 QNRTCErrorMediaCapNotSupport | 服务不可用 | SDK 内部错误。用户无需处理 QNRTCErrorSubscribeDisconnected | 订阅失败,或订阅不存在 | 用户无需处理 QNRTCErrorAuthFailed | 鉴权失败 | 建议用户收到此错误代码时检查网络并尝试重新获取 RoomToken 后再次加入房间 QNRTCErrorRoomStateError | 当前房间状态不允许此操作 | 请在当前操作前,确定房间状态 QNRTCErrorReconnectFailed | 房间重连失败 | 建议重新加入房间 QNRTCErrorNetworkTimeout | 网络超时 | 请确认网络状态 QNRTCErrorFatalError | 非预期错误 | SDK 内部错误。用户无需处理 QNRTCErrorStreamNotExistError | 流不存在 | 请确认流信息 QNRTCErrorServerUnavailable | 服务不可用 | 请重新尝试 QNRTCErrorOperationTimeoutError | 操作超时 | 请重新尝试 QNRTCErrorLiveStreamingClosedError | 流被服务端关闭 | 请重新转推 QNRTCErrorSignalTimeOut | 信令超时 | 请重新尝试 QNRTCErrorPushAudioBufferFailed | 音频重采样失败 | SDK 内部错误。用户无需处理 QNRTCErrorFetchToken | 上传日志获取 token 失败 | 日志文件上传相关内部错误 QNRTCErrorReadFile | 上传日志文件读取失败 | 日志文件上传相关内部错误 QNRTCErrorInvalidDir | 上传日志路径无效 | 日志文件上传相关内部错误 QNRTCErrorImageParserFailed | 推图片图片解析失败 | 请检查下推图片传入的源 QNAudioMixErrorDomain * NS_ERROR_ENUM(QNAudioMixErrorDomain) * 音频混音错误 code | describe | message ---|---|--- QNAudioMixErrorResampleFailed | 音频混音重采样 | 请重新尝试混音操作 QNAudioMixErrorAudioNotFound | 音频文件不存在 | 请检查音频文件是否实际存在 QNAudioMixErrorIOException | 输入输出错误 | 请检查混音文件是否存在异常 QNAudioMixErrorDecoderException | 解码错误 | 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac QNAudioMixErrorSeekFailed | 跳转失败错误 | 请检查是否在开始混音前执行了 Seek 操作 QNAudioMixErrorInvalidID | 唯一标识非法 | 请检查多音效或多音源使用的唯一标识 ID 是否可用 QNMediaRelayErrorDomain * NS_ERROR_ENUM(QNMediaRelayErrorDomain) * 跨房媒体转发错误 code | describe | message ---|---|--- QNMediaRelayErrorTokenError | 跨房转推 Token 错误 | 无 QNMediaRelayErrorAlreadyStart | 当前跨房已开始 | 无 QNMediaRelayErrorNotStart | 当前跨房未开始 | 无 QNMediaRelayErrorDestinationRoomNotExisted | 目标房间不存在 | 无 QNMediaRelayErrorPlayerInDestRoom | 已在房间内 | 无 QNMediaRelayErrorStartFailed | 开始失败 | 无 QNRTCErrorInvalidMode | 使用场景不符 | 无 QNRTCErrorInvalidRole | 用户角色不符 | 无 QNMediaRecorderReasonCode * NS_ERROR_ENUM(QNMediaRecorderReasonCode) * 音视频本地录制错误 code | describe | message ---|---|--- QNMediaRecorderReasonCodeNoError | 一切正常 | 无 QNMediaRecorderReasonCodeFormatFailed | 封装格式操作失败 | 无 QNMediaRecorderReasonCodeStreamFailed | 流信息操作失败 | 无 QNMediaRecorderReasonCodeWriteFailed | 录制过程中写入失败 | 无 QNMediaRecorderReasonCodeResampleFailed | 录制过程中重采样操作失败 | 无 QNMediaRecorderReasonCodeNoTrack | 没有可录制的流(采集中断或远端取消发布中断超过 5s) | 无 QNMediaRecorderReasonCodeConfigChanged | 录制源配置被改变 | 无 QNMediaRecorderReasonCodeOutOfMemory | 存储空间不足 | 无 QNMediaRecorderReasonCodeScaleFailed | 录制过程中缩放操作失败 | 无 QNMediaPlayerReasonCode * NS_ERROR_ENUM(QNMediaPlayerReasonCode) * 播放器错误码 code | describe | message ---|---|--- QNMediaPlayerOpenFileFailed | 打开文件失败 | 无 QNMediaPlayerDecoderFailed | 解码失败 | 无 QNMediaPlayerSeekFailed | seek 失败 | 无 QNMediaPlayerInvalidState | 无效的播放状态 | 无 QNConnectionState * typedef NS_ENUM(NSUInteger, QNConnectionState) * 房间连接状态 code | describe | message ---|---|--- QNConnectionStateDisconnected | 空闲状态,初始状态或者退出后都会进入该状态 | 无 QNConnectionStateConnecting | 正在加入的状态 | 无 QNConnectionStateConnected | 已加入的状态 | 无 QNConnectionStateReconnecting | 正在重连的状态 | 无 QNConnectionStateReconnected | 重连成功的状态 | 无 QNAuthorizationStatus * typedef NS_ENUM(NSUInteger, QNAuthorizationStatus) * 设备授权状态 code | describe | message ---|---|--- QNAuthorizationStatusNotDetermined | 还没有确定是否授权 | 无 QNAuthorizationStatusRestricted | 设备受限,一般在家长模式下设备会受限 | 无 QNAuthorizationStatusDenied | 拒绝授权 | 无 QNAuthorizationStatusAuthorized | 已授权 | 无 QNAudioMusicMixerState * typedef NS_ENUM(NSUInteger, QNAudioMusicMixerState) * 背景音乐混音状态 code | describe | message ---|---|--- QNAudioMusicMixerStateIdle | 初始状态 | 无 QNAudioMusicMixerStateMixing | 正在混音的状态 | 无 QNAudioMusicMixerStatePaused | 暂停混音的状态态 | 无 QNAudioMusicMixerStateStopped | 停止混音的状态 | 无 QNAudioMusicMixerStateCompleted | 混音完成的状态 | 无 QNTrackKind * typedef NS_ENUM(NSUInteger, QNTrackKind) * 定义 Track 的类型 code | describe | message ---|---|--- QNTrackKindAudio | 音频类型 | 无 QNTrackKindVideo | 视频类型 | 无 QNAudioDeviceType * typedef NS_ENUM(NSUInteger, QNAudioDeviceType) * 音频设备的类型 code | describe | message ---|---|--- QNAudioDeviceTypeSpeaker | 扬声器 | 无 QNAudioDeviceTypeReceiver | 听筒 | 无 QNAudioDeviceTypeWiredHeadphone | 有线耳机 | 无 QNAudioDeviceTypeBluetooth | 蓝牙 | 无 QNRTCPolicy * typedef NS_ENUM(NSUInteger, QNRTCPolicy) * 媒体流的连接方式 code | describe | message ---|---|--- QNRTCPolicyForceUDP | 使用 UDP | 无 QNRTCPolicyForceTCP | 使用 TCP | 无 QNRTCPolicyPreferUDP | 优先 UDP,不通的话自动改为 TCP | 无 QNDegradationPreference * typedef NS_ENUM(NSUInteger, QNDegradationPreference) * 视频质量降级模式 code | describe | message ---|---|--- QNDegradationMaintainFrameRate | 保持帧率 | 无 QNDegradationMaintainResolution | 保持分辨率 | 无 QNDegradationBlanced | 平衡调节分辨率和帧率 | 无 QNDegradationAdaptBitrateOnly | 保持分辨率和帧率,适当调节码率 | 无 QNDegradationDefault | RTC 模式下使用 QNDegradationBlanced,Live 模式下使用 QNDegradationMaintainResolution | 无 QNAudioScene * typedef NS_ENUM(NSUInteger, QNAudioScene) * 音频场景 code | describe | message ---|---|--- QNAudioSceneDefault | 默认音频场景 | 仅发布或仅订阅时为媒体模式,同时发布和订阅时自动切换到通话模式 QNAudioSceneVoiceChat | 清晰语聊场景 | 为了人声清晰使用通话模式,环境音和音乐声会有一定抑制 QNAudioSceneSoundEqualize | 音质均衡场景 | 平衡音质对环境音和音乐声的还原性更优,使用媒体模式 QNVideoEncoderType * typedef NS_ENUM(NSUInteger, QNVideoEncoderType) * 音频场景 code | describe | message ---|---|--- QNVideoEncoderToolboxH264 | videoToolbox 编码器 | 硬件编码 QNVideoEncoderOpenH264 | 七牛自定义 openh264 | 软件编码 QNVideoFormatPreset * typedef NS_ENUM(NSUInteger, QNVideoFormatPreset) * 音频场景 code | describe | message ---|---|--- QNVideoFormatPreset320x180_15 | 分辨率 320x180, 15fps, 400kbps(RTC), 500kbps(Live) | 无 QNVideoFormatPreset320x240_15 | 分辨率 320x240, 15fps, 500kbps(RTC), 600kbps(Live) | 无 QNVideoFormatPreset640x360_15 | 分辨率 640x360, 15fps, 700kbps(RTC), 800kbps(Live) | 无 QNVideoFormatPreset640x360_30 | 分辨率 640x360, 30fps, 850kbps(RTC), 1050kbps(Live) | 无 QNVideoFormatPreset640x480_15 | 分辨率 640x480, 15fps, 800kbps(RTC), 1100kbps(Live) | 无 QNVideoFormatPreset640x480_30 | 分辨率 640x480, 30fps, 1100kbps(RTC), 1400kbps(Live) | 无 QNVideoFormatPreset960x540_15 | 分辨率 960x540, 15fps, 1000kbps(RTC), 1300kbps(Live) | 无 QNVideoFormatPreset960x540_30 | 分辨率 960x540, 30fps, 1400kbps(RTC), 1700kbps(Live) | 无 QNVideoFormatPreset960x720_15 | 分辨率 960x720, 15fps, 1300kbps(RTC), 1700kbps(Live) | 无 QNVideoFormatPreset960x720_30 | 分辨率 960x720, 30fps, 1700kbps(RTC), 2400kbps(Live) | 无 QNVideoFormatPreset1280x720_15 | 分辨率 1280x720, 15fps, 1600kbps(RTC), 2000kbps(Live) | 无 QNVideoFormatPreset1280x720_30 | 分辨率 1280x720, 30fps, 2200kbps(RTC), 2900kbps(Live) | 无 QNVideoFormatPresetNone | 无编码预设 | 默认 QNNetworkGrade * typedef NS_ENUM(NSUInteger, QNNetworkGrade) * 网络质量等级 code | describe | message ---|---|--- QNNetworkGradeInvalid | 初始状态 | 无 QNNetworkGradeExcellent | 网络优 | 无 QNNetworkGradeGood | 网络良 | 无 QNNetworkGradeGeneral | 网络一般 | 无 QNNetworkGradePoor | 网络差 | 无 QNClientMode * typedef NS_ENUM(NSUInteger, QNClientMode) * 使用场景 code | describe | message ---|---|--- QNClientModeRTC | 通信场景(默认) | 无 QNClientModeLive | 直播场景 | 无 QNClientRole * typedef NS_ENUM(NSUInteger, QNClientRole) * 用户角色 code | describe | message ---|---|--- QNClientRoleBroadcaster | 主播角色 | 无 QNClientRoleAudience | 观众角色 | 无 QNMediaRelayState * typedef NS_ENUM(NSUInteger, QNMediaRelayState) * 跨房媒体转发状态 code | describe | message ---|---|--- QNMediaRelayStateSuccess | 成功 | 无 QNMediaRelayStateStopped | 主动停止 | 无 QNMediaRelayStateInvalidToken | 无效token | 无 QNMediaRelayStateNoRoom | 目标房间不存在 | 无 QNMediaRelayStateRoomClosed | 目标房间已关闭 | 无 QNMediaRelayStatePlayerExisted | 目标房间存在相同用户名 | 无 QNMediaRelayStateUnknown | 未知状态 | 无 QNVideoFillModeType * typedef enum {...}QNVideoFillModeType * 视频填充模式 code | describe | message ---|---|--- QNVideoFillModeNone | 默认 | 无 QNVideoFillModeStretch | 拉伸以填充整个视图,这可能会使图像超出其正常纵横比 | 无 QNVideoFillModePreserveAspectRatio | 保持源图像的纵横比,添加指定背景色的条 | 无 QNVideoFillModePreserveAspectRatioAndFill | 保持源图像的纵横比,放大其中心以填充视图 | 无 QNTrackProfile * typedef NS_ENUM(NSUInteger, QNTrackProfile) * 大小流等级 code | describe | message ---|---|--- QNTrackProfileLow | 低分辨率 | 无 QNTrackProfileMedium | 中分辨率 | 无 QNTrackProfileHigh | 高分辨率 | 无 QNConnectionDisconnectedReason * typedef NS_ENUM(NSUInteger, QNConnectionDisconnectedReason) * 断联原因 code | describe | message ---|---|--- QNConnectionDisconnectedReasonLeave | 主动退出 | 无 QNConnectionDisconnectedReasonKickedOut | 被踢出房间 | 无 QNConnectionDisconnectedReasonRoomClosed | 房间被关 | 无 QNConnectionDisconnectedReasonRoomFull | 房间人数已满 | 无 QNConnectionDisconnectedReasonError | 发生错误异常断开 | 无 QNMediaRecorderState * typedef NS_ENUM(NSUInteger, QNMediaRecorderState) * 录制状态 code | describe | message ---|---|--- QNMediaRecorderStateStopped | 停止录制 | 无 QNMediaRecorderStateRecording | 录制中 | 无 QNMediaRecorderStateError | 发生错误 | 无 QNPlayerState * typedef NS_ENUM(NSUInteger, QNPlayerState) * 播放器状态 code | describe | message ---|---|--- QNPlayerStateIdle | 初始化,停止播放,播放失败等状态 | 无 QNPlayerStatePrepare | 启播过程中状态 | 无 QNPlayerStatePlaying | 播放状态 | 无 QNPlayerStatePause | 暂停状态 | 无 QNPlayerEvent * typedef NS_ENUM(NSUInteger, QNPlayerEvent) * 播放器事件 code | describe | message ---|---|--- QNPlayerEventNone | 默认值 | 无 QNPlayerEventFirstRender | 首帧视频渲染 | 无 QNPlayerEventOpenFileFailed | 打开文件或者直播流失败 | 无 QNPlayerEventDecoderFailed | 初始化解码失败或者解码过程中失败 | 无 Block QNPublishResultCallback * typedef void (^QNPublishResultCallback)(BOOL onPublished, NSError *error); * 用户发布 Track 的 Callback QNClientRoleResultCallback * typedef void (^QNClientRoleResultCallback)(QNClientRole newRole, NSError *error); * 设置用户角色的 Callback. QNMediaRelayResultCallback * typedef void (^QNMediaRelayResultCallback)(NSDictionary *state, NSError *error); * 跨房间媒体转发的 Callback. > 此接口回调的是所有跨房目标房间的状态。具体每个目标房间转发状态,需要参考回调参数中目标房间对应的 QNMediaRelayState QNUploadLogResultCallback * typedef void (^QNUploadLogResultCallback)(NSString *fileName, int code, int remaining); * 日志文件上传结果的 Callback. > 此接口的回调在调用 setLogConfig 设置日志文件配置之后才会有效,如有需要可关注返回的 code 值,方便定位失败原因 QNCameraSwitchResultCallback * typedef void (^QNCameraSwitchResultCallback)(BOOL isFrontCamera, NSString *errorMessage); * 切换摄像头返回结果的 Callback. > 此接口的回调在调用 switchCamera 配置之后返回 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTypeDefines # QNTypeDefines 最近更新时间: 2024-08-16 17:44:33 类型定义管理类 Index Enum * QNRTCLogLevel * QNRTCErrorDomain * QNAudioMixErrorDomain * QNMediaRelayErrorDomain * QNMediaRecorderReasonCode * QNMediaPlayerReasonCode * QNConnectionState * QNAuthorizationStatus * QNAudioMusicMixerState * QNTrackKind * QNAudioDeviceType * QNRTCPolicy * QNDegradationPreference * QNAudioScene * QNVideoEncoderType * QNVideoFormatPreset * QNNetworkGrade * QNClientMode * QNClientRole * QNMediaRelayState * QNVideoFillModeType * QNTrackProfile * QNConnectionDisconnectedReason * QNMediaRecorderState * QNPlayerState * QNPlayerEvent Block * QNPublishResultCallback * QNClientRoleResultCallback * QNMediaRelayResultCallback * QNUploadLogResultCallback * QNCameraSwitchResultCallback Enum QNRTCLogLevel * @typedef NS_ENUM(NSUInteger, QNRTCLogLevel) * 日志输出等级 code | describe | message ---|---|--- QNRTCLogLevelVerbose | Verbose 日志输出 | 无 QNRTCLogLevelInfo | Info 日志输出 | 无 QNRTCLogLevelWarning | Warning 日志输出 | 无 QNRTCLogLevelError | Error 日志输出 | 无 QNRTCLogLevelNone | None 日志输出 | 无 QNRTCErrorDomain * NS_ERROR_ENUM(QNRTCErrorDomain) * 异常的错误码,指代具体出现错误的原因 code | describe | message ---|---|--- QNRTCErrorTokenError | 鉴权失败 | 建议用户收到此错误代码时尝试重新获取 RoomToken 后再次加入房间 QNRTCErrorTokenExpired | RoomToken 过期 | 建议用户收到此错误代码时尝试重新获取 RoomToken 后再次加入房间 QNRTCErrorRoomClosed | 房间被管理员关闭 | 请联系服务器 QNRTCErrorRoomIsFull | 房间人数已超过限制 | 请联系服务器 QNRTCErrorUserAlreadyExist | 用户已存在,该用户可能已使用其他设备进入房间 | 请确认是否已使用其他设备进入房间 QNRTCErrorNoPermission | 当在进行踢人合流等操作没有权限时会返回此错误代码 | 请确定用户在进行操作时是否有对应权限 QNRTCErrorInvalidParameter | 参数错误 | 请确定当前操作输入参数是否合法 QNRTCErrorMediaCapNotSupport | 服务不可用 | SDK 内部错误。用户无需处理 QNRTCErrorSubscribeDisconnected | 订阅失败,或订阅不存在 | 用户无需处理 QNRTCErrorAuthFailed | 鉴权失败 | 建议用户收到此错误代码时检查网络并尝试重新获取 RoomToken 后再次加入房间 QNRTCErrorRoomStateError | 当前房间状态不允许此操作 | 请在当前操作前,确定房间状态 QNRTCErrorReconnectFailed | 房间重连失败 | 建议重新加入房间 QNRTCErrorNetworkTimeout | 网络超时 | 请确认网络状态 QNRTCErrorFatalError | 非预期错误 | SDK 内部错误。用户无需处理 QNRTCErrorStreamNotExistError | 流不存在 | 请确认流信息 QNRTCErrorServerUnavailable | 服务不可用 | 请重新尝试 QNRTCErrorOperationTimeoutError | 操作超时 | 请重新尝试 QNRTCErrorLiveStreamingClosedError | 流被服务端关闭 | 请重新转推 QNRTCErrorSignalTimeOut | 信令超时 | 请重新尝试 QNRTCErrorPushAudioBufferFailed | 音频重采样失败 | SDK 内部错误。用户无需处理 QNRTCErrorFetchToken | 上传日志获取 token 失败 | 日志文件上传相关内部错误 QNRTCErrorReadFile | 上传日志文件读取失败 | 日志文件上传相关内部错误 QNRTCErrorInvalidDir | 上传日志路径无效 | 日志文件上传相关内部错误 QNRTCErrorImageParserFailed | 推图片图片解析失败 | 请检查下推图片传入的源 QNAudioMixErrorDomain * NS_ERROR_ENUM(QNAudioMixErrorDomain) * 音频混音错误 code | describe | message ---|---|--- QNAudioMixErrorResampleFailed | 音频混音重采样 | 请重新尝试混音操作 QNAudioMixErrorAudioNotFound | 音频文件不存在 | 请检查音频文件是否实际存在 QNAudioMixErrorIOException | 输入输出错误 | 请检查混音文件是否存在异常 QNAudioMixErrorDecoderException | 解码错误 | 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac QNAudioMixErrorSeekFailed | 跳转失败错误 | 请检查是否在开始混音前执行了 Seek 操作 QNAudioMixErrorInvalidID | 唯一标识非法 | 请检查多音效或多音源使用的唯一标识 ID 是否可用 QNMediaRelayErrorDomain * NS_ERROR_ENUM(QNMediaRelayErrorDomain) * 跨房媒体转发错误 code | describe | message ---|---|--- QNMediaRelayErrorTokenError | 跨房转推 Token 错误 | 无 QNMediaRelayErrorAlreadyStart | 当前跨房已开始 | 无 QNMediaRelayErrorNotStart | 当前跨房未开始 | 无 QNMediaRelayErrorDestinationRoomNotExisted | 目标房间不存在 | 无 QNMediaRelayErrorPlayerInDestRoom | 已在房间内 | 无 QNMediaRelayErrorStartFailed | 开始失败 | 无 QNRTCErrorInvalidMode | 使用场景不符 | 无 QNRTCErrorInvalidRole | 用户角色不符 | 无 QNMediaRecorderReasonCode * NS_ERROR_ENUM(QNMediaRecorderReasonCode) * 音视频本地录制错误 code | describe | message ---|---|--- QNMediaRecorderReasonCodeNoError | 一切正常 | 无 QNMediaRecorderReasonCodeFormatFailed | 封装格式操作失败 | 无 QNMediaRecorderReasonCodeStreamFailed | 流信息操作失败 | 无 QNMediaRecorderReasonCodeWriteFailed | 录制过程中写入失败 | 无 QNMediaRecorderReasonCodeResampleFailed | 录制过程中重采样操作失败 | 无 QNMediaRecorderReasonCodeNoTrack | 没有可录制的流(采集中断或远端取消发布中断超过 5s) | 无 QNMediaRecorderReasonCodeConfigChanged | 录制源配置被改变 | 无 QNMediaRecorderReasonCodeOutOfMemory | 存储空间不足 | 无 QNMediaRecorderReasonCodeScaleFailed | 录制过程中缩放操作失败 | 无 QNMediaPlayerReasonCode * NS_ERROR_ENUM(QNMediaPlayerReasonCode) * 播放器错误码 code | describe | message ---|---|--- QNMediaPlayerOpenFileFailed | 打开文件失败 | 无 QNMediaPlayerDecoderFailed | 解码失败 | 无 QNMediaPlayerSeekFailed | seek 失败 | 无 QNMediaPlayerInvalidState | 无效的播放状态 | 无 QNConnectionState * typedef NS_ENUM(NSUInteger, QNConnectionState) * 房间连接状态 code | describe | message ---|---|--- QNConnectionStateDisconnected | 空闲状态,初始状态或者退出后都会进入该状态 | 无 QNConnectionStateConnecting | 正在加入的状态 | 无 QNConnectionStateConnected | 已加入的状态 | 无 QNConnectionStateReconnecting | 正在重连的状态 | 无 QNConnectionStateReconnected | 重连成功的状态 | 无 QNAuthorizationStatus * typedef NS_ENUM(NSUInteger, QNAuthorizationStatus) * 设备授权状态 code | describe | message ---|---|--- QNAuthorizationStatusNotDetermined | 还没有确定是否授权 | 无 QNAuthorizationStatusRestricted | 设备受限,一般在家长模式下设备会受限 | 无 QNAuthorizationStatusDenied | 拒绝授权 | 无 QNAuthorizationStatusAuthorized | 已授权 | 无 QNAudioMusicMixerState * typedef NS_ENUM(NSUInteger, QNAudioMusicMixerState) * 背景音乐混音状态 code | describe | message ---|---|--- QNAudioMusicMixerStateIdle | 初始状态 | 无 QNAudioMusicMixerStateMixing | 正在混音的状态 | 无 QNAudioMusicMixerStatePaused | 暂停混音的状态态 | 无 QNAudioMusicMixerStateStopped | 停止混音的状态 | 无 QNAudioMusicMixerStateCompleted | 混音完成的状态 | 无 QNTrackKind * typedef NS_ENUM(NSUInteger, QNTrackKind) * 定义 Track 的类型 code | describe | message ---|---|--- QNTrackKindAudio | 音频类型 | 无 QNTrackKindVideo | 视频类型 | 无 QNAudioDeviceType * typedef NS_ENUM(NSUInteger, QNAudioDeviceType) * 音频设备的类型 code | describe | message ---|---|--- QNAudioDeviceTypeSpeaker | 扬声器 | 无 QNAudioDeviceTypeReceiver | 听筒 | 无 QNAudioDeviceTypeWiredHeadphone | 有线耳机 | 无 QNAudioDeviceTypeBluetooth | 蓝牙 | 无 QNRTCPolicy * typedef NS_ENUM(NSUInteger, QNRTCPolicy) * 媒体流的连接方式 code | describe | message ---|---|--- QNRTCPolicyForceUDP | 使用 UDP | 无 QNRTCPolicyForceTCP | 使用 TCP | 无 QNRTCPolicyPreferUDP | 优先 UDP,不通的话自动改为 TCP | 无 QNDegradationPreference * typedef NS_ENUM(NSUInteger, QNDegradationPreference) * 视频质量降级模式 code | describe | message ---|---|--- QNDegradationMaintainFrameRate | 保持帧率 | 无 QNDegradationMaintainResolution | 保持分辨率 | 无 QNDegradationBlanced | 平衡调节分辨率和帧率 | 无 QNDegradationAdaptBitrateOnly | 保持分辨率和帧率,适当调节码率 | 无 QNDegradationDefault | RTC 模式下使用 QNDegradationBlanced,Live 模式下使用 QNDegradationMaintainResolution | 无 QNAudioScene * typedef NS_ENUM(NSUInteger, QNAudioScene) * 音频场景 code | describe | message ---|---|--- QNAudioSceneDefault | 默认音频场景 | 仅发布或仅订阅时为媒体模式,同时发布和订阅时自动切换到通话模式 QNAudioSceneVoiceChat | 清晰语聊场景 | 为了人声清晰使用通话模式,环境音和音乐声会有一定抑制 QNAudioSceneSoundEqualize | 音质均衡场景 | 平衡音质对环境音和音乐声的还原性更优,使用媒体模式 QNVideoEncoderType * typedef NS_ENUM(NSUInteger, QNVideoEncoderType) * 音频场景 code | describe | message ---|---|--- QNVideoEncoderToolboxH264 | videoToolbox 编码器 | 硬件编码 QNVideoEncoderOpenH264 | 七牛自定义 openh264 | 软件编码 QNVideoFormatPreset * typedef NS_ENUM(NSUInteger, QNVideoFormatPreset) * 音频场景 code | describe | message ---|---|--- QNVideoFormatPreset320x180_15 | 分辨率 320x180, 15fps, 400kbps(RTC), 500kbps(Live) | 无 QNVideoFormatPreset320x240_15 | 分辨率 320x240, 15fps, 500kbps(RTC), 600kbps(Live) | 无 QNVideoFormatPreset640x360_15 | 分辨率 640x360, 15fps, 700kbps(RTC), 800kbps(Live) | 无 QNVideoFormatPreset640x360_30 | 分辨率 640x360, 30fps, 850kbps(RTC), 1050kbps(Live) | 无 QNVideoFormatPreset640x480_15 | 分辨率 640x480, 15fps, 800kbps(RTC), 1100kbps(Live) | 无 QNVideoFormatPreset640x480_30 | 分辨率 640x480, 30fps, 1100kbps(RTC), 1400kbps(Live) | 无 QNVideoFormatPreset960x540_15 | 分辨率 960x540, 15fps, 1000kbps(RTC), 1300kbps(Live) | 无 QNVideoFormatPreset960x540_30 | 分辨率 960x540, 30fps, 1400kbps(RTC), 1700kbps(Live) | 无 QNVideoFormatPreset960x720_15 | 分辨率 960x720, 15fps, 1300kbps(RTC), 1700kbps(Live) | 无 QNVideoFormatPreset960x720_30 | 分辨率 960x720, 30fps, 1700kbps(RTC), 2400kbps(Live) | 无 QNVideoFormatPreset1280x720_15 | 分辨率 1280x720, 15fps, 1600kbps(RTC), 2000kbps(Live) | 无 QNVideoFormatPreset1280x720_30 | 分辨率 1280x720, 30fps, 2200kbps(RTC), 2900kbps(Live) | 无 QNVideoFormatPresetNone | 无编码预设 | 默认 QNNetworkGrade * typedef NS_ENUM(NSUInteger, QNNetworkGrade) * 网络质量等级 code | describe | message ---|---|--- QNNetworkGradeInvalid | 初始状态 | 无 QNNetworkGradeExcellent | 网络优 | 无 QNNetworkGradeGood | 网络良 | 无 QNNetworkGradeGeneral | 网络一般 | 无 QNNetworkGradePoor | 网络差 | 无 QNClientMode * typedef NS_ENUM(NSUInteger, QNClientMode) * 使用场景 code | describe | message ---|---|--- QNClientModeRTC | 通信场景(默认) | 无 QNClientModeLive | 直播场景 | 无 QNClientRole * typedef NS_ENUM(NSUInteger, QNClientRole) * 用户角色 code | describe | message ---|---|--- QNClientRoleBroadcaster | 主播角色 | 无 QNClientRoleAudience | 观众角色 | 无 QNMediaRelayState * typedef NS_ENUM(NSUInteger, QNMediaRelayState) * 跨房媒体转发状态 code | describe | message ---|---|--- QNMediaRelayStateSuccess | 成功 | 无 QNMediaRelayStateStopped | 主动停止 | 无 QNMediaRelayStateInvalidToken | 无效token | 无 QNMediaRelayStateNoRoom | 目标房间不存在 | 无 QNMediaRelayStateRoomClosed | 目标房间已关闭 | 无 QNMediaRelayStatePlayerExisted | 目标房间存在相同用户名 | 无 QNMediaRelayStateUnknown | 未知状态 | 无 QNVideoFillModeType * typedef enum {...}QNVideoFillModeType * 视频填充模式 code | describe | message ---|---|--- QNVideoFillModeNone | 默认 | 无 QNVideoFillModeStretch | 拉伸以填充整个视图,这可能会使图像超出其正常纵横比 | 无 QNVideoFillModePreserveAspectRatio | 保持源图像的纵横比,添加指定背景色的条 | 无 QNVideoFillModePreserveAspectRatioAndFill | 保持源图像的纵横比,放大其中心以填充视图 | 无 QNTrackProfile * typedef NS_ENUM(NSUInteger, QNTrackProfile) * 大小流等级 code | describe | message ---|---|--- QNTrackProfileLow | 低分辨率 | 无 QNTrackProfileMedium | 中分辨率 | 无 QNTrackProfileHigh | 高分辨率 | 无 QNConnectionDisconnectedReason * typedef NS_ENUM(NSUInteger, QNConnectionDisconnectedReason) * 断联原因 code | describe | message ---|---|--- QNConnectionDisconnectedReasonLeave | 主动退出 | 无 QNConnectionDisconnectedReasonKickedOut | 被踢出房间 | 无 QNConnectionDisconnectedReasonRoomClosed | 房间被关 | 无 QNConnectionDisconnectedReasonRoomFull | 房间人数已满 | 无 QNConnectionDisconnectedReasonError | 发生错误异常断开 | 无 QNMediaRecorderState * typedef NS_ENUM(NSUInteger, QNMediaRecorderState) * 录制状态 code | describe | message ---|---|--- QNMediaRecorderStateStopped | 停止录制 | 无 QNMediaRecorderStateRecording | 录制中 | 无 QNMediaRecorderStateError | 发生错误 | 无 QNPlayerState * typedef NS_ENUM(NSUInteger, QNPlayerState) * 播放器状态 code | describe | message ---|---|--- QNPlayerStateIdle | 初始化,停止播放,播放失败等状态 | 无 QNPlayerStatePrepare | 启播过程中状态 | 无 QNPlayerStatePlaying | 播放状态 | 无 QNPlayerStatePause | 暂停状态 | 无 QNPlayerEvent * typedef NS_ENUM(NSUInteger, QNPlayerEvent) * 播放器事件 code | describe | message ---|---|--- QNPlayerEventNone | 默认值 | 无 QNPlayerEventFirstRender | 首帧视频渲染 | 无 QNPlayerEventOpenFileFailed | 打开文件或者直播流失败 | 无 QNPlayerEventDecoderFailed | 初始化解码失败或者解码过程中失败 | 无 Block QNPublishResultCallback * typedef void (^QNPublishResultCallback)(BOOL onPublished, NSError *error); * 用户发布 Track 的 Callback QNClientRoleResultCallback * typedef void (^QNClientRoleResultCallback)(QNClientRole newRole, NSError *error); * 设置用户角色的 Callback. QNMediaRelayResultCallback * typedef void (^QNMediaRelayResultCallback)(NSDictionary *state, NSError *error); * 跨房间媒体转发的 Callback. > 此接口回调的是所有跨房目标房间的状态。具体每个目标房间转发状态,需要参考回调参数中目标房间对应的 QNMediaRelayState QNUploadLogResultCallback * typedef void (^QNUploadLogResultCallback)(NSString *fileName, int code, int remaining); * 日志文件上传结果的 Callback. > 此接口的回调在调用 setLogConfig 设置日志文件配置之后才会有效,如有需要可关注返回的 code 值,方便定位失败原因 QNCameraSwitchResultCallback * typedef void (^QNCameraSwitchResultCallback)(BOOL isFrontCamera, NSString *errorMessage); * 切换摄像头返回结果的 Callback. > 此接口的回调在调用 switchCamera 配置之后返回 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,191
QNAudioMusicMixer
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioMusicMixer # QNAudioMusicMixer 最近更新时间: 2023-10-20 19:39:46 背景音乐混音类,提供了控制背景音乐混音的一系列方法。 > 1\. 当前支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/8855/QNMicrophoneAudioTrack-iOS) 和 > [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/8856/QNCustomAudioTrack-iOS) 的背景音乐混音操作 > > 2\. 注意调用的时机,加入房间并且成功发布后混音才会生效 > > 3\. 通过 > [QNRTC.createAudioEffectMixer](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/undefined) 创建 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11930/QNAudioMusicMixer-iOS) 实例对象, 使用 > [audioTrack.addAudioFilter](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/undefined) 将 musicMixer 对象添加到 audioTrack 中 > > 4\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,请重新调用 > [QNRTC.createAudioMusicMixer](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/8834) 创建本类的实例即可 > > 5\. 若您希望在混合背景音乐的同时添加音效,可参考音效混音接口 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11928/QNAudioEffectMixer-iOS) Index Core Methods * getDuration * setPublishEnabled * isPublishEnabled * setMixingVolume * getMixingVolume * setMusicVolume * getMusicVolume * setStartPosition * getStartPosition * getCurrentPosition * start[1/2] * start[2/2] * stop * pause * resume * seekTo Core Methods getDuration * \+ (int64_t)getDuration:(NSString *)filePath * 获取指定音频文件的总时长 > 文件路径支持本地路径以及在线文件 > > 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac > 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程 Parameters * filePath: NSString 文件路径 Returns int64_t,单位 ms setPublishEnabled * \- (void)setPublishEnabled:(BOOL)publishEnabled; * 设置某音源音频是否发布到远端 Parameters * publishEnabled: BOOL 是否发布到远端 isPublishEnabled * \- (BOOL)isPublishEnabled; * 获取某音源音频是否发布到远端 Returns BOOL setMixingVolume * \- (void)setMixingVolume:(float)volume; * 设置背景音语参与混音的音量,范围 0 ~ 1.0 > 该接口已废弃,请使用 > [QNAudioMusicMixer.setMusicVolume](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11930) Parameters * volume: float 音量大小 getMixingVolume * \- (float)getMixingVolume; * 获取背景音乐参与混音的音量 > 该接口已废弃,请使用 > [QNAudioMusicMixer.getMusicVolume](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11930) Returns float,范围 0 ~ 1.0 setMusicVolume * \- (void)setMusicVolume:(float)volume; * 设置背景音语参与混音的音量,范围 0 ~ 1.0 > 若想修改混音中麦克风采集音频的音量,可通过 > [QNMicrophoneAudioTrack.setVolume](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/8855) 接口实现 Parameters * volume: float 音量大小 getMusicVolume * \- (float)getMusicVolume; * 获取背景音乐参与混音的音量 Returns float,范围 0 ~ 1.0 setStartPosition * \- (void)setStartPosition:(int64_t)position; * 设置参与混音的起始位置,单位 ms Parameters * position: int64_t 起始位置 getStartPosition * \- (int64_t)getStartPosition; * 获取参与混音的起始位置 Returns int64_t,单位 ms getCurrentPosition * \- (int64_t)getCurrentPosition; * 获取当前时长 Returns int64_t,单位 ms start[1/2] * \- (BOOL)start; * 开始混音,默认只混一次 > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) > > 触发 > [QNAudioMusicMixerDelegate.didMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调当前混音进度 Returns BOOL 接口是否调用成功 start[2/2] * \- (BOOL)start:(int)loopCount; * 指定循环次数开始混音 > -1 为无限循环,0 为不混音,大于 0 为实际循环次数 > > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) > > 触发 > [QNAudioMusicMixerDelegate.didMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调当前混音进度 Parameters * loopCount: int 循环次数 Returns BOOL 接口是否调用成功 stop * \- (BOOL)stop; * 停止混音 > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateStopped](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) Returns BOOL 接口是否调用成功 pause * \- (BOOL)pause; * 暂停混音 > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStatePaused](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) Returns BOOL 接口是否调用成功 resume * \- (BOOL)resume; * 恢复混音 > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) Returns BOOL 接口是否调用成功 seekTo * \- (BOOL)seekTo:(int64_t)position; * 跳到指定位置混音,单位 ms > seek 成功会触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) Returns BOOL 接口是否调用成功 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioMusicMixer # QNAudioMusicMixer 最近更新时间: 2023-10-20 19:39:46 背景音乐混音类,提供了控制背景音乐混音的一系列方法。 > 1\. 当前支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/8855/QNMicrophoneAudioTrack-iOS) 和 > [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/8856/QNCustomAudioTrack-iOS) 的背景音乐混音操作 > > 2\. 注意调用的时机,加入房间并且成功发布后混音才会生效 > > 3\. 通过 > [QNRTC.createAudioEffectMixer](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/undefined) 创建 > [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11930/QNAudioMusicMixer-iOS) 实例对象, 使用 > [audioTrack.addAudioFilter](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/undefined) 将 musicMixer 对象添加到 audioTrack 中 > > 4\. 背景音乐混音仅支持同时混合一路背景音乐,若需要切换背景音乐,请重新调用 > [QNRTC.createAudioMusicMixer](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/8834) 创建本类的实例即可 > > 5\. 若您希望在混合背景音乐的同时添加音效,可参考音效混音接口 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11928/QNAudioEffectMixer-iOS) Index Core Methods * getDuration * setPublishEnabled * isPublishEnabled * setMixingVolume * getMixingVolume * setMusicVolume * getMusicVolume * setStartPosition * getStartPosition * getCurrentPosition * start[1/2] * start[2/2] * stop * pause * resume * seekTo Core Methods getDuration * \+ (int64_t)getDuration:(NSString *)filePath * 获取指定音频文件的总时长 > 文件路径支持本地路径以及在线文件 > > 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac > 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程 Parameters * filePath: NSString 文件路径 Returns int64_t,单位 ms setPublishEnabled * \- (void)setPublishEnabled:(BOOL)publishEnabled; * 设置某音源音频是否发布到远端 Parameters * publishEnabled: BOOL 是否发布到远端 isPublishEnabled * \- (BOOL)isPublishEnabled; * 获取某音源音频是否发布到远端 Returns BOOL setMixingVolume * \- (void)setMixingVolume:(float)volume; * 设置背景音语参与混音的音量,范围 0 ~ 1.0 > 该接口已废弃,请使用 > [QNAudioMusicMixer.setMusicVolume](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11930) Parameters * volume: float 音量大小 getMixingVolume * \- (float)getMixingVolume; * 获取背景音乐参与混音的音量 > 该接口已废弃,请使用 > [QNAudioMusicMixer.getMusicVolume](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11930) Returns float,范围 0 ~ 1.0 setMusicVolume * \- (void)setMusicVolume:(float)volume; * 设置背景音语参与混音的音量,范围 0 ~ 1.0 > 若想修改混音中麦克风采集音频的音量,可通过 > [QNMicrophoneAudioTrack.setVolume](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/8855) 接口实现 Parameters * volume: float 音量大小 getMusicVolume * \- (float)getMusicVolume; * 获取背景音乐参与混音的音量 Returns float,范围 0 ~ 1.0 setStartPosition * \- (void)setStartPosition:(int64_t)position; * 设置参与混音的起始位置,单位 ms Parameters * position: int64_t 起始位置 getStartPosition * \- (int64_t)getStartPosition; * 获取参与混音的起始位置 Returns int64_t,单位 ms getCurrentPosition * \- (int64_t)getCurrentPosition; * 获取当前时长 Returns int64_t,单位 ms start[1/2] * \- (BOOL)start; * 开始混音,默认只混一次 > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) > > 触发 > [QNAudioMusicMixerDelegate.didMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调当前混音进度 Returns BOOL 接口是否调用成功 start[2/2] * \- (BOOL)start:(int)loopCount; * 指定循环次数开始混音 > -1 为无限循环,0 为不混音,大于 0 为实际循环次数 > > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) > > 触发 > [QNAudioMusicMixerDelegate.didMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调当前混音进度 Parameters * loopCount: int 循环次数 Returns BOOL 接口是否调用成功 stop * \- (BOOL)stop; * 停止混音 > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateStopped](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) Returns BOOL 接口是否调用成功 pause * \- (BOOL)pause; * 暂停混音 > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStatePaused](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) Returns BOOL 接口是否调用成功 resume * \- (BOOL)resume; * 恢复混音 > 触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) Returns BOOL 接口是否调用成功 seekTo * \- (BOOL)seekTo:(int64_t)position; * 跳到指定位置混音,单位 ms > seek 成功会触发 > [QNAudioMusicMixerDelegate.didStateChanged](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/11931) 回调混音状态为 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11930/QNAudioMusicMixer- > iOS/9254) Returns BOOL 接口是否调用成功 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,216
QNAudioMusicMixerDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioMusicMixerDelegate # QNAudioMusicMixerDelegate 最近更新时间: 2022-06-30 14:50:00 背景音乐混音回调代理,可通过 [QNMicrophoneAudioTrack.createAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/8855) 创建时进行设置传入,用来回调混音状态、当前混音进度以及混音错误信息。 Index Core Methods * didFailWithError * didStateChanged * didMixing Core Methods didFailWithError * \- (void)audioMusicMixer:([QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) *)audioMusicMixer didFailWithError:(NSError *)error; * 音效混音发生错误的回调 code | describe | message ---|---|--- QNAudioMixErrorResampleFailed | 音频混音重采样 | 请重新尝试混音操作 QNAudioMixErrorAudioNotFound | 音频文件不存在 | 请检查音频文件是否实际存在 QNAudioMixErrorIOException | 输入输出错误 | 请检查混音文件是否存在异常 QNAudioMixErrorDecoderException | 解码错误 | 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac QNAudioMixErrorSeekFailed | 跳转失败错误 | 请检查是否在开始混音前执行了 Seek 操作 Parameters * audioMusicMixer: [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) 音效混音实例对象 * error: NSError 错误信息 didStateChanged * \- (void)audioMusicMixer:([QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) *)audioMusicMixer didStateChanged:([QNAudioMusicMixerState](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/9254))musicMixerState; * 音效混音某音效播放完成的回调 > > [QNAudioMusicMixer.seekTo](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930) > 操作成功后会触发 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/9254) > 状态的回调,可依赖该机制优化 seek 场景下的 UI 显示 Parameters * audioMusicMixer: [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) 音效混音实例对象 * musicMixerState: [QNAudioMusicMixerState](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/9254) 混音状态 didMixing * \- (void)audioMusicMixer:([QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS)*)audioMusicMixer didMixing:(int64_t)currentPosition; * 音效混音某音效播放完成的回调 Parameters * audioMusicMixer: [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) 音效混音实例对象 * currentPosition: int64_t 当前进度,单位 ms 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioMusicMixerDelegate # QNAudioMusicMixerDelegate 最近更新时间: 2022-06-30 14:50:00 背景音乐混音回调代理,可通过 [QNMicrophoneAudioTrack.createAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/8855) 创建时进行设置传入,用来回调混音状态、当前混音进度以及混音错误信息。 Index Core Methods * didFailWithError * didStateChanged * didMixing Core Methods didFailWithError * \- (void)audioMusicMixer:([QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) *)audioMusicMixer didFailWithError:(NSError *)error; * 音效混音发生错误的回调 code | describe | message ---|---|--- QNAudioMixErrorResampleFailed | 音频混音重采样 | 请重新尝试混音操作 QNAudioMixErrorAudioNotFound | 音频文件不存在 | 请检查音频文件是否实际存在 QNAudioMixErrorIOException | 输入输出错误 | 请检查混音文件是否存在异常 QNAudioMixErrorDecoderException | 解码错误 | 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac QNAudioMixErrorSeekFailed | 跳转失败错误 | 请检查是否在开始混音前执行了 Seek 操作 Parameters * audioMusicMixer: [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) 音效混音实例对象 * error: NSError 错误信息 didStateChanged * \- (void)audioMusicMixer:([QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) *)audioMusicMixer didStateChanged:([QNAudioMusicMixerState](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/9254))musicMixerState; * 音效混音某音效播放完成的回调 > > [QNAudioMusicMixer.seekTo](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930) > 操作成功后会触发 > [QNAudioMusicMixerStateMixing](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/9254) > 状态的回调,可依赖该机制优化 seek 场景下的 UI 显示 Parameters * audioMusicMixer: [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) 音效混音实例对象 * musicMixerState: [QNAudioMusicMixerState](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/9254) 混音状态 didMixing * \- (void)audioMusicMixer:([QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS)*)audioMusicMixer didMixing:(int64_t)currentPosition; * 音效混音某音效播放完成的回调 Parameters * audioMusicMixer: [QNAudioMusicMixer](https://developer.qiniu.com/rtc/11931/QNAudioMusicMixerDelegate/11930/QNAudioMusicMixer-iOS) 音效混音实例对象 * currentPosition: int64_t 当前进度,单位 ms 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,224
QNAudioEffectMixer
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioEffectMixer # QNAudioEffectMixer 最近更新时间: 2023-10-20 19:42:26 音效混音类,提供了控制音效混音的一系列方法。 > 1\. 当前支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/8855/QNMicrophoneAudioTrack-iOS) 和 > [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/8856/QNCustomAudioTrack-iOS) 的音效混音操作 > > 2\. 注意调用的时机,加入房间并且成功发布后混音才会生效 > > 3\. 通过 > [QNRTC.createAudioEffectMixer](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/8834) 创建 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11928/QNAudioEffectMixer-iOS) 实例对象, 使用 > [audioTrack.addAudioFilter](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/undefined) 将 effectMixer 对象添加到 audioTrack 中 Index Core Methods * createAudioEffectWithEffectID * destroyAudioEffectWithEffectID * setPublishEnabled * isPublishEnabled * start * stop * pause * resume * getCurrentPosition * setEffectID * setVolume * getVolume * setAllEffectsVolume * stopAll * pauseAll * resumeAll Core Methods createAudioEffectWithEffectID * \- ([QNAudioEffect](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer-iOS/11927/QNAudioEffect-iOS) *)createAudioEffectWithEffectID:(int)effectID filePath:(NSString *)filePath; * 创建音效混音配置类实例 > 支持本地路径以及在线文件 > > 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac > 每一路参与混音的音效都需要对应一个 > [QNAudioEffect](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11927/QNAudioEffect-iOS) 实例 > > 音效 ID 作为音效标识符,请务必保证唯一 Parameters * effectID: int 音效文件唯一标识符 * filePath: NSString 文件路径 Returns [QNAudioEffect](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- iOS/11927/QNAudioEffect-iOS) 实例 destroyAudioEffectWithEffectID * \- (void)destroyAudioEffectWithEffectID:(int)effectID; * 销毁音效类 Parameters * effectID: int 音效文件唯一标识符 setPublishEnabled * \- (void)setPublishEnabled:(BOOL)publishEnabled effectID:(int)effectID; * 设置某音效音频是否发布到远端 Parameters * publishEnabled: BOOL 是否发布到远端 * effectID: int 音效唯一标识符 isPublishEnabled * \- (BOOL)isPublishEnabled:(int)effectID; * 获取某音效音频是否发布到远端 Parameters * effectID: int 音效唯一标识符 Returns BOOL start * \- (BOOL)start:(int)effectID; * 开始混音某音效 > 音效混音次数,通过 > [QNAudioEffect.setLoopCount](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11927) 设置混音次数 > > 音效混音结束,会触发 > [QNAudioEffectMixerDelegate.didFinished](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11929) 回调 > > 音效混音发生错误,会触发 > [QNAudioEffectMixerDelegate.didFailWithError](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11929) 回调 Parameters * effectID: int 音效唯一标识符 Returns BOOL 接口是否调用成功 stop * \- (BOOL)stop:(int)effectID; * 停止混音某音效 Parameters * effectID: int 音效唯一标识符 Returns BOOL 接口是否调用成功 pause * \- (BOOL)pause:(int)effectID; * 暂停混音某音效 Parameters * effectID: int 音效唯一标识符 Returns BOOL 接口是否调用成功 resume * \- (BOOL)resume:(int)effectID; * 恢复混音某音效 Parameters * effectID: int 音效唯一标识符 Returns BOOL 接口是否调用成功 getCurrentPosition * \- (int64_t)getCurrentPosition:(int)effectID; * 获取某音效当前位置 Parameters * effectID: int 音效唯一标识符 Returns int64_t,单位 ms setEffectID * \- (void)setEffectID:(int)effectID volume:(float)volume; * 设置某音效音量,音量范围 0~1.0 > 该接口已废弃,请使用 > [QNAudioEffectMixer.setVolume](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11928) Parameters * effectID: int 音效唯一标识符 * volume: float 音量大小 setVolume * \- (void)setVolume:(float)volume effectID:(int)effectID; * 设置某音效音量,音量范围 0~1.0 Parameters * volume: float 音量大小 * effectID: int 音效唯一标识符 getVolume * \- (float)getVolume:(int)effectID; * 获取某音效音量 Parameters * effectID: int 音效唯一标识符 Returns float,范围 0~1.0 setAllEffectsVolume * \- (void)setAllEffectsVolume:(float)volume; * 设置所有音效的音量,范围 0~1.0 Parameters * volume: float 音量大小 stopAll * \- (BOOL)stopAll; * 停止混音所有音效 Returns BOOL 接口是否调用成功 pauseAll * \- (BOOL)pauseAll; * 暂停混音所有音效 Returns BOOL 接口是否调用成功 resumeAll * \- (BOOL)resumeAll; * 恢复混音所有音效 Returns BOOL 接口是否调用成功 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioEffectMixer # QNAudioEffectMixer 最近更新时间: 2023-10-20 19:42:26 音效混音类,提供了控制音效混音的一系列方法。 > 1\. 当前支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/8855/QNMicrophoneAudioTrack-iOS) 和 > [QNCustomAudioTrack](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/8856/QNCustomAudioTrack-iOS) 的音效混音操作 > > 2\. 注意调用的时机,加入房间并且成功发布后混音才会生效 > > 3\. 通过 > [QNRTC.createAudioEffectMixer](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/8834) 创建 > [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11928/QNAudioEffectMixer-iOS) 实例对象, 使用 > [audioTrack.addAudioFilter](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/undefined) 将 effectMixer 对象添加到 audioTrack 中 Index Core Methods * createAudioEffectWithEffectID * destroyAudioEffectWithEffectID * setPublishEnabled * isPublishEnabled * start * stop * pause * resume * getCurrentPosition * setEffectID * setVolume * getVolume * setAllEffectsVolume * stopAll * pauseAll * resumeAll Core Methods createAudioEffectWithEffectID * \- ([QNAudioEffect](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer-iOS/11927/QNAudioEffect-iOS) *)createAudioEffectWithEffectID:(int)effectID filePath:(NSString *)filePath; * 创建音效混音配置类实例 > 支持本地路径以及在线文件 > > 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac > 每一路参与混音的音效都需要对应一个 > [QNAudioEffect](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11927/QNAudioEffect-iOS) 实例 > > 音效 ID 作为音效标识符,请务必保证唯一 Parameters * effectID: int 音效文件唯一标识符 * filePath: NSString 文件路径 Returns [QNAudioEffect](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- iOS/11927/QNAudioEffect-iOS) 实例 destroyAudioEffectWithEffectID * \- (void)destroyAudioEffectWithEffectID:(int)effectID; * 销毁音效类 Parameters * effectID: int 音效文件唯一标识符 setPublishEnabled * \- (void)setPublishEnabled:(BOOL)publishEnabled effectID:(int)effectID; * 设置某音效音频是否发布到远端 Parameters * publishEnabled: BOOL 是否发布到远端 * effectID: int 音效唯一标识符 isPublishEnabled * \- (BOOL)isPublishEnabled:(int)effectID; * 获取某音效音频是否发布到远端 Parameters * effectID: int 音效唯一标识符 Returns BOOL start * \- (BOOL)start:(int)effectID; * 开始混音某音效 > 音效混音次数,通过 > [QNAudioEffect.setLoopCount](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11927) 设置混音次数 > > 音效混音结束,会触发 > [QNAudioEffectMixerDelegate.didFinished](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11929) 回调 > > 音效混音发生错误,会触发 > [QNAudioEffectMixerDelegate.didFailWithError](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11929) 回调 Parameters * effectID: int 音效唯一标识符 Returns BOOL 接口是否调用成功 stop * \- (BOOL)stop:(int)effectID; * 停止混音某音效 Parameters * effectID: int 音效唯一标识符 Returns BOOL 接口是否调用成功 pause * \- (BOOL)pause:(int)effectID; * 暂停混音某音效 Parameters * effectID: int 音效唯一标识符 Returns BOOL 接口是否调用成功 resume * \- (BOOL)resume:(int)effectID; * 恢复混音某音效 Parameters * effectID: int 音效唯一标识符 Returns BOOL 接口是否调用成功 getCurrentPosition * \- (int64_t)getCurrentPosition:(int)effectID; * 获取某音效当前位置 Parameters * effectID: int 音效唯一标识符 Returns int64_t,单位 ms setEffectID * \- (void)setEffectID:(int)effectID volume:(float)volume; * 设置某音效音量,音量范围 0~1.0 > 该接口已废弃,请使用 > [QNAudioEffectMixer.setVolume](https://developer.qiniu.com/rtc/11928/QNAudioEffectMixer- > iOS/11928) Parameters * effectID: int 音效唯一标识符 * volume: float 音量大小 setVolume * \- (void)setVolume:(float)volume effectID:(int)effectID; * 设置某音效音量,音量范围 0~1.0 Parameters * volume: float 音量大小 * effectID: int 音效唯一标识符 getVolume * \- (float)getVolume:(int)effectID; * 获取某音效音量 Parameters * effectID: int 音效唯一标识符 Returns float,范围 0~1.0 setAllEffectsVolume * \- (void)setAllEffectsVolume:(float)volume; * 设置所有音效的音量,范围 0~1.0 Parameters * volume: float 音量大小 stopAll * \- (BOOL)stopAll; * 停止混音所有音效 Returns BOOL 接口是否调用成功 pauseAll * \- (BOOL)pauseAll; * 暂停混音所有音效 Returns BOOL 接口是否调用成功 resumeAll * \- (BOOL)resumeAll; * 恢复混音所有音效 Returns BOOL 接口是否调用成功 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,227
QNAudioEffect
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioEffect # QNAudioEffect 最近更新时间: 2022-06-30 14:37:08 音效类,需要依赖 [QNAudioEffectMixer.createAudioEffectWithEffectID](https://developer.qiniu.com/rtc/11927/QNAudioEffect- iOS/11928) 创建使用 Index Core Methods * getDuration * getID * getFilePath * setStartPosition * getStartPosition * setLoopCount * getLoopCount Core Methods getDuration * \+ (int64_t)getDuration:(NSString *)filePath * 获取指定音频文件的总时长 > 文件路径支持本地路径以及在线文件 > > 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac > 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程 Parameters * filePath: NSString 文件路径 Returns int64_t,单位 ms getID * \- (int)getID; * 获取音效文件的唯一标识符 Returns int getFilePath * \- (NSString *)getFilePath; * 获取音效文件路径 Returns NSString setStartPosition * \- (void)setStartPosition:(int64_t)position; * 设置音效参与混音的起始位置,单位 ms Parameters * position: int64_t 起始位置 getStartPosition * \- (int64_t)getStartPosition; * 获取音效参与混音的起始位置 Returns int64_t,单位 ms setLoopCount * \- (void)setLoopCount:(int)loopCount; * 设置音效混音循环次数 > -1 为无限循环,0 为不混音,大于 0 为实际循环次数 Parameters * loopCount: int 循环次数 getLoopCount * \- (int)getLoopCount; * 获取音效混音循环次数 Returns int 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioEffect # QNAudioEffect 最近更新时间: 2022-06-30 14:37:08 音效类,需要依赖 [QNAudioEffectMixer.createAudioEffectWithEffectID](https://developer.qiniu.com/rtc/11927/QNAudioEffect- iOS/11928) 创建使用 Index Core Methods * getDuration * getID * getFilePath * setStartPosition * getStartPosition * setLoopCount * getLoopCount Core Methods getDuration * \+ (int64_t)getDuration:(NSString *)filePath * 获取指定音频文件的总时长 > 文件路径支持本地路径以及在线文件 > > 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac > 该接口为同步方法,对于在线音频文件,获取时长会存在一定的耗时,需注意调用接口所在的线程 Parameters * filePath: NSString 文件路径 Returns int64_t,单位 ms getID * \- (int)getID; * 获取音效文件的唯一标识符 Returns int getFilePath * \- (NSString *)getFilePath; * 获取音效文件路径 Returns NSString setStartPosition * \- (void)setStartPosition:(int64_t)position; * 设置音效参与混音的起始位置,单位 ms Parameters * position: int64_t 起始位置 getStartPosition * \- (int64_t)getStartPosition; * 获取音效参与混音的起始位置 Returns int64_t,单位 ms setLoopCount * \- (void)setLoopCount:(int)loopCount; * 设置音效混音循环次数 > -1 为无限循环,0 为不混音,大于 0 为实际循环次数 Parameters * loopCount: int 循环次数 getLoopCount * \- (int)getLoopCount; * 获取音效混音循环次数 Returns int 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,233
QNAudioEffectMixerDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioEffectMixerDelegate # QNAudioEffectMixerDelegate 最近更新时间: 2022-06-30 14:43:16 音效混音回调代理,可通过 [QNMicrophoneAudioTrack.createAudioEffectMixer](https://developer.qiniu.com/rtc/11929/QNAudioEffectMixerDelegate/8855) 进行设置,用来回调音效混音完成以及发生错误的回调。 Index Core Methods * didFailWithError * didFinished Core Methods didFailWithError * \- (void)audioEffectMixer:([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11929/QNAudioEffectMixerDelegate/11928/QNAudioEffectMixer-iOS) *)audioEffectMixer didFailWithError:(NSError *)error; * 音效混音发生错误的回调 code | describe | message ---|---|--- QNAudioMixErrorResampleFailed | 音频混音重采样 | 请重新尝试混音操作 QNAudioMixErrorAudioNotFound | 音频文件不存在 | 请检查音频文件是否实际存在 QNAudioMixErrorIOException | 输入输出错误 | 请检查混音文件是否存在异常 QNAudioMixErrorDecoderException | 解码错误 | 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac QNAudioMixErrorSeekFailed | 跳转失败错误 | 请检查是否在开始混音前执行了 Seek 操作 Parameters * audioEffectMixer: [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11929/QNAudioEffectMixerDelegate/11928/QNAudioEffectMixer-iOS) 音效混音实例对象 * error: NSError 错误信息 didFinished * \- (void)audioEffectMixer:(QNAudioEffectMixer *)audioEffectMixer didFinished:(int)effectID; * 音效混音某音效播放完成的回调 Parameters * audioEffectMixer: [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11929/QNAudioEffectMixerDelegate/11928/QNAudioEffectMixer-iOS) 音效混音实例对象 * effectID: int 音效文件的唯一标识符 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioEffectMixerDelegate # QNAudioEffectMixerDelegate 最近更新时间: 2022-06-30 14:43:16 音效混音回调代理,可通过 [QNMicrophoneAudioTrack.createAudioEffectMixer](https://developer.qiniu.com/rtc/11929/QNAudioEffectMixerDelegate/8855) 进行设置,用来回调音效混音完成以及发生错误的回调。 Index Core Methods * didFailWithError * didFinished Core Methods didFailWithError * \- (void)audioEffectMixer:([QNAudioEffectMixer](https://developer.qiniu.com/rtc/11929/QNAudioEffectMixerDelegate/11928/QNAudioEffectMixer-iOS) *)audioEffectMixer didFailWithError:(NSError *)error; * 音效混音发生错误的回调 code | describe | message ---|---|--- QNAudioMixErrorResampleFailed | 音频混音重采样 | 请重新尝试混音操作 QNAudioMixErrorAudioNotFound | 音频文件不存在 | 请检查音频文件是否实际存在 QNAudioMixErrorIOException | 输入输出错误 | 请检查混音文件是否存在异常 QNAudioMixErrorDecoderException | 解码错误 | 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac QNAudioMixErrorSeekFailed | 跳转失败错误 | 请检查是否在开始混音前执行了 Seek 操作 Parameters * audioEffectMixer: [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11929/QNAudioEffectMixerDelegate/11928/QNAudioEffectMixer-iOS) 音效混音实例对象 * error: NSError 错误信息 didFinished * \- (void)audioEffectMixer:(QNAudioEffectMixer *)audioEffectMixer didFinished:(int)effectID; * 音效混音某音效播放完成的回调 Parameters * audioEffectMixer: [QNAudioEffectMixer](https://developer.qiniu.com/rtc/11929/QNAudioEffectMixerDelegate/11928/QNAudioEffectMixer-iOS) 音效混音实例对象 * effectID: int 音效文件的唯一标识符 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,235
QNAudioSourceMixer
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioSourceMixer # QNAudioSourceMixer 最近更新时间: 2023-10-20 19:43:43 音源混音类,提供了控制 PCM 裸数据混音的一系列方法。 > 1\. 当前支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/8855/QNMicrophoneAudioTrack-iOS) 和 > [QNCustomAudioTrack](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/8856/QNCustomAudioTrack-iOS) 的音源混音操作 > > 2\. 注意调用的时机,加入房间并且成功发布后混音才会生效 > > 3\. 通过 > [QNRTC.createAudioSourceMixer](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/8834) 创建 > [QNAudioSourceMixer](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12270/QNAudioSourceMixer-iOS) 实例对象, 使用 > [audioTrack.addAudioFilter](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/undefined) 将 sourceMixer 对象添加到 audioTrack 中 Index Core Methods * createAudioSourceWithSourceID[1/3] * createAudioSourceWithSourceID[2/3] * createAudioSourceWithSourceID[3/3] * destroyAudioSourceWithSourceID * setPublishEnabled * isPublishEnabled * setVolume * getVolume * setAllSourcesVolume * pushAudioBuffer Core Methods createAudioSourceWithSourceID[1/3] * \- ([QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer-iOS/12273/QNAudioSource-iOS) *)createAudioSourceWithSourceID:(int)sourceID * 创建音源混音配置类实例,默认小端、关闭阻塞模式 > 每一路参与混音的音源都需要对应一个 > [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12273/QNAudioSource-iOS) 实例 > > 音源 ID 作为音源标识符,请务必保证唯一 Parameters * sourceID: int 音源文件唯一标识符 * filePath: NSString 文件路径 Returns [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- iOS/12273/QNAudioSource-iOS) 实例 createAudioSourceWithSourceID[2/3] * \- ([QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer-iOS/12273/QNAudioSource-iOS) *)createAudioSourceWithSourceID:(int)sourceID blockingMode:(BOOL)blockingMode; * 创建音源混音配置类实例,默认小端 > 当外部送入 PCM 数据进行混音时,可以使用: > > 1\. 阻塞模式,此时外部数据可以持续送入 SDK,当 SDK 缓存的待混音数据过多时,会阻塞 > [QNAudioSourceMixer.pushAudioBuffer](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12270) 接口,直到缓存数据被 SDK 混音使用, > > 2\. 非阻塞模式,此时外部数据需要按每次送入音频数据的时长,按这个时长的间隔来依次送入;也可以使用播放器的回调来送入 SDK;如果送入过快,则 SDK > 会丢弃过多的数据。 > 每一路参与混音的音源都需要对应一个 > [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12273/QNAudioSource-iOS) 实例 > > 音源 ID 作为音源标识符,请务必保证唯一 Parameters * sourceID: int 音源文件唯一标识符 * blockingMode: BOOL 阻塞模式 Returns [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- iOS/12273/QNAudioSource-iOS) 实例 createAudioSourceWithSourceID[3/3] * \- ([QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer-iOS/12273/QNAudioSource-iOS) *)createAudioSourceWithSourceID:(int)sourceID bigEndian:(BOOL)bigEndian blockingMode:(BOOL)blockingMode; * 创建音源混音配置类实例 > 当外部送入 PCM 数据进行混音时,可以使用: > > 1\. 阻塞模式,此时外部数据可以持续送入 SDK,当 SDK 缓存的待混音数据过多时,会阻塞 > [QNAudioSourceMixer.pushAudioBuffer](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12270) 接口,直到缓存数据被 SDK 混音使用, > > 2\. 非阻塞模式,此时外部数据需要按每次送入音频数据的时长,按这个时长的间隔来依次送入;也可以使用播放器的回调来送入 SDK;如果送入过快,则 SDK > 会丢弃过多的数据。 > 每一路参与混音的音源都需要对应一个 > [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12273/QNAudioSource-iOS) 实例 > > 音源 ID 作为音源标识符,请务必保证唯一 Parameters * sourceID: int 音源文件唯一标识符 * bigEndian: BOOL 是否是大端 * blockingMode: BOOL 阻塞模式 Returns [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- iOS/12273/QNAudioSource-iOS) 实例 destroyAudioSourceWithSourceID * \- (void)destroyAudioSourceWithSourceID:(int)sourceID; * 销毁音源类 Parameters * sourceID: int 音源唯一标识符 setPublishEnabled * \- (void)setPublishEnabled:(BOOL)publishEnabled sourceID:(int)sourceID; * 设置某音源音频是否发布到远端 Parameters * publishEnabled: BOOL 是否发布到远端 * sourceID: int 音源唯一标识符 isPublishEnabled * \- (BOOL)isPublishEnabled:(int)sourceID; * 获取某音源音频是否发布到远端 Parameters * sourceID: int 音源唯一标识符 Returns BOOL setVolume * \- (void)setVolume:(float)volume sourceID:(int)sourceID; * 设置某音源音量,音量范围 0~1.0 Parameters * volume: float 音量大小 * sourceID: int 音源唯一标识符 getVolume * \- (float)getVolume:(int)sourceID; * 获取某音源音量 Parameters * sourceID: int 音源唯一标识符 Returns float,范围 0~1.0 setAllSourcesVolume * \- (void)setAllSourcesVolume:(float)volume; * 设置所有音源的音量,范围 0~1.0 Parameters * volume: float 音量大小 pushAudioBuffer * \- (void)pushAudioBuffer:(AudioBuffer *)audioBuffer asbd:(AudioStreamBasicDescription *)asbd sourceID:(int)sourceID; * 导入音频数据 Parameters * sourceID: int 音源唯一标识符 * audioBuffer: AudioBuffer 音频数据 * asbd: AudioStreamBasicDescription 音频数据格式 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioSourceMixer # QNAudioSourceMixer 最近更新时间: 2023-10-20 19:43:43 音源混音类,提供了控制 PCM 裸数据混音的一系列方法。 > 1\. 当前支持基于 > [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/8855/QNMicrophoneAudioTrack-iOS) 和 > [QNCustomAudioTrack](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/8856/QNCustomAudioTrack-iOS) 的音源混音操作 > > 2\. 注意调用的时机,加入房间并且成功发布后混音才会生效 > > 3\. 通过 > [QNRTC.createAudioSourceMixer](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/8834) 创建 > [QNAudioSourceMixer](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12270/QNAudioSourceMixer-iOS) 实例对象, 使用 > [audioTrack.addAudioFilter](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/undefined) 将 sourceMixer 对象添加到 audioTrack 中 Index Core Methods * createAudioSourceWithSourceID[1/3] * createAudioSourceWithSourceID[2/3] * createAudioSourceWithSourceID[3/3] * destroyAudioSourceWithSourceID * setPublishEnabled * isPublishEnabled * setVolume * getVolume * setAllSourcesVolume * pushAudioBuffer Core Methods createAudioSourceWithSourceID[1/3] * \- ([QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer-iOS/12273/QNAudioSource-iOS) *)createAudioSourceWithSourceID:(int)sourceID * 创建音源混音配置类实例,默认小端、关闭阻塞模式 > 每一路参与混音的音源都需要对应一个 > [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12273/QNAudioSource-iOS) 实例 > > 音源 ID 作为音源标识符,请务必保证唯一 Parameters * sourceID: int 音源文件唯一标识符 * filePath: NSString 文件路径 Returns [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- iOS/12273/QNAudioSource-iOS) 实例 createAudioSourceWithSourceID[2/3] * \- ([QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer-iOS/12273/QNAudioSource-iOS) *)createAudioSourceWithSourceID:(int)sourceID blockingMode:(BOOL)blockingMode; * 创建音源混音配置类实例,默认小端 > 当外部送入 PCM 数据进行混音时,可以使用: > > 1\. 阻塞模式,此时外部数据可以持续送入 SDK,当 SDK 缓存的待混音数据过多时,会阻塞 > [QNAudioSourceMixer.pushAudioBuffer](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12270) 接口,直到缓存数据被 SDK 混音使用, > > 2\. 非阻塞模式,此时外部数据需要按每次送入音频数据的时长,按这个时长的间隔来依次送入;也可以使用播放器的回调来送入 SDK;如果送入过快,则 SDK > 会丢弃过多的数据。 > 每一路参与混音的音源都需要对应一个 > [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12273/QNAudioSource-iOS) 实例 > > 音源 ID 作为音源标识符,请务必保证唯一 Parameters * sourceID: int 音源文件唯一标识符 * blockingMode: BOOL 阻塞模式 Returns [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- iOS/12273/QNAudioSource-iOS) 实例 createAudioSourceWithSourceID[3/3] * \- ([QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer-iOS/12273/QNAudioSource-iOS) *)createAudioSourceWithSourceID:(int)sourceID bigEndian:(BOOL)bigEndian blockingMode:(BOOL)blockingMode; * 创建音源混音配置类实例 > 当外部送入 PCM 数据进行混音时,可以使用: > > 1\. 阻塞模式,此时外部数据可以持续送入 SDK,当 SDK 缓存的待混音数据过多时,会阻塞 > [QNAudioSourceMixer.pushAudioBuffer](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12270) 接口,直到缓存数据被 SDK 混音使用, > > 2\. 非阻塞模式,此时外部数据需要按每次送入音频数据的时长,按这个时长的间隔来依次送入;也可以使用播放器的回调来送入 SDK;如果送入过快,则 SDK > 会丢弃过多的数据。 > 每一路参与混音的音源都需要对应一个 > [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- > iOS/12273/QNAudioSource-iOS) 实例 > > 音源 ID 作为音源标识符,请务必保证唯一 Parameters * sourceID: int 音源文件唯一标识符 * bigEndian: BOOL 是否是大端 * blockingMode: BOOL 阻塞模式 Returns [QNAudioSource](https://developer.qiniu.com/rtc/12270/QNAudioSourceMixer- iOS/12273/QNAudioSource-iOS) 实例 destroyAudioSourceWithSourceID * \- (void)destroyAudioSourceWithSourceID:(int)sourceID; * 销毁音源类 Parameters * sourceID: int 音源唯一标识符 setPublishEnabled * \- (void)setPublishEnabled:(BOOL)publishEnabled sourceID:(int)sourceID; * 设置某音源音频是否发布到远端 Parameters * publishEnabled: BOOL 是否发布到远端 * sourceID: int 音源唯一标识符 isPublishEnabled * \- (BOOL)isPublishEnabled:(int)sourceID; * 获取某音源音频是否发布到远端 Parameters * sourceID: int 音源唯一标识符 Returns BOOL setVolume * \- (void)setVolume:(float)volume sourceID:(int)sourceID; * 设置某音源音量,音量范围 0~1.0 Parameters * volume: float 音量大小 * sourceID: int 音源唯一标识符 getVolume * \- (float)getVolume:(int)sourceID; * 获取某音源音量 Parameters * sourceID: int 音源唯一标识符 Returns float,范围 0~1.0 setAllSourcesVolume * \- (void)setAllSourcesVolume:(float)volume; * 设置所有音源的音量,范围 0~1.0 Parameters * volume: float 音量大小 pushAudioBuffer * \- (void)pushAudioBuffer:(AudioBuffer *)audioBuffer asbd:(AudioStreamBasicDescription *)asbd sourceID:(int)sourceID; * 导入音频数据 Parameters * sourceID: int 音源唯一标识符 * audioBuffer: AudioBuffer 音频数据 * asbd: AudioStreamBasicDescription 音频数据格式 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,237
QNAudioSource
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioSource # QNAudioSource 最近更新时间: 2022-10-27 14:59:40 音源类,需要依赖 [QNAudioSourceMixer.createAudioSourceWithSourceID](https://developer.qiniu.com/rtc/12273/QNAudioSource- iOS/12270) 创建使用 Index Core Methods * getID Core Methods getID * \- (int)getID; * 获取音源文件的唯一标识符 Returns int 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioSource # QNAudioSource 最近更新时间: 2022-10-27 14:59:40 音源类,需要依赖 [QNAudioSourceMixer.createAudioSourceWithSourceID](https://developer.qiniu.com/rtc/12273/QNAudioSource- iOS/12270) 创建使用 Index Core Methods * getID Core Methods getID * \- (int)getID; * 获取音源文件的唯一标识符 Returns int 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,244
QNAudioSourceMixerDelegate
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioSourceMixerDelegate # QNAudioSourceMixerDelegate 最近更新时间: 2022-10-27 14:59:52 音源混音回调代理,可通过 [QNMicrophoneAudioTrack.createAudioSourceMixer](https://developer.qiniu.com/rtc/12271/QNAudioSourceMixerDelegate/8855) 进行设置,用来回调音源混音发生错误的回调。 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)audioSourceMixer:([QNAudioSourceMixer](https://developer.qiniu.com/rtc/12271/QNAudioSourceMixerDelegate/12270/QNAudioSourceMixer-iOS) *)audioSourceMixer didFailWithError:(NSError *)error; * 音源混音发生错误的回调 code | describe | message ---|---|--- QNAudioMixErrorResampleFailed | 音频混音重采样 | 请重新尝试混音操作 QNAudioMixErrorAudioNotFound | 音频文件不存在 | 请检查音频文件是否实际存在 QNAudioMixErrorIOException | 输入输出错误 | 请检查混音文件是否存在异常 QNAudioMixErrorDecoderException | 解码错误 | 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac QNAudioMixErrorSeekFailed | 跳转失败错误 | 请检查是否在开始混音前执行了 Seek 操作 QNAudioMixErrorInvalidID | 唯一标识非法 | 请检查多音效或多音源使用的唯一标识 ID 是否可用 Parameters * audioSourceMixer: [QNAudioSourceMixer](https://developer.qiniu.com/rtc/12271/QNAudioSourceMixerDelegate/12270/QNAudioSourceMixer-iOS) 音源混音实例对象 * error: NSError 错误信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNAudioSourceMixerDelegate # QNAudioSourceMixerDelegate 最近更新时间: 2022-10-27 14:59:52 音源混音回调代理,可通过 [QNMicrophoneAudioTrack.createAudioSourceMixer](https://developer.qiniu.com/rtc/12271/QNAudioSourceMixerDelegate/8855) 进行设置,用来回调音源混音发生错误的回调。 Index Core Methods * didFailWithError Core Methods didFailWithError * \- (void)audioSourceMixer:([QNAudioSourceMixer](https://developer.qiniu.com/rtc/12271/QNAudioSourceMixerDelegate/12270/QNAudioSourceMixer-iOS) *)audioSourceMixer didFailWithError:(NSError *)error; * 音源混音发生错误的回调 code | describe | message ---|---|--- QNAudioMixErrorResampleFailed | 音频混音重采样 | 请重新尝试混音操作 QNAudioMixErrorAudioNotFound | 音频文件不存在 | 请检查音频文件是否实际存在 QNAudioMixErrorIOException | 输入输出错误 | 请检查混音文件是否存在异常 QNAudioMixErrorDecoderException | 解码错误 | 音频格式支持 aac、mp3、mp4、wav、m4r、caf、ogg、opus、m4a、flac QNAudioMixErrorSeekFailed | 跳转失败错误 | 请检查是否在开始混音前执行了 Seek 操作 QNAudioMixErrorInvalidID | 唯一标识非法 | 请检查多音效或多音源使用的唯一标识 ID 是否可用 Parameters * audioSourceMixer: [QNAudioSourceMixer](https://developer.qiniu.com/rtc/12271/QNAudioSourceMixerDelegate/12270/QNAudioSourceMixer-iOS) 音源混音实例对象 * error: NSError 错误信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,245
QNLiveStreamingErrorInfo
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLiveStreamingErrorInfo # QNLiveStreamingErrorInfo 最近更新时间: 2022-06-30 15:22:29 CDN 异常信息 Index Core Properties * type * error Enum * Type Core Properties type * type: [Type](https://developer.qiniu.com/rtc/8864/QNLiveStreamingErrorInfo-iOS/8864) * 出现异常的操作类型 code | describe | message ---|---|--- QNLiveStreamingTypeStart | 开始转推操作异常 | 请检查房间状态、单路转推配置等信息 QNLiveStreamingTypeStop | 停止转推操作异常 | 请检查房间状态 QNLiveStreamingTypeUpdate | 更改合流布局配置操作异常 | 请检查房间状态、合流布局配置等信息 error * @property (nonatomic, strong) NSError * error; * 异常的错误码,指代具体出现错误的原因 code | describe | message ---|---|--- QNRTCErrorNoPermission | 无操作权限 | 请检查用户的操作权限 QNRTCErrorRoomStateError | 状态异常 | 请检查房间状态,加入房间后才可以创建转推任务 QNRTCErrorInvalidParameter | 参数错误 | 请检查参数是否合法 QNRTCErrorSignalTimeOut | 操作超时 | 请重新尝试操作 QNRTCErrorServerUnavailable | 服务端错误 | 请重新尝试操作 Enum Type * Type declaration * QNLiveStreamingTypeStart * QNLiveStreamingTypeStop * QNLiveStreamingTypeUpdate 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLiveStreamingErrorInfo # QNLiveStreamingErrorInfo 最近更新时间: 2022-06-30 15:22:29 CDN 异常信息 Index Core Properties * type * error Enum * Type Core Properties type * type: [Type](https://developer.qiniu.com/rtc/8864/QNLiveStreamingErrorInfo-iOS/8864) * 出现异常的操作类型 code | describe | message ---|---|--- QNLiveStreamingTypeStart | 开始转推操作异常 | 请检查房间状态、单路转推配置等信息 QNLiveStreamingTypeStop | 停止转推操作异常 | 请检查房间状态 QNLiveStreamingTypeUpdate | 更改合流布局配置操作异常 | 请检查房间状态、合流布局配置等信息 error * @property (nonatomic, strong) NSError * error; * 异常的错误码,指代具体出现错误的原因 code | describe | message ---|---|--- QNRTCErrorNoPermission | 无操作权限 | 请检查用户的操作权限 QNRTCErrorRoomStateError | 状态异常 | 请检查房间状态,加入房间后才可以创建转推任务 QNRTCErrorInvalidParameter | 参数错误 | 请检查参数是否合法 QNRTCErrorSignalTimeOut | 操作超时 | 请重新尝试操作 QNRTCErrorServerUnavailable | 服务端错误 | 请重新尝试操作 Enum Type * Type declaration * QNLiveStreamingTypeStart * QNLiveStreamingTypeStop * QNLiveStreamingTypeUpdate 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,247
QNConnectionDisconnectedInfo
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNConnectionDisconnectedInfo # QNConnectionDisconnectedInfo 最近更新时间: 2022-06-30 15:08:59 房间断开时的相关信息 Index Core Properties * reason * error Enum * Reason Core Properties reason * @property (nonatomic, assign) [QNConnectionDisconnectedReason](https://developer.qiniu.com/rtc/8866/QNConnectionDisconnectedInfo-iOS/8866) reason; * 获取用户房间断开的原因 code | describe | message ---|---|--- QNConnectionDisconnectedReasonLeave | 主动退出 | 无 QNConnectionDisconnectedReasonKickedOut | 被服务端踢出房间 | 无 QNConnectionDisconnectedReasonRoomClosed | 房间被管理员关闭 | 请确认房间管理逻辑 QNConnectionDisconnectedReasonRoomFull | 房间人数已满,当房间已加入人数超过房间的人数限制时触发 | 请确认后台服务的设置 QNConnectionDisconnectedReasonError | 异常断开 | 可通过 error code 查看异常断开的原因 Returns [QNConnectionDisconnectedReason](https://developer.qiniu.com/rtc/8866/QNConnectionDisconnectedInfo- iOS/8866) error * @property (nonatomic, strong) NSError *error; * 错误信息 code | describe | message ---|---|--- QNRTCErrorAuthFailed | 加入房间认证失败 | 服务验证时出错,可能为服务网络异常。建议重新尝试加入房间 QNRTCErrorTokenError | 房间 Token 错误 | 表示您提供的房间 token 不符合七牛 token 签算规则, 详情请参考[RoomToken 签发服务](https://developer.qiniu.com/rtc/8813/roomToken) QNRTCErrorTokenExpired | 房间 Token 过期 | 表示您的房间 token 过期, 需要重新生成 token 再加入 QNRTCErrorUserAlreadyExist | 房间内已经有同名用户 | 后台如果配置为开启“禁止自动踢人”,则同一用户重复加入/未正常退出再加入会触发此错误 QNRTCErrorMediaCapNotSupport | 媒体协商失败 | 表示该设备不支持指定的音视频格式,无法进行连麦的操作 QNRTCErrorReconnectTokenError | 内部重连失效 | 内部重连后出错,一般出现在网络非常不稳定时出现,建议提示用户并尝试重新加入房间。当发生该错误时,之前创建的转推任务将被服务销毁,如有需要,应在下次成功加入房间后按业务需要恢复 Enum Reason * Type declaration * QNConnectionDisconnectedReasonLeave * QNConnectionDisconnectedReasonKickedOut * QNConnectionDisconnectedReasonRoomClosed * QNConnectionDisconnectedReasonRoomFull * QNConnectionDisconnectedReasonError 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNConnectionDisconnectedInfo # QNConnectionDisconnectedInfo 最近更新时间: 2022-06-30 15:08:59 房间断开时的相关信息 Index Core Properties * reason * error Enum * Reason Core Properties reason * @property (nonatomic, assign) [QNConnectionDisconnectedReason](https://developer.qiniu.com/rtc/8866/QNConnectionDisconnectedInfo-iOS/8866) reason; * 获取用户房间断开的原因 code | describe | message ---|---|--- QNConnectionDisconnectedReasonLeave | 主动退出 | 无 QNConnectionDisconnectedReasonKickedOut | 被服务端踢出房间 | 无 QNConnectionDisconnectedReasonRoomClosed | 房间被管理员关闭 | 请确认房间管理逻辑 QNConnectionDisconnectedReasonRoomFull | 房间人数已满,当房间已加入人数超过房间的人数限制时触发 | 请确认后台服务的设置 QNConnectionDisconnectedReasonError | 异常断开 | 可通过 error code 查看异常断开的原因 Returns [QNConnectionDisconnectedReason](https://developer.qiniu.com/rtc/8866/QNConnectionDisconnectedInfo- iOS/8866) error * @property (nonatomic, strong) NSError *error; * 错误信息 code | describe | message ---|---|--- QNRTCErrorAuthFailed | 加入房间认证失败 | 服务验证时出错,可能为服务网络异常。建议重新尝试加入房间 QNRTCErrorTokenError | 房间 Token 错误 | 表示您提供的房间 token 不符合七牛 token 签算规则, 详情请参考[RoomToken 签发服务](https://developer.qiniu.com/rtc/8813/roomToken) QNRTCErrorTokenExpired | 房间 Token 过期 | 表示您的房间 token 过期, 需要重新生成 token 再加入 QNRTCErrorUserAlreadyExist | 房间内已经有同名用户 | 后台如果配置为开启“禁止自动踢人”,则同一用户重复加入/未正常退出再加入会触发此错误 QNRTCErrorMediaCapNotSupport | 媒体协商失败 | 表示该设备不支持指定的音视频格式,无法进行连麦的操作 QNRTCErrorReconnectTokenError | 内部重连失效 | 内部重连后出错,一般出现在网络非常不稳定时出现,建议提示用户并尝试重新加入房间。当发生该错误时,之前创建的转推任务将被服务销毁,如有需要,应在下次成功加入房间后按业务需要恢复 Enum Reason * Type declaration * QNConnectionDisconnectedReasonLeave * QNConnectionDisconnectedReasonKickedOut * QNConnectionDisconnectedReasonRoomClosed * QNConnectionDisconnectedReasonRoomFull * QNConnectionDisconnectedReasonError 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,250
QNMessageInfo
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMessageInfo # QNMessageInfo 最近更新时间: 2022-06-30 15:35:46 发送消息的信息 Index Core Properties * identifier * userID * content * timestamp Core Properties identifier * @property (nonatomic, strong) NSString *identifier; * 发送消息时传入的消息唯一标识符 userID * @property (nonatomic, strong) NSString *userID; * 发送消息的用户唯一标识符 content * @property (nonatomic, strong) NSString *content; * 发送的消息内容 timestamp * @property (nonatomic, strong) NSNumber *timestamp; * 发送消息的时间戳 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMessageInfo # QNMessageInfo 最近更新时间: 2022-06-30 15:35:46 发送消息的信息 Index Core Properties * identifier * userID * content * timestamp Core Properties identifier * @property (nonatomic, strong) NSString *identifier; * 发送消息时传入的消息唯一标识符 userID * @property (nonatomic, strong) NSString *userID; * 发送消息的用户唯一标识符 content * @property (nonatomic, strong) NSString *content; * 发送的消息内容 timestamp * @property (nonatomic, strong) NSNumber *timestamp; * 发送消息的时间戳 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,253
QNVideoGLView
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNVideoGLView # QNVideoGLView 最近更新时间: 2022-06-30 16:51:23 渲染视图 Index Core Properties * fillMode Core Properties fillMode * @property (nonatomic, assign) [QNVideoFillModeType](https://developer.qiniu.com/rtc/11950/QNVideoGLView-iOS/9254) fillMode; * 远端画面的填充方式 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNVideoGLView # QNVideoGLView 最近更新时间: 2022-06-30 16:51:23 渲染视图 Index Core Properties * fillMode Core Properties fillMode * @property (nonatomic, assign) [QNVideoFillModeType](https://developer.qiniu.com/rtc/11950/QNVideoGLView-iOS/9254) fillMode; * 远端画面的填充方式 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,254
QNNetworkQuality
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNNetworkQuality # QNNetworkQuality 最近更新时间: 2022-06-30 15:39:06 网络质量 Index Core Properties * uplinkNetworkGrade * downlinkNetworkGrade Core Properties uplinkNetworkGrade * @property (nonatomic, assign, readonly) [QNNetworkGrade](https://developer.qiniu.com/rtc/8869/QNNetworkQuality-iOS/9254) uplinkNetworkGrade; * 上行网络等级 downlinkNetworkGrade * @property (nonatomic, assign, readonly) [QNNetworkGrade](https://developer.qiniu.com/rtc/8869/QNNetworkQuality-iOS/9254) downlinkNetworkGrade; * 下行网络等级 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNNetworkQuality # QNNetworkQuality 最近更新时间: 2022-06-30 15:39:06 网络质量 Index Core Properties * uplinkNetworkGrade * downlinkNetworkGrade Core Properties uplinkNetworkGrade * @property (nonatomic, assign, readonly) [QNNetworkGrade](https://developer.qiniu.com/rtc/8869/QNNetworkQuality-iOS/9254) uplinkNetworkGrade; * 上行网络等级 downlinkNetworkGrade * @property (nonatomic, assign, readonly) [QNNetworkGrade](https://developer.qiniu.com/rtc/8869/QNNetworkQuality-iOS/9254) downlinkNetworkGrade; * 下行网络等级 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,255
QNDirectLiveStreamingConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNDirectLiveStreamingConfig # QNDirectLiveStreamingConfig 最近更新时间: 2022-06-30 15:21:17 转推 CDN 配置类 Index Core Properties * streamID * publishUrl * audioTrack * videoTrack Core Properties streamID * @property (nonatomic, strong) NSString *streamID; * 设置单路转推的 id > streamID 为 CDN 转推过程中的唯一标识符 publishUrl * @property (nonatomic, strong) NSString *publishUrl; * 设置单路转推的地址 > 当有单路转推及合流场景切换的需求时,流地址一样会导致抢流现象的出现,因此需要在流地址中拼接 '?serialnum=xxx' > 决定流的优先级,serialnum 的值从 1 开始递增,值越大,优先级越高。 audioTrack * @property (nonatomic, strong) [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8861/QNDirectLiveStreamingConfig-iOS/8854/QNLocalAudioTrack-iOS) *audioTrack; * 需要进行单路转推的音频 Track > 单路转推任务仅支持一路音频轨的设置,重复设置会被覆盖 videoTrack * @property (nonatomic, strong) [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8861/QNDirectLiveStreamingConfig-iOS/8849/QNLocalVideoTrack-iOS) *videoTrack; * 需要进行单路转推的视频 Track > 单路转推任务仅支持一路视频轨的设置,重复设置会被覆盖 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNDirectLiveStreamingConfig # QNDirectLiveStreamingConfig 最近更新时间: 2022-06-30 15:21:17 转推 CDN 配置类 Index Core Properties * streamID * publishUrl * audioTrack * videoTrack Core Properties streamID * @property (nonatomic, strong) NSString *streamID; * 设置单路转推的 id > streamID 为 CDN 转推过程中的唯一标识符 publishUrl * @property (nonatomic, strong) NSString *publishUrl; * 设置单路转推的地址 > 当有单路转推及合流场景切换的需求时,流地址一样会导致抢流现象的出现,因此需要在流地址中拼接 '?serialnum=xxx' > 决定流的优先级,serialnum 的值从 1 开始递增,值越大,优先级越高。 audioTrack * @property (nonatomic, strong) [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8861/QNDirectLiveStreamingConfig-iOS/8854/QNLocalAudioTrack-iOS) *audioTrack; * 需要进行单路转推的音频 Track > 单路转推任务仅支持一路音频轨的设置,重复设置会被覆盖 videoTrack * @property (nonatomic, strong) [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8861/QNDirectLiveStreamingConfig-iOS/8849/QNLocalVideoTrack-iOS) *videoTrack; * 需要进行单路转推的视频 Track > 单路转推任务仅支持一路视频轨的设置,重复设置会被覆盖 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,256
QNTranscodingLiveStreamingConfig
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTranscodingLiveStreamingConfig # QNTranscodingLiveStreamingConfig 最近更新时间: 2022-06-30 16:45:42 合流转推任务的配置类,负责配置合流转推的画布以及推流地址相关信息 Index Core Properties * streamID * publishUrl * width * height * fps * bitrateBps * fillMode * watermarks * background * minBitrateBps * maxBitrateBps * isAudioOnly Core methods * defaultConfiguration Core Properties streamID * @property (nonatomic, strong) NSString *streamID; * 设置合流的 id > streamID 为合流转推过程中的唯一标识符 publishUrl * @property (nonatomic, strong) NSString *publishUrl; * 设置合流转推地址 > 当有单路转推及合流场景切换的需求时,流地址一样会导致抢流现象的出现,因此需要在流地址中拼接 '?serialnum=xxx' > 决定流的优先级,serialnum 的值从 1 开始递增,值越大,优先级越高。 width * @property (nonatomic, assign) int width; * 设置合流图像的宽度,默认为 480 height * @property (nonatomic, assign) int height; * 设置合流图像的高度,默认为 848 fps * @property (nonatomic, assign) int fps; * 设置帧率,默认为 25 bitrateBps * @property (nonatomic, assign) NSUInteger bitrateBps; * 设置码率,默认为 1000*1000 fillMode * @property (nonatomic, assign) [QNVideoFillModeType](https://developer.qiniu.com/rtc/8862/QNTranscodingLiveStreamingConfig-iOS/9254) fillMode; * 设置合流画面填充的模式,默认模式为 QNVideoFillModePreserveAspectRatioAndFill watermarks * @property (nonatomic, strong) NSArray<[QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/8862/QNTranscodingLiveStreamingConfig-iOS/8865/QNTranscodingLiveStreamingImage-iOS) *> *watermarks; * 设置合流水印,仅支持配置 http、https 图片链接,可选项配置 background * @property (nonatomic, strong) [QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/8862/QNTranscodingLiveStreamingConfig-iOS/8865/QNTranscodingLiveStreamingImage-iOS) *background; * 设置合流背景图片,仅支持配置 Http、Https 图片链接,可选项配置 minBitrateBps * @property (nonatomic, assign) NSUInteger minBitrateBps; * 设置最小码率值,可选项配置 maxBitrateBps * @property (nonatomic, assign) NSUInteger maxBitrateBps; * 设置大码率值,可选项配置 isAudioOnly * @property (nonatomic, assign) BOOL isAudioOnly; * 是否开启纯音频合流任务,默认为 NO Core methods defaultConfiguration * \+ (instancetype)defaultConfiguration; * 创建默认配置的实例 Returns [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8862/QNTranscodingLiveStreamingConfig- iOS/8862/QNTranscodingLiveStreamingConfig-iOS) 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTranscodingLiveStreamingConfig # QNTranscodingLiveStreamingConfig 最近更新时间: 2022-06-30 16:45:42 合流转推任务的配置类,负责配置合流转推的画布以及推流地址相关信息 Index Core Properties * streamID * publishUrl * width * height * fps * bitrateBps * fillMode * watermarks * background * minBitrateBps * maxBitrateBps * isAudioOnly Core methods * defaultConfiguration Core Properties streamID * @property (nonatomic, strong) NSString *streamID; * 设置合流的 id > streamID 为合流转推过程中的唯一标识符 publishUrl * @property (nonatomic, strong) NSString *publishUrl; * 设置合流转推地址 > 当有单路转推及合流场景切换的需求时,流地址一样会导致抢流现象的出现,因此需要在流地址中拼接 '?serialnum=xxx' > 决定流的优先级,serialnum 的值从 1 开始递增,值越大,优先级越高。 width * @property (nonatomic, assign) int width; * 设置合流图像的宽度,默认为 480 height * @property (nonatomic, assign) int height; * 设置合流图像的高度,默认为 848 fps * @property (nonatomic, assign) int fps; * 设置帧率,默认为 25 bitrateBps * @property (nonatomic, assign) NSUInteger bitrateBps; * 设置码率,默认为 1000*1000 fillMode * @property (nonatomic, assign) [QNVideoFillModeType](https://developer.qiniu.com/rtc/8862/QNTranscodingLiveStreamingConfig-iOS/9254) fillMode; * 设置合流画面填充的模式,默认模式为 QNVideoFillModePreserveAspectRatioAndFill watermarks * @property (nonatomic, strong) NSArray<[QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/8862/QNTranscodingLiveStreamingConfig-iOS/8865/QNTranscodingLiveStreamingImage-iOS) *> *watermarks; * 设置合流水印,仅支持配置 http、https 图片链接,可选项配置 background * @property (nonatomic, strong) [QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/8862/QNTranscodingLiveStreamingConfig-iOS/8865/QNTranscodingLiveStreamingImage-iOS) *background; * 设置合流背景图片,仅支持配置 Http、Https 图片链接,可选项配置 minBitrateBps * @property (nonatomic, assign) NSUInteger minBitrateBps; * 设置最小码率值,可选项配置 maxBitrateBps * @property (nonatomic, assign) NSUInteger maxBitrateBps; * 设置大码率值,可选项配置 isAudioOnly * @property (nonatomic, assign) BOOL isAudioOnly; * 是否开启纯音频合流任务,默认为 NO Core methods defaultConfiguration * \+ (instancetype)defaultConfiguration; * 创建默认配置的实例 Returns [QNTranscodingLiveStreamingConfig](https://developer.qiniu.com/rtc/8862/QNTranscodingLiveStreamingConfig- iOS/8862/QNTranscodingLiveStreamingConfig-iOS) 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,258
QNTranscodingLiveStreamingTrack
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTranscodingLiveStreamingTrack # QNTranscodingLiveStreamingTrack 最近更新时间: 2022-06-30 16:47:09 合流转推 Track Index Core Properties * trackID * frame * zOrder * fillMode * supportSEI Core Properties trackID * @property (nonatomic, strong) NSString *trackID; * 当前要操作的 Track 的 id frame * @property (nonatomic, assign) CGRect frame; * 该 Track 在合流画面中的大小和位置,仅对视频 Track 有效 zOrder * @property (nonatomic, assign) NSUInteger zOrder; * 该 Track 在合流画面中的层次,0 为最底层 fillMode * @@property (nonatomic, assign) [QNVideoFillModeType](https://developer.qiniu.com/rtc/8863/QNTranscodingLiveStreamingTrack-iOS/9254) fillMode; * 图像的填充模式, 默认继承 QNTranscodingLiveStreamingConfig 中的数值 supportSEI * @property (nonatomic, assign) BOOL supportSEI; * 是否在合流中添加视频 Track 的 SEI 内容 > 每一个合流任务仅允许一路视频 Track 携带 SEI 信息,否则合流布局将会设置失败 > > 合流任务的帧率不应低于视频 Track 帧率,否则合流转码时 SEI 更新将会有延时 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTranscodingLiveStreamingTrack # QNTranscodingLiveStreamingTrack 最近更新时间: 2022-06-30 16:47:09 合流转推 Track Index Core Properties * trackID * frame * zOrder * fillMode * supportSEI Core Properties trackID * @property (nonatomic, strong) NSString *trackID; * 当前要操作的 Track 的 id frame * @property (nonatomic, assign) CGRect frame; * 该 Track 在合流画面中的大小和位置,仅对视频 Track 有效 zOrder * @property (nonatomic, assign) NSUInteger zOrder; * 该 Track 在合流画面中的层次,0 为最底层 fillMode * @@property (nonatomic, assign) [QNVideoFillModeType](https://developer.qiniu.com/rtc/8863/QNTranscodingLiveStreamingTrack-iOS/9254) fillMode; * 图像的填充模式, 默认继承 QNTranscodingLiveStreamingConfig 中的数值 supportSEI * @property (nonatomic, assign) BOOL supportSEI; * 是否在合流中添加视频 Track 的 SEI 内容 > 每一个合流任务仅允许一路视频 Track 携带 SEI 信息,否则合流布局将会设置失败 > > 合流任务的帧率不应低于视频 Track 帧率,否则合流转码时 SEI 更新将会有延时 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,262
QNTranscodingLiveStreamingImage
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTranscodingLiveStreamingImage # QNTranscodingLiveStreamingImage 最近更新时间: 2022-06-30 16:46:26 合流转推图片类 Index Core Properties * frame * imageUrl Core Properties frame * @property (nonatomic, assign) CGRect frame; * 设置图片在合流画布中所在位置 imageUrl * @property (nonatomic, strong) NSString *imageUrl; * 设置图片地址,仅支持 HTTP、HTTPS 图片链接 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNTranscodingLiveStreamingImage # QNTranscodingLiveStreamingImage 最近更新时间: 2022-06-30 16:46:26 合流转推图片类 Index Core Properties * frame * imageUrl Core Properties frame * @property (nonatomic, assign) CGRect frame; * 设置图片在合流画布中所在位置 imageUrl * @property (nonatomic, strong) NSString *imageUrl; * 设置图片地址,仅支持 HTTP、HTTPS 图片链接 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,264
QNRoomMediaRelayInfo
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRoomMediaRelayInfo # QNRoomMediaRelayInfo 最近更新时间: 2022-06-30 15:54:52 跨房媒体转发房间信息的配置类 Index Core Properties * token * roomName Core methods * initWithToken Core Properties token * @property (copy, nonatomic) NSString *token; * 跨房媒体转发 Token roomName * @property (copy, nonatomic) NSString *roomName; * 房间名 Core methods initWithToken * \- (instancetype _Nonnull)initWithToken:(NSString *_Nullable)token; * 房间信息初始化方法 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRoomMediaRelayInfo # QNRoomMediaRelayInfo 最近更新时间: 2022-06-30 15:54:52 跨房媒体转发房间信息的配置类 Index Core Properties * token * roomName Core methods * initWithToken Core Properties token * @property (copy, nonatomic) NSString *token; * 跨房媒体转发 Token roomName * @property (copy, nonatomic) NSString *roomName; * 房间名 Core methods initWithToken * \- (instancetype _Nonnull)initWithToken:(NSString *_Nullable)token; * 房间信息初始化方法 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,265
QNRoomMediaRelayConfiguration
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRoomMediaRelayConfiguration # QNRoomMediaRelayConfiguration 最近更新时间: 2022-06-30 15:54:15 跨房媒体转发的配置类 Index Core Properties * srcRoomInfo * destRoomInfos Core methods * setDestRoomInfo * removeDestRoomInfo Core Properties srcRoomInfo * @property (strong, nonatomic) [QNRoomMediaRelayInfo](https://developer.qiniu.com/rtc/10143/QNRoomMediaRelayConfiguration-iOS/10142/QNRoomMediaRelayInfo-iOS) *srcRoomInfo; * 源房间的信息 destRoomInfos * @property (strong, nonatomic, readonly) NSMutableDictionary *destRoomInfos; * 目标房间信息 [QNRoomMediaRelayInfo](https://developer.qiniu.com/rtc/10143/QNRoomMediaRelayConfiguration-iOS/10142/QNRoomMediaRelayInfo-iOS) 列表 Core methods setDestRoomInfo * \- (BOOL)setDestRoomInfo:([QNRoomMediaRelayInfo](https://developer.qiniu.com/rtc/10143/QNRoomMediaRelayConfiguration-iOS/10142/QNRoomMediaRelayInfo-iOS) *_Nonnull)destRoomInfo forRoomName:(NSString *_Nonnull)roomName; * 设置目标房间信息 若需将流转发到多个目标房间,可多次调用该方法,设置多个房间的 [QNRoomMediaRelayInfo](https://developer.qiniu.com/rtc/10143/QNRoomMediaRelayConfiguration- iOS/10142/QNRoomMediaRelayInfo-iOS)。 removeDestRoomInfo * \- (BOOL)removeDestRoomInfo:(NSString *_Nonnull)roomName; * 删除目标房间的信息 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRoomMediaRelayConfiguration # QNRoomMediaRelayConfiguration 最近更新时间: 2022-06-30 15:54:15 跨房媒体转发的配置类 Index Core Properties * srcRoomInfo * destRoomInfos Core methods * setDestRoomInfo * removeDestRoomInfo Core Properties srcRoomInfo * @property (strong, nonatomic) [QNRoomMediaRelayInfo](https://developer.qiniu.com/rtc/10143/QNRoomMediaRelayConfiguration-iOS/10142/QNRoomMediaRelayInfo-iOS) *srcRoomInfo; * 源房间的信息 destRoomInfos * @property (strong, nonatomic, readonly) NSMutableDictionary *destRoomInfos; * 目标房间信息 [QNRoomMediaRelayInfo](https://developer.qiniu.com/rtc/10143/QNRoomMediaRelayConfiguration-iOS/10142/QNRoomMediaRelayInfo-iOS) 列表 Core methods setDestRoomInfo * \- (BOOL)setDestRoomInfo:([QNRoomMediaRelayInfo](https://developer.qiniu.com/rtc/10143/QNRoomMediaRelayConfiguration-iOS/10142/QNRoomMediaRelayInfo-iOS) *_Nonnull)destRoomInfo forRoomName:(NSString *_Nonnull)roomName; * 设置目标房间信息 若需将流转发到多个目标房间,可多次调用该方法,设置多个房间的 [QNRoomMediaRelayInfo](https://developer.qiniu.com/rtc/10143/QNRoomMediaRelayConfiguration- iOS/10142/QNRoomMediaRelayInfo-iOS)。 removeDestRoomInfo * \- (BOOL)removeDestRoomInfo:(NSString *_Nonnull)roomName; * 删除目标房间的信息 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,266
QNLocalAudioTrackStats
实时音视频
[实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalAudioTrackStats # QNLocalAudioTrackStats 最近更新时间: 2022-06-30 15:32:37 本地音频轨道的统计数据,可以通过 [QNRTCClient.getLocalAudioTrackStats](https://developer.qiniu.com/rtc/8871/QNLocalAudioTrackStats- iOS/8836) 获取,并通过 trackID 来获取对应轨道的统计信息。 Index Core Properties * uplinkBitrate * uplinkRTT * uplinkLostRate Core Properties uplinkBitrate * @property (nonatomic, assign, readonly) double uplinkBitrate; * 本地音频上行码率,单位 bps uplinkRTT * @property (nonatomic, assign, readonly) NSUInteger uplinkRTT; * 本地音频上行网络延时,单位毫秒 uplinkLostRate * @property (nonatomic, assign, readonly) double uplinkLostRate; * 本地音频上行丢包率百分比,范围 [0, 100] 以上内容是否对您有帮助?
* __ * __ * __ * __ * __ [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNLocalAudioTrackStats # QNLocalAudioTrackStats 最近更新时间: 2022-06-30 15:32:37 本地音频轨道的统计数据,可以通过 [QNRTCClient.getLocalAudioTrackStats](https://developer.qiniu.com/rtc/8871/QNLocalAudioTrackStats- iOS/8836) 获取,并通过 trackID 来获取对应轨道的统计信息。 Index Core Properties * uplinkBitrate * uplinkRTT * uplinkLostRate Core Properties uplinkBitrate * @property (nonatomic, assign, readonly) double uplinkBitrate; * 本地音频上行码率,单位 bps uplinkRTT * @property (nonatomic, assign, readonly) NSUInteger uplinkRTT; * 本地音频上行网络延时,单位毫秒 uplinkLostRate * @property (nonatomic, assign, readonly) double uplinkLostRate; * 本地音频上行丢包率百分比,范围 [0, 100] 以上内容是否对您有帮助? * __ * __ * __ * __ * __ 文档反馈 (如有产品使用问题,请[ 提交工单](https://support.qiniu.com/tickets/category)) 提交
6,268