loginLiveRoom method
Future<Map<String, dynamic> >
loginLiveRoom({
- required int channelType,
- required String channelId,
- required String userId,
- required String appId,
- required String appSecret,
- String? viewerName,
- 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 ?? {});
}