loginLiveRoom method

  1. @override
Future<Map<String, dynamic>> loginLiveRoom({
  1. required int channelType,
  2. required String channelId,
  3. required String userId,
  4. required String appId,
  5. required String appSecret,
  6. String? viewerName,
  7. String? viewerAvatar,
})
override

登录并进入保利威原生直播观看页。

channelType 预留参数,当前版本请传 0 channelId 频道 ID userId 用户 ID appId AppId appSecret AppSecret viewerName 观众昵称,默认使用 userId viewerAvatar 观众头像,默认空字符串

Implementation

@override
Future<Map<String, dynamic>> loginLiveRoom({
  required int channelType,
  required String channelId,
  required String userId,
  required String appId,
  required String appSecret,
  String? viewerName,
  String? viewerAvatar,
}) async {
  final result = await methodChannel.invokeMethod<Map>('loginLiveRoom', {
    'channelType': channelType,
    'channelId': channelId,
    'userId': userId,
    'appId': appId,
    'appSecret': appSecret,
    'viewerName': ?viewerName,
    'viewerAvatar': ?viewerAvatar,
  });
  return Map<String, dynamic>.from(result ?? {});
}