jancd/qiniu-developer_ShareGPT huggingface dataset:
human: 如何处理七牛云的实时音视频QNLocalVideoTrackStats

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNLocalVideoTrackStats

#  QNLocalVideoTrackStats

最近更新时间: 2023-08-22 12:08:01

本地视频轨道的统计数据，可以通过
[QNRTCClient.getLocalVideoTrackStats](https://developer.qiniu.com/rtc/8870/QNLocalVideoTrackStats-
iOS/8836) 获取，通过 trackID 获取对应轨道的统计信息

> 如果发布时设置了
> [QNCameraVideoTrackConfig.multiStreamEnable](https://developer.qiniu.com/rtc/8870/QNLocalVideoTrackStats-
> iOS/8844)，则返回的 List 中包含多个 QNLocalVideoTrackStats，每个对应不同的
> [QNTrackProfile](https://developer.qiniu.com/rtc/8870/QNLocalVideoTrackStats-
> iOS/9254)

Index

Core Properties

  * profile
  * uplinkFrameRate
  * uplinkBitrate
  * uplinkRTT
  * uplinkLostRate
  * uplinkFrameWidth
  * uplinkFrameHeight
  * captureFrameRate
  * captureFrameWidth
  * captureFrameHeight
  * targetFrameRate
  * targetFrameWidth
  * targetFrameHeight

Core Properties

