RemoteTrackPublication<T extends RemoteTrack> constructor
RemoteTrackPublication<T extends RemoteTrack>(- {required RemoteParticipant participant,
- required TrackInfo info,
- T? track}
)
Implementation
RemoteTrackPublication({
required this.participant,
required lk_models.TrackInfo info,
T? track,
}) : super(info: info) {
logger.fine('RemoteTrackPublication.init track: $track, info: $info');
// register dispose func
onDispose(() async {
_cancelPendingTrackSettingsUpdateRequest?.call();
_visibilityTimer?.cancel();
// this object is responsible for disposing track
await this.track?.dispose();
});
_setPendingTrackSettingsUpdateRequest = Utils.createDebounceFunc(
_sendPendingTrackSettingsUpdateRequest,
cancelFunc: (func) => _cancelPendingTrackSettingsUpdateRequest = func,
wait: const Duration(milliseconds: 1500),
);
updateTrack(track);
}