Merge pull request #522 from jitsi/fix_lib_rename

Fixes the compatability with lib-jitsi-meet for TRACK_REMOVED events for remote track to use peerconnection event instead of relying on TRACK_STOPPED event.
This commit is contained in:
damencho 2016-03-07 11:22:22 -06:00
commit 6b5a52926a
2 changed files with 5 additions and 5 deletions

View File

@ -539,7 +539,7 @@ export default {
if (localVideo) {
// this calls room.removeTrack internally
// so we don't need to remove it manually
promise = localVideo.stop();
promise = localVideo.dispose();
}
localVideo = stream;
@ -575,7 +575,7 @@ export default {
if (localAudio) {
// this calls room.removeTrack internally
// so we don't need to remove it manually
promise = localAudio.stop();
promise = localAudio.dispose();
}
localAudio = stream;
@ -612,7 +612,7 @@ export default {
if (shareScreen) {
createDesktopTrack().then(([stream]) => {
stream.on(
TrackEvents.TRACK_STOPPED,
TrackEvents.LOCAL_TRACK_STOPPED,
() => {
// if stream was stopped during screensharing session
// then we should switch to video

View File

@ -193,9 +193,9 @@ LocalVideo.prototype.changeVideo = function (stream) {
let endedHandler = () => {
localVideoContainer.removeChild(localVideo);
this.VideoLayout.updateRemovedVideo(this.id);
stream.off(TrackEvents.TRACK_STOPPED, endedHandler);
stream.off(TrackEvents.LOCAL_TRACK_STOPPED, endedHandler);
};
stream.on(TrackEvents.TRACK_STOPPED, endedHandler);
stream.on(TrackEvents.LOCAL_TRACK_STOPPED, endedHandler);
};
export default LocalVideo;