[Protocol v7] Remote unpublish & expose permissions (#101)
* fix * impl * oldPermissions * mods
This commit is contained in:
@@ -13,6 +13,7 @@ enum ProtocolVersion {
|
||||
v4,
|
||||
v5,
|
||||
v6, // Session migration
|
||||
v7, // Remote unpublish
|
||||
}
|
||||
|
||||
/// Connection state type used throughout the SDK.
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
import '../proto/livekit_models.pb.dart' as lk_models;
|
||||
|
||||
@immutable
|
||||
class ParticipantPermissions {
|
||||
final bool canSubscribe;
|
||||
final bool canPublish;
|
||||
final bool canPublishData;
|
||||
final bool hidden;
|
||||
final bool recorder;
|
||||
|
||||
const ParticipantPermissions({
|
||||
this.canSubscribe = false,
|
||||
this.canPublish = false,
|
||||
this.canPublishData = false,
|
||||
this.hidden = false,
|
||||
this.recorder = false,
|
||||
});
|
||||
}
|
||||
|
||||
extension ParticipantPermissionExt on lk_models.ParticipantPermission {
|
||||
ParticipantPermissions toLKType() => ParticipantPermissions(
|
||||
canSubscribe: canSubscribe,
|
||||
canPublish: canPublish,
|
||||
canPublishData: canPublishData,
|
||||
hidden: hidden,
|
||||
recorder: recorder,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user