Skip to content

Commit

Permalink
Unconditionally set some tracks to visible initially
Browse files Browse the repository at this point in the history
Fixes #573.
  • Loading branch information
JulianKniephoff committed Feb 25, 2022
1 parent e3634cd commit cd78913
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions frontend/js/annotation-tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,17 @@ define(
// function to conclude the retrieve of annotations
var concludeInitialization = _.bind(function () {

var tracks = this.video.get("tracks");

tracks.showTracks(
tracks.filter(function (track) {
return track.isMine()
|| track.get("access") === ACCESS.SHARED_WITH_EVERYONE;
})
);

// At least one private track should exist, we select the first one
var selectedTrack = this.video.get("tracks").filter(util.caller("isMine"))[0];
var selectedTrack = tracks.filter(util.caller("isMine"))[0];

if (!selectedTrack.get("id")) {
selectedTrack.on("ready", concludeInitialization, this);
Expand Down Expand Up @@ -230,12 +239,6 @@ define(
success: concludeInitialization
});
} else {
tracks.showTracks(
tracks.filter(function (track) {
return track.isMine()
|| track.get("access") === ACCESS.SHARED_WITH_EVERYONE;
})
);
concludeInitialization();
}
}, this);
Expand Down

0 comments on commit cd78913

Please sign in to comment.