Video optimizations (#18)

* use events for `VideoTrackRenderer`

* logger

* implemented visibility detection

* optimize code with 1 param debounce func

* stop pending visibility event when disposed

* clean up

* mark internal

* report to track

* call dispose on pub and track

* use internal events to receive visibility events

* clean up visibility for disposed track

* listen to track visibility events on pub

* re-design

* quickly re-enable

* clean up

* clean up
This commit is contained in:
Hiroshi Horie
2021-10-25 18:34:02 +09:00
committed by GitHub
parent bf1322642b
commit 16910cae25
18 changed files with 314 additions and 95 deletions
+1
View File
@@ -13,6 +13,7 @@ mixin _Disposer {
final _disposeFuncs = <OnDisposeFunc>[];
bool _isDisposed = false;
bool get isDisposed => _isDisposed;
int get disposeFuncCount => _disposeFuncs.length;
// last added func will be called first when disposing
void onDispose(OnDisposeFunc func) => _disposeFuncs.add(func);