profile

  * @property (nonatomic, assign, readonly) [QNTrackProfile](https://developer.qiniu.com/rtc/8870/QNLocalVideoTrackStats-iOS/9254) profile;
  * 本地视频上行 profile

uplinkFrameRate

  * @property (nonatomic, assign, readonly) NSUInteger uplinkFrameRate;
  * 本地视频上行帧率

uplinkBitrate

  * @property (nonatomic, assign, readonly) double uplinkBitrate;
  * 本地视频上行码率，单位 bps

uplinkRTT

  * @property (nonatomic, assign, readonly) NSUInteger uplinkRTT;
  * 本地视频上行网络延时，单位毫秒

uplinkLostRate

  * @property (nonatomic, assign, readonly) double uplinkLostRate;
  * 本地视频上行丢包率百分比，范围 [0, 100]

uplinkFrameWidth

  * @property (nonatomic, assign, readonly) NSUInteger uplinkFrameWidth;
  * 本地视频上行视频帧宽度

uplinkFrameHeight

  * @property (nonatomic, assign, readonly) NSUInteger uplinkFrameHeight;
  * 本地视频上行视频帧高度

captureFrameRate

  * @property (nonatomic, assign, readonly) NSUInteger captureFrameRate;
  * 采集视频帧率

captureFrameWidth

  * @property (nonatomic, assign, readonly) NSUInteger captureFrameWidth;
  * 采集视频帧宽度

captureFrameHeight

  * @property (nonatomic, assign, readonly) NSUInteger captureFrameHeight;
  * 采集视频帧高度

targetFrameRate

  * @property (nonatomic, assign, readonly) NSUInteger targetFrameRate;
  * 期望的视频帧率

targetFrameWidth

  * @property (nonatomic, assign, readonly) NSUInteger targetFrameWidth;
  * 期望的视频帧宽度

targetFrameHeight

  * @property (nonatomic, assign, readonly) NSUInteger targetFrameHeight;
  * 期望的视频帧高度

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNRemoteAudioTrackStats

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNRemoteAudioTrackStats

#  QNRemoteAudioTrackStats

最近更新时间: 2022-06-30 15:43:35

远端音频轨道的统计数据，可以通过
[QNRTCClient.getRemoteAudioTrackStats](https://developer.qiniu.com/rtc/8868/QNRemoteAudioTrackStats-
iOS/8836) 获取，并通过 trackID 来获取对应轨道的统计信息。

Index

Core Properties

  * downlinkBitrate
  * downlinkLostRate
  * uplinkRTT
  * uplinkLostRate

Core Properties

downlinkBitrate

  * @property (nonatomic, assign, readonly) double downlinkBitrate;
  * 远端音频下行码率，单位 bps

> 当前应用下载对应轨道时的码率，和远端用户上行无关

downlinkLostRate

  * @property (nonatomic, assign, readonly) double downlinkLostRate;
  * 远端音频下行丢包率，范围 [0, 100]

> 当前应用下载对应轨道时的丢包率，和远端用户上行无关

uplinkRTT

  * @property (nonatomic, assign, readonly) NSUInteger uplinkRTT;
  * 远端音频上行网络延时，单位毫秒

表示远端用户上传自身音频数据时的延时

uplinkLostRate

  * @property (nonatomic, assign, readonly) double uplinkLostRate;
  * 远端音频上行丢包率百分比，范围 [0, 100]

表示远端用户上传自身音频数据时的丢包率

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNRemoteVideoTrackStats

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS
>QNRemoteVideoTrackStats

#  QNRemoteVideoTrackStats

最近更新时间: 2023-08-22 12:08:54

远端视频轨道的统计数据，可以通过
[QNRTCClient.getRemoteVideoTrackStats](https://developer.qiniu.com/rtc/8867/QNRemoteVideoTrackStats-
iOS/8836) 获取，并通过 trackID 来获取对应轨道的统计信息。

Index

Core Properties

  * profile
  * downlinkFrameRate
  * downlinkBitrate
  * downlinkLostRate
  * uplinkRTT
  * uplinkLostRate
  * uplinkFrameWidth
  * uplinkFrameHeight

Core Properties

profile

  * @property (nonatomic, assign, readonly) [QNTrackProfile](https://developer.qiniu.com/rtc/8867/QNRemoteVideoTrackStats-iOS/9254) profile;
  * 远端视频 profile，表示当前应用正在接收的视频轨道的 profile

downlinkFrameRate

  * @property (nonatomic, assign, readonly) NSUInteger downlinkFrameRate;
  * 远端视频下行帧率，当前应用正在下载的轨道的帧率

downlinkBitrate

  * @property (nonatomic, assign, readonly) double downlinkBitrate;
  * 远端视频下行码率，单位 bps

> 当前应用下载对应轨道时的码率，和远端用户上行无关

downlinkLostRate

  * @property (nonatomic, assign, readonly) double downlinkLostRate;
  * 远端视频下行丢包率，范围 [0, 100]

> 当前应用下载对应轨道时的丢包率，和远端用户上行无关

uplinkRTT

  * @property (nonatomic, assign, readonly) NSUInteger uplinkRTT;
  * 远端视频上行网络时延，单位毫秒

表示远端用户上传自身视频数据时的延时

uplinkLostRate

  * @property (nonatomic, assign, readonly) double uplinkLostRate;
  * 远端视频上行丢包率百分比，范围 [0, 100]

表示远端用户上传自身音频数据时的丢包率

uplinkFrameWidth

  * @property (nonatomic, assign, readonly) NSUInteger uplinkFrameWidth;
  * 远端用户编码输出的视频宽度

uplinkFrameHeight

  * @property (nonatomic, assign, readonly) NSUInteger uplinkFrameHeight;
  * 远端用户编码输出的视频高度

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNRemoteUser

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNRemoteUser

#  QNRemoteUser

最近更新时间: 2022-06-30 15:47:36

远端用户的相关信息，包括
[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8835/QNRemoteUser-
iOS/8859/QNRemoteAudioTrack-
iOS)、[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8835/QNRemoteUser-
iOS/8858/QNRemoteVideoTrack-iOS) 等

Index

Core Properties

  * userID
  * userData
  * audioTrack
  * videoTrack

Core Properties

userID

  * @property (nonatomic, strong) NSString *userID;
  * 用户 ID

userData

  * @property (nonatomic, strong) NSString *userData;
  * 自定义信息，可传给房间内的其他用户

audioTrack

  * @property (nonatomic,strong, readonly) NSArray <[QNRemoteAudioTrack](https://developer.qiniu.com/rtc/8835/QNRemoteUser-iOS/8859/QNRemoteAudioTrack-iOS) *> *audioTrack;
  * 获取用户发布的音频 Track 列表

可通过
[QNRemoteAudioTrack.isSubscribed](https://developer.qiniu.com/rtc/8835/QNRemoteUser-
iOS/8859) 获取该 Track 当前是否被订阅

videoTrack

  * @property (nonatomic,strong, readonly) NSArray <[QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8835/QNRemoteUser-iOS/8858/QNRemoteVideoTrack-iOS) *> *videoTrack;
  * 获取用户发布的视频 Track 列表

可通过
[QNRemoteVideoTrack.isSubscribed](https://developer.qiniu.com/rtc/8835/QNRemoteUser-
iOS/8858) 获取该 Track 当前是否被订阅

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNMediaSource

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > iOS >QNMediaSource

#  QNMediaSource

最近更新时间: 2024-08-16 17:44:13

播放器数据源参数

Index

Core Properties

  * url

Core Properties

url

  * @property (nonatomic, strong) NSString *url;
  * 设置视频播放地址

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNMediaRecorder

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web >QNMediaRecorder

#  QNMediaRecorder

最近更新时间: 2024-01-08 11:12:35

屏幕录制类

Hierarchy

  * EventEmitter 
    * QNMediaRecorder 

Index

Properties

  * state

Event

  * state-changed
  * info-updated
  * error

Core Methods

  * startRecording
  * stopRecording
  * releaseRecoreding

Properties

state

  * [QNRecorderState](https://developer.qiniu.com/rtc/12628/WebQNMediaRecorder/12626/WebQNRecorderState)
  * 录制状态

Event

state-changed

  * (state: [QNRecorderState](https://developer.qiniu.com/rtc/12628/WebQNMediaRecorder/12626/WebQNRecorderState)) => void
  * 录制状态发生改变回调

Parameters

    * state: [QNRecorderState](https://developer.qiniu.com/rtc/12628/WebQNMediaRecorder/12626/WebQNRecorderState)

录制状态

info-updated

  * (info: [QNRecorderInfo](https://developer.qiniu.com/rtc/12628/WebQNMediaRecorder/12627/WebQNRecorderInfo)) => void
  * 录制信息更新回调

Parameters

    * info: [QNRecorderInfo](https://developer.qiniu.com/rtc/12628/WebQNMediaRecorder/12627/WebQNRecorderInfo)

录制信息

error

  * (error: [QNRTCError](https://developer.qiniu.com/rtc/12628/WebQNMediaRecorder/12354/WebQNRTCError)) => void
  * 错误信息回调

Parameters

    * error: [QNRTCError](https://developer.qiniu.com/rtc/12628/WebQNMediaRecorder/12354/WebQNRTCError)

错误信息

Core Methods

startRecording

  * startRecording(): void
  * 开始录制

Returns void

stopRecording

  * stopRecording(): void
  * 停止录制

Returns void

releaseRecoreding

  * releaseRecoreding(): void
  * 释放录制实例

Returns void

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNClientMode

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web >QNClientMode

#  QNClientMode

最近更新时间: 2022-07-14 15:57:09

音视频通话使用场景，当前分为通信场景和互动直播场景，可通过
[QNRTCClient.setClientMode](https://developer.qiniu.com/rtc/11357/QNClientMode-
Web/9090) 方法进行设置，建议您根据不同需求选择适当的场景，以获取最佳使用体验。

Index

Enumeration members

  * RTC
  * LIVE

Enumeration members

RTC

  * RTC = 'RTC'
  * 通信场景，用于常见的一对一通话或群聊，该场景中，所有用户均可以发布和订阅音视频轨道

LIVE

  * LIVE = 'LIVE'
  * 直播场景，有主播和观众两种用户角色，可以通过 [QNRTCClient.setClientRole](https://developer.qiniu.com/rtc/11357/QNClientMode-Web/9090) 方法设置用户角色为主播或观众。主播可以发布和订阅音视频轨道，而观众只能订阅音视频轨道，无法发布。

> 注意：直播场景中的用户角色默认为观众。如需发布音视频，必须将角色修改为主播。

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNClientRole

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web >QNClientRole

#  QNClientRole

最近更新时间: 2022-07-14 15:57:27

角色类型，当前仅适用于互动直播场景，通过
[QNRTCClient.setClientRole](https://developer.qiniu.com/rtc/11358/QNClientRole-
Web/9090) 来进行设置。

Index

Enumeration members

  * BROADCASTER
  * AUDIENCE

Enumeration members

BROADCASTER

  * BROADCASTER = 'BROADCASTER'
  * 主播角色，拥有发布和订阅媒体流的权限，仅适用于互动直播场景

AUDIENCE

  * AUDIENCE = 'AUDIENCE'
  * 观众角色，仅有订阅媒体流的权限，仅适用于互动直播场景

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNTrack

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web >QNTrack

#  QNTrack

最近更新时间: 2022-07-14 14:48:21

音视频 Track 基类

Hierarchy

  * EventEmitter 
    * QNTrack 
      * [QNLocalTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9085/WebQNLocalTrack)
        * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9061/WebQNLocalVideoTrack)
          * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9068/WebQNCameraVideoTrack)
          * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9092/WebQNScreenVideoTrack)
          * [QNCanvasVideoTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/10320/WebQNCanvasVideoTrack)
          * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9088/WebQNCustomVideoTrack)
        * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9089/WebQNLocalAudioTrack)
          * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9064/WebQNMicrophoneAudioTrack)
          * [QNBufferSourceAudioTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9069/WebQNBufferSourceAudioTrack)
          * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9091/WebQNCustomAudioTrack)
      * [QNRemoteTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9082/WebQNRemoteTrack)
        * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9060/WebQNRemoteVideoTrack)
        * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9076/WebQNTrack/9087/WebQNRemoteAudioTrack)

Index

Properties

  * trackID
  * userID
  * tag
  * mediaElement

Core Methods

  * play
  * isAudio
  * isVideo
  * isMuted
  * getMediaStreamTrack

Properties

trackID

  * trackID?: string
  * Track ID

对于本地 Track，当且仅当 Track 发布后才可获取到有效的 TrackID；对于远端 Track，可随时获取到有效的 TrackID。

userID

  * userID?: string
  * 用户 ID

tag

  * tag?: string
  * 自定义 tag 文本

mediaElement

  * mediaElement: HTMLVideoElement | HTMLAudioElement | undefined
  * 当前播放元素，当调用 play 方法后，可以通过该属性获取播放的媒体元素

Core Methods

play

  * public play(container: HTMLElement, config?: QNPlayerConfig): Promise<void>
  * 播放当前 track

Parameters

    * container: HTMLElement 

挂载的 html 容器，SDK 会在该容器下创建 audio 或 video 元素来播放 track

    * Optional config: [QNPlayerConfig](https://developer.qiniu.com/rtc/9076/WebQNTrack/10141/WebQNPlayerConfig)

播放配置信息

Returns void

isAudio

  * isAudio(): boolean
  * 是否是音频

Returns boolean

isVideo

  * isVideo(): boolean
  * 是否是视频

Returns boolean

isMuted

  * isMuted(): boolean
  * 是否 mute（静音）

Returns boolean

getMediaStreamTrack

  * getMediaStreamTrack(): MediaStreamTrack | undefined
  * 获取浏览器原生的 MediaStreamTrack 对象

Returns MediaStreamTrack | undefined

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNBufferSourceAudioTrack

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web
>QNBufferSourceAudioTrack

#  QNBufferSourceAudioTrack

最近更新时间: 2022-02-22 15:14:23

外部音频导入

Hierarchy

  * EventEmitter 
    * [QNTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9076/WebQNTrack)
      * [QNLocalTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9085/WebQNLocalTrack)
        * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9061/WebQNLocalVideoTrack)
          * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9068/WebQNCameraVideoTrack)
          * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9092/WebQNScreenVideoTrack)
          * [QNCanvasVideoTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/10320/WebQNCanvasVideoTrack)
          * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9088/WebQNCustomVideoTrack)
        * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9089/WebQNLocalAudioTrack)
          * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9064/WebQNMicrophoneAudioTrack)
          * QNBufferSourceAudioTrack 
          * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9091/WebQNCustomAudioTrack)
      * [QNRemoteTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9082/WebQNRemoteTrack)
        * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9060/WebQNRemoteVideoTrack)
        * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9087/WebQNRemoteAudioTrack)

