Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/src/core/engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ class Engine extends Disposable with EventsEmittable<EngineEvent> {
completer.completeError('Engine disconnected');
}
}

events.once<EngineClosingEvent>((e) => onClosing());

while (!_dcBufferStatus[kind]!) {
Expand Down
12 changes: 8 additions & 4 deletions lib/src/core/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
final bool audioEnabled = audio.enabled == true || audio.track != null;
if (audioEnabled) {
if (audio.track != null) {
await _localParticipant!.publishAudioTrack(audio.track as LocalAudioTrack,
await _localParticipant!.publishAudioTrack(
audio.track as LocalAudioTrack,
publishOptions: roomOptions.defaultAudioPublishOptions);
} else {
await _localParticipant!.setMicrophoneEnabled(true,
Expand All @@ -459,7 +460,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
final bool videoEnabled = video.enabled == true || video.track != null;
if (videoEnabled) {
if (video.track != null) {
await _localParticipant!.publishVideoTrack(video.track as LocalVideoTrack,
await _localParticipant!.publishVideoTrack(
video.track as LocalVideoTrack,
publishOptions: roomOptions.defaultVideoPublishOptions);
} else {
await _localParticipant!.setCameraEnabled(true,
Expand All @@ -468,7 +470,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
}

final screen = options.screen;
final bool screenEnabled = screen.enabled == true || screen.track != null;
final bool screenEnabled =
screen.enabled == true || screen.track != null;
if (screenEnabled) {
if (screen.track != null) {
await _localParticipant!.publishVideoTrack(
Expand Down Expand Up @@ -1340,7 +1343,8 @@ extension DataStreamRoomMethods on Room {
? streamHeader.textHeader.generated
: false,
operationType: streamHeader.textHeader.hasOperationType()
? TextStreamOperationType.fromPBType(streamHeader.textHeader.operationType)
? TextStreamOperationType.fromPBType(
streamHeader.textHeader.operationType)
: null,
);

Expand Down
3 changes: 1 addition & 2 deletions lib/src/data_stream/stream_writer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import '../types/data_stream.dart';
import '../types/other.dart';
import '../utils.dart';


class BaseStreamWriter<T, InfoType extends BaseStreamInfo> {
final StreamWriter<T> writableStream;
Function()? onClose;
Expand Down Expand Up @@ -49,7 +48,7 @@ class WritableStream<T> implements StreamWriter<T> {
int chunkId = 0;
List<String>? destinationIdentities;
Engine engine;

WritableStream({
required this.streamId,
required this.engine,
Expand Down
11 changes: 6 additions & 5 deletions lib/src/e2ee/e2ee_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,12 @@ class E2EEManager {
{required RTCRtpSender sender,
required String identity,
required String sid}) async {
final frameCryptor = await frameCryptorFactory.createFrameCryptorForRtpSender(
participantId: identity,
sender: sender,
algorithm: _algorithm,
keyProvider: _keyProvider.keyProvider);
final frameCryptor =
await frameCryptorFactory.createFrameCryptorForRtpSender(
participantId: identity,
sender: sender,
algorithm: _algorithm,
keyProvider: _keyProvider.keyProvider);
_frameCryptors[{identity: sid}] = frameCryptor;
await frameCryptor.setEnabled(_enabled);
logger.info(
Expand Down
8 changes: 7 additions & 1 deletion lib/src/participant/local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ import '../types/other.dart';
import '../types/participant_permissions.dart';
import '../types/rpc.dart';
import '../types/video_dimensions.dart';
import '../utils.dart' show buildStreamId, mimeTypeToVideoCodecString, Utils, compareVersions, isSVCCodec;
import '../utils.dart'
show
buildStreamId,
mimeTypeToVideoCodecString,
Utils,
compareVersions,
isSVCCodec;
import 'participant.dart';

/// Represents the current participant in the room. Instance of [LocalParticipant] is automatically
Expand Down
3 changes: 2 additions & 1 deletion lib/src/participant/remote.dart
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ class RemoteParticipant extends Participant<RemoteTrackPublication> {
final newPubs = <RemoteTrackPublication>{};

for (final trackInfo in info.tracks) {
final RemoteTrackPublication? pub = getTrackPublicationBySid(trackInfo.sid);
final RemoteTrackPublication? pub =
getTrackPublicationBySid(trackInfo.sid);
if (pub == null) {
final RemoteTrackPublication pub;
if (trackInfo.type == lk_models.TrackType.VIDEO) {
Expand Down
18 changes: 12 additions & 6 deletions lib/src/proto/google/protobuf/timestamp.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,14 @@ class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin {
factory Timestamp.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory Timestamp.fromJson($core.String json, [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
factory Timestamp.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Timestamp',
package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'Timestamp',
package:
const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),
createEmptyInstance: create,
toProto3Json: $mixin.TimestampMixin.toProto3JsonHelper,
fromProto3Json: $mixin.TimestampMixin.fromProto3JsonHelper)
Expand All @@ -164,7 +167,8 @@ class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin {
Timestamp createEmptyInstance() => create();
static $pb.PbList<Timestamp> createRepeated() => $pb.PbList<Timestamp>();
@$core.pragma('dart2js:noInline')
static Timestamp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Timestamp>(create);
static Timestamp getDefault() =>
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Timestamp>(create);
static Timestamp? _defaultInstance;

/// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
Expand Down Expand Up @@ -203,5 +207,7 @@ class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin {
}
}

const $core.bool _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
const $core.bool _omitFieldNames =
$core.bool.fromEnvironment('protobuf.omit_field_names');
const $core.bool _omitMessageNames =
$core.bool.fromEnvironment('protobuf.omit_message_names');
Loading
Loading