participant to parent (TrackPublication)
This commit is contained in:
@@ -76,7 +76,11 @@ class LocalParticipant extends Participant {
|
||||
);
|
||||
await engine.negotiate();
|
||||
|
||||
final pub = LocalTrackPublication<LocalAudioTrack>(trackInfo, track, this);
|
||||
final pub = LocalTrackPublication<LocalAudioTrack>(
|
||||
participant: this,
|
||||
info: trackInfo,
|
||||
track: track,
|
||||
);
|
||||
addTrackPublication(pub);
|
||||
|
||||
[events, roomEvents].emit(LocalTrackPublishedEvent(
|
||||
@@ -159,7 +163,11 @@ class LocalParticipant extends Participant {
|
||||
);
|
||||
await engine.negotiate();
|
||||
|
||||
final pub = LocalTrackPublication<LocalVideoTrack>(trackInfo, track, this);
|
||||
final pub = LocalTrackPublication<LocalVideoTrack>(
|
||||
participant: this,
|
||||
info: trackInfo,
|
||||
track: track,
|
||||
);
|
||||
addTrackPublication(pub);
|
||||
|
||||
[events, roomEvents].emit(LocalTrackPublishedEvent(
|
||||
|
||||
@@ -143,9 +143,15 @@ class RemoteParticipant extends Participant {
|
||||
if (pub == null) {
|
||||
final RemoteTrackPublication pub;
|
||||
if (trackInfo.type == lk_models.TrackType.VIDEO) {
|
||||
pub = RemoteTrackPublication<RemoteVideoTrack>(trackInfo, this);
|
||||
pub = RemoteTrackPublication<RemoteVideoTrack>(
|
||||
participant: this,
|
||||
info: trackInfo,
|
||||
);
|
||||
} else if (trackInfo.type == lk_models.TrackType.AUDIO) {
|
||||
pub = RemoteTrackPublication<RemoteAudioTrack>(trackInfo, this);
|
||||
pub = RemoteTrackPublication<RemoteAudioTrack>(
|
||||
participant: this,
|
||||
info: trackInfo,
|
||||
);
|
||||
} else {
|
||||
throw UnexpectedStateException('Unknown track type');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user