Index

Properties

  * source

Event

  * state-changed

Core Methods

  * start
  * stop
  * pause
  * resume
  * getDuration
  * getCurrentPosition
  * seekTo

Properties

source

  * source: [QNAudioSourceType](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9075)
  * 音频数据源类型

Event

state-changed

  * (state: [QNAudioSourceState](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9047/WebQNAudioSourceState)): void
  * 音频源处理状态变化
    
        track.on('state-changed', function(state) {
    console.log('state-changed', state)
})

Parameters

    * state: [QNAudioSourceState](https://developer.qiniu.com/rtc/9069/WebQNBufferSourceAudioTrack/9047/WebQNAudioSourceState)

音频源处理状态

Core Methods

start

  * start(loop?: boolean): Promise<void>
  * 开始处理

Returns void

stop

  * stop(): void
  * 停止处理

Returns void

pause

  * pause(): void
  * 暂停处理

Returns void

resume

  * resume(): void
  * 恢复处理

Returns void

getDuration

  * getDuration(): number
  * 获取音频时长（秒）

Returns number

getCurrentPosition

  * getCurrentPosition(): number
  * 获取当前位置（秒）

Returns number

seekTo

  * seekTo(time: number): void
  * 跳转到指定位置（秒）

Parameters

    * time: number 

处理位置（秒）

Returns void

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNCustomAudioTrack

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web >QNCustomAudioTrack

#  QNCustomAudioTrack

最近更新时间: 2022-02-22 15:14:13

自定义音频 Track

Hierarchy

  * EventEmitter 
    * [QNTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNTrack)
      * [QNLocalTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNLocalTrack)
        * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNLocalVideoTrack)
          * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebNCameraVideoTrack)
          * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNScreenVideoTrack)
          * [QNCanvasVideoTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/10320/WebQNCanvasVideoTrack)
          * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNCustomVideoTrack)
        * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNLocalAudioTrack)
          * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNMicrophoneAudioTrack)
          * [QNBufferSourceAudioTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNBufferSourceAudioTrack)
          * QNCustomAudioTrack 
      * [QNRemoteTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNRemoteTrack)
        * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNRemoteVideoTrack)
        * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9091/WebQNCustomAudioTrack/WebQNRemoteAudioTrack)

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNRemoteTrack

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web >QNRemoteTrack

