ChannelMediaOptions
- Flutter
更新时间不可用
频道媒体设置选项。
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class ChannelMediaOptions {
const ChannelMediaOptions(
{this.publishCameraTrack,
this.publishSecondaryCameraTrack,
this.publishThirdCameraTrack,
this.publishFourthCameraTrack,
this.publishMicrophoneTrack,
this.publishScreenCaptureVideo,
this.publishScreenCaptureAudio,
this.publishScreenTrack,
this.publishSecondaryScreenTrack,
this.publishThirdScreenTrack,
this.publishFourthScreenTrack,
this.publishCustomAudioTrack,
this.publishCustomAudioTrackId,
this.publishCustomVideoTrack,
this.publishEncodedVideoTrack,
this.publishMediaPlayerAudioTrack,
this.publishMediaPlayerVideoTrack,
this.publishTranscodedVideoTrack,
this.publishMixedAudioTrack,
this.publishLipSyncTrack,
this.autoSubscribeAudio,
this.autoSubscribeVideo,
this.enableAudioRecordingOrPlayout,
this.publishMediaPlayerId,
this.clientRoleType,
this.audienceLatencyLevel,
this.defaultVideoStreamType,
this.channelProfile,
this.audioDelayMs,
this.mediaPlayerAudioDelayMs,
this.token,
this.enableBuiltInMediaEncryption,
this.publishRhythmPlayerTrack,
this.isInteractiveAudience,
this.customVideoTrackId,
this.isAudioFilterable,
this.parameters});
@JsonKey(name: 'publishCameraTrack')
final bool? publishCameraTrack;
@JsonKey(name: 'publishSecondaryCameraTrack')
final bool? publishSecondaryCameraTrack;
@JsonKey(name: 'publishThirdCameraTrack')
final bool? publishThirdCameraTrack;
@JsonKey(name: 'publishFourthCameraTrack')
final bool? publishFourthCameraTrack;
@JsonKey(name: 'publishMicrophoneTrack')
final bool? publishMicrophoneTrack;
@JsonKey(name: 'publishScreenCaptureVideo')
final bool? publishScreenCaptureVideo;
@JsonKey(name: 'publishScreenCaptureAudio')
final bool? publishScreenCaptureAudio;
@JsonKey(name: 'publishScreenTrack')
final bool? publishScreenTrack;
@JsonKey(name: 'publishSecondaryScreenTrack')
final bool? publishSecondaryScreenTrack;
@JsonKey(name: 'publishThirdScreenTrack')
final bool? publishThirdScreenTrack;
@JsonKey(name: 'publishFourthScreenTrack')
final bool? publishFourthScreenTrack;
@JsonKey(name: 'publishCustomAudioTrack')
final bool? publishCustomAudioTrack;
@JsonKey(name: 'publishCustomAudioTrackId')
final int? publishCustomAudioTrackId;
@JsonKey(name: 'publishCustomVideoTrack')
final bool? publishCustomVideoTrack;
@JsonKey(name: 'publishEncodedVideoTrack')
final bool? publishEncodedVideoTrack;
@JsonKey(name: 'publishMediaPlayerAudioTrack')
final bool? publishMediaPlayerAudioTrack;
@JsonKey(name: 'publishMediaPlayerVideoTrack')
final bool? publishMediaPlayerVideoTrack;
@JsonKey(name: 'publishTranscodedVideoTrack')
final bool? publishTranscodedVideoTrack;
@JsonKey(name: 'publishMixedAudioTrack')
final bool? publishMixedAudioTrack;
@JsonKey(name: 'autoSubscribeAudio')
final bool? autoSubscribeAudio;
@JsonKey(name: 'autoSubscribeVideo')
final bool? autoSubscribeVideo;
@JsonKey(name: 'enableAudioRecordingOrPlayout')
final bool? enableAudioRecordingOrPlayout;
@JsonKey(name: 'publishMediaPlayerId')
final int? publishMediaPlayerId;
@JsonKey(name: 'clientRoleType')
final ClientRoleType? clientRoleType;
@JsonKey(name: 'audienceLatencyLevel')
final AudienceLatencyLevelType? audienceLatencyLevel;
@JsonKey(name: 'defaultVideoStreamType')
final VideoStreamType? defaultVideoStreamType;
@JsonKey(name: 'channelProfile')
final ChannelProfileType? channelProfile;
@JsonKey(name: 'audioDelayMs')
final int? audioDelayMs;
@JsonKey(name: 'mediaPlayerAudioDelayMs')
final int? mediaPlayerAudioDelayMs;
@JsonKey(name: 'token')
final String? token;
@JsonKey(name: 'enableBuiltInMediaEncryption')
final bool? enableBuiltInMediaEncryption;
@JsonKey(name: 'publishRhythmPlayerTrack')
final bool? publishRhythmPlayerTrack;
@JsonKey(name: 'isInteractiveAudience')
final bool? isInteractiveAudience;
@JsonKey(name: 'customVideoTrackId')
final int? customVideoTrackId;
@JsonKey(name: 'isAudioFilterable')
final bool? isAudioFilterable;
@JsonKey(name: 'enableMultipath')
final bool? enableMultipath;
@JsonKey(name: 'uplinkMultipathMode')
final MultipathMode? uplinkMultipathMode;
@JsonKey(name: 'downlinkMultipathMode')
final MultipathMode? downlinkMultipathMode;
@JsonKey(name: 'preferMultipathType')
final MultipathType? preferMultipathType;
@JsonKey(name: 'parameters')
final String? parameters;
factory ChannelMediaOptions.fromJson(Map<String, dynamic> json) =>
_$ChannelMediaOptionsFromJson(json);
Map<String, dynamic> toJson() => _$ChannelMediaOptionsToJson(this);
}RtcConnection
publishMicrophoneTrack
publishCustomAudioTrack
publishMediaPlayerAudioTrack
true
publishCameraTrack
publishScreenCaptureVideo、
publishScreenTrack、
publishCustomVideoTrack
publishEncodedVideoTrack
true
注: 建议你根据业务场景自行设置成员参数值,否则 SDK 会自动对成员参数进行赋值。
属性
| 参数名 | 描述 |
|---|---|
publishCameraTrack | |
publishSecondaryCameraTrack | |
publishMicrophoneTrack | |
publishThirdCameraTrack | |
publishFourthCameraTrack | |
publishScreenTrack | |
publishScreenCaptureVideo | |
publishScreenCaptureAudio | |
publishSecondaryScreenTrack | |
publishThirdScreenTrack | |
publishFourthScreenTrack | |
publishTranscodedVideoTrack | |
publishMixedAudioTrack | |
publishLipSyncTrack | |
publishCustomAudioTrack | |
publishCustomAudioTrackId | 待发布的自定义音频轨道的 ID,默认值为 0。你可以通过 createCustomAudioTrack 方法来获取自定义音频轨道 ID。 |
publishCustomVideoTrack | |
publishEncodedVideoTrack | |
publishMediaPlayerAudioTrack | |
publishMediaPlayerVideoTrack | |
autoSubscribeAudio | |
autoSubscribeVideo | |
enableAudioRecordingOrPlayout | |
publishMediaPlayerId | |
clientRoleType | 用户角色。详见 ClientRoleType。 |
audienceLatencyLevel | 观众端延时级别。详见 AudienceLatencyLevelType。 |
defaultVideoStreamType | 默认订阅的视频流类型: VideoStreamType。 |
channelProfile | 频道使用场景。详见 ChannelProfileType。 |
audioDelayMs | |
token | (可选)在服务端生成的用于鉴权的动态密钥。详见使用 Token 鉴权。 注:
|
publishRhythmPlayerTrack | |
isInteractiveAudience | 注:
是否开启互动观众模式:
|
customVideoTrackId | 调用 createCustomVideoTrack 方法返回的视频轨道 ID。默认值为 0。 |
isAudioFilterable | |
enableMultipath | |
preferMultipathType |