Fix: Visibility Optimization randomly not working (#65)
* use widget id instead of state id * ignore local video view events * switch remote view visibility also * use Key for a reliable id * remove local check * clean up * redesign * check mounted * remove mount check * more optimization * quick wake up * mark internal * rename to adaptiveStream
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter_webrtc/flutter_webrtc.dart' as rtc;
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:visibility_detector/visibility_detector.dart';
|
||||
|
||||
import '../events.dart';
|
||||
import '../proto/livekit_models.pb.dart' as lk_models;
|
||||
@@ -59,18 +58,6 @@ class TrackStreamUpdatedEvent with TrackEvent, InternalEvent {
|
||||
});
|
||||
}
|
||||
|
||||
@internal
|
||||
class TrackVisibilityUpdatedEvent with TrackEvent, InternalEvent {
|
||||
final String rendererId;
|
||||
final Track track;
|
||||
final VisibilityInfo? info; // null means disposed
|
||||
const TrackVisibilityUpdatedEvent({
|
||||
required this.rendererId,
|
||||
required this.track,
|
||||
required this.info,
|
||||
});
|
||||
}
|
||||
|
||||
// Used to notify muted state from Track to TrackPublication.
|
||||
@internal
|
||||
class InternalTrackMuteUpdatedEvent with TrackEvent, InternalEvent {
|
||||
|
||||
@@ -1,22 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
@internal
|
||||
@immutable
|
||||
class RendererVisibility {
|
||||
final String rendererId;
|
||||
final String trackId;
|
||||
final bool visible;
|
||||
final Size size;
|
||||
const RendererVisibility({
|
||||
required this.rendererId,
|
||||
required this.trackId,
|
||||
required this.visible,
|
||||
required this.size,
|
||||
});
|
||||
}
|
||||
|
||||
@internal
|
||||
@immutable
|
||||
class RTCOfferOptions {
|
||||
|
||||
Reference in New Issue
Block a user