#  QNRemoteTrack

最近更新时间: 2022-07-14 14:49:17

远端 Track

Hierarchy

  * EventEmitter 
    * [QNTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9076/WebQNTrack)
      * [QNLocalTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9085/WebQNLocalTrack)
        * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9061/WebQNLocalVideoTrack)
          * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9068/WebQNCameraVideoTrack)
          * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9092/WebQNScreenVideoTrack)
          * [QNCanvasVideoTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/10320/WebQNCanvasVideoTrack)
          * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9088/WebQNCustomVideoTrack)
        * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9089/WebQNLocalAudioTrack)
          * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9064/WebQNMicrophoneAudioTrack)
          * [QNBufferSourceAudioTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9069/WebQNBufferSourceAudioTrack)
          * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9091/WebQNCustomAudioTrack)
      * QNRemoteTrack 
        * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9060/WebQNRemoteVideoTrack)
        * [QNRemoteAudioTrack](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/9087/WebQNRemoteAudioTrack)

Index

Properties

  * trackID
  * userID
  * tag
  * mediaElement

Event

  * mute-state-changed

Core Methods

  * play
  * isAudio
  * isVideo
  * isMuted
  * getMediaStreamTrack
  * isSubscribed

Properties

trackID

  * trackID?: string
  * Track ID

对于本地 Track，当且仅当 Track 发布后才可获取到有效的 TrackID；对于远端 Track，可随时获取到有效的 TrackID。

userID

  * userID?: string
  * 用户 ID

tag

  * tag?: string
  * 自定义 tag 文本

mediaElement

  * mediaElement: HTMLVideoElement | HTMLAudioElement | undefined
  * 当前播放元素，当调用 play 方法后，可以通过该属性获取播放的媒体元素

Event

mute-state-changed

  * (isMuted: boolean): void
  * mute 状态变化

> 音视频 Track 静默状态改变时触发此事件。

Parameters

    * isMuted: boolean 

是否 muted

Core Methods

play

  * public play(container: HTMLElement, config?: QNPlayerConfig): Promise<void>
  * 播放当前 track

Parameters

    * container: HTMLElement 

挂载的 html 容器，SDK 会在该容器下创建 audio 或 video 元素来播放 track

    * Optional config: [QNPlayerConfig](https://developer.qiniu.com/rtc/9082/WebQNRemoteTrack/10141/WebQNPlayerConfig)

播放配置信息

Returns void

isAudio

  * isAudio(): boolean
  * 是否是音频

Returns boolean

isVideo

  * isVideo(): boolean
  * 是否是视频

Returns boolean

isMuted

  * isMuted(): boolean
  * 是否 mute（静音）

Returns boolean

getMediaStreamTrack

  * getMediaStreamTrack(): MediaStreamTrack | undefined
  * 获取浏览器原生的 MediaStreamTrack 对象

Returns MediaStreamTrack | undefined

isSubscribed

  * isSubscribed(): boolean
  * 是否已订阅

Returns boolean

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNBufferSourceAudioTrackConfig

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web
>QNBufferSourceAudioTrackConfig

#  QNBufferSourceAudioTrackConfig

最近更新时间: 2022-07-14 14:56:15

外部音频导入配置

Index

Properties

  * source
  * encoderConfig
  * tag

Properties

source

  * source: [QNAudioSourceType](https://developer.qiniu.com/rtc/9057/WebQNBufferSourceAudioTrackConfig/9075)
  * 音频数据源

encoderConfig

  * encoderConfig?: [QNAudioEncoderConfig](https://developer.qiniu.com/rtc/9057/WebQNBufferSourceAudioTrackConfig/10565/WebQNAudioEncoderConfig) | [QNAudioEncoderConfigPreset](https://developer.qiniu.com/rtc/9057/WebQNBufferSourceAudioTrackConfig/9075)
  * 音频编码配置

> 默认预设值为
> [STANDARD](https://developer.qiniu.com/rtc/9057/WebQNBufferSourceAudioTrackConfig/9075)。

tag

  * tag?: string
  * 自定义 tag 文本

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNCustomAudioTrackConfig

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web
>QNCustomAudioTrackConfig

#  QNCustomAudioTrackConfig

最近更新时间: 2022-02-22 15:14:19

自定义音频采集配置

Index

Properties

  * mediaStreamTrack
  * bitrate
  * tag

Properties

mediaStreamTrack

  * mediaStreamTrack: [MediaStreamTrack](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack)
  * 音频采集源

bitrate

  * bitrate?: number
  * 码率(Kbps)

> 音频最低 16 kbps，最高 128 kbps，若设置值超出最高码率或低于最低码率，则 sdk 会自动调整为最低或最高支持的码率。

tag

  * tag?: string
  * 自定义 tag 文本

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNTranscodingLiveStreamingConfig

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web
>QNTranscodingLiveStreamingConfig

#  QNTranscodingLiveStreamingConfig

最近更新时间: 2022-07-14 15:25:26

合流转推配置项

Hierarchy

  * [QNLiveStreamingConfig](https://developer.qiniu.com/rtc/9086/WebQNTranscodingLiveStreamingConfig/9287/WebQNLiveStreamingConfig)
    * [QNDirectLiveStreamingConfig](https://developer.qiniu.com/rtc/9086/WebQNTranscodingLiveStreamingConfig/9049/WebQNDirectLiveStreamingConfig)
    * QNTranscodingLiveStreamingConfig 

Index

Properties

  * width
  * height
  * videoFrameRate
  * bitrate
  * maxBitrate
  * minBitrate
  * transcodingTracks
  * renderMode
  * background
  * watermarks
  * holdLastFrame

Properties

width

  * width?: number
  * 设置合流转推画布的宽

height

  * height?: number
  * 设置合流转推画布的高

videoFrameRate

  * videoFrameRate?: number
  * 设置合流转推的视频帧率

bitrate

  * bitrate?: number
  * 设置合流转推的码率，单位 kbps

maxBitrate

  * maxBitrate?: number
  * 设置合流转推的最大码率，单位 kbps

minBitrate

  * minBitrate?: number
  * 设置合流转推的最小码率，单位 kbps

transcodingTracks

  * transcodingTracks?: [QNTranscodingLiveStreamingTrack](https://developer.qiniu.com/rtc/9086/WebQNTranscodingLiveStreamingConfig/9065/WebQNTranscodingLiveStreamingTrack)[]
  * 设置合流转推的合流布局

renderMode

  * renderMode?: [QNRenderMode](https://developer.qiniu.com/rtc/9086/WebQNTranscodingLiveStreamingConfig/9067/WebQNRenderMode)
  * 设置合流画面的填充方式

background

  * background?: [QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/9086/WebQNTranscodingLiveStreamingConfig/9063/WebQNTranscodingLiveStreamingImage)
  * 设置合流转推的画布背景

watermarks

  * watermarks?: [QNTranscodingLiveStreamingImage](https://developer.qiniu.com/rtc/9086/WebQNTranscodingLiveStreamingConfig/9063/WebQNTranscodingLiveStreamingImage)[]
  * 设置合流转推的水印

holdLastFrame

  * holdLastFrame?: boolean
  * 设置是否保持最后一帧

以上内容是否对您有帮助？
human: 如何处理七牛云的实时音视频QNCameraVideoTrackConfig

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Web
>QNCameraVideoTrackConfig

#  QNCameraVideoTrackConfig

最近更新时间: 2022-07-14 14:58:20

摄像头采集配置

Index

Properties

  * encoderConfig
  * facingMode
  * optimizationMode
  * cameraId
  * tag

Properties

encoderConfig

  * encoderConfig?: [QNVideoEncoderConfig](https://developer.qiniu.com/rtc/9077/WebQNCameraVideoTrackConfig/10564/WebQNVideoEncoderConfig) | [QNVideoEncoderConfigPreset](https://developer.qiniu.com/rtc/9077/WebQNCameraVideoTrackConfig/9075)
  * 视频编码配置

> 默认预设值为
> [480p](https://developer.qiniu.com/rtc/9077/WebQNCameraVideoTrackConfig/9075)。

facingMode

  * facingMode?: 'user' | 'environment'
  * 选择前置摄像头还是后置摄像头

optimizationMode

  * optimizationMode: [QNVideoOptimizationMode](https://developer.qiniu.com/rtc/9077/WebQNCameraVideoTrackConfig/9079/WebQNVideoOptimizationMode)
  * 传输优化模式

cameraId

  * cameraId?: string
  * 选择摄像头 ID

tag

  * tag?: string
  * 自定义 tag 信息

以上内容是否对您有帮助？