VRFS-2730 : Hook up jamtrack looping.

This commit is contained in:
Steven Miers 2015-02-01 17:59:34 -06:00
parent 2abd597610
commit eff19235c3
5 changed files with 43 additions and 2 deletions

View File

@ -87,7 +87,7 @@
// tell the server we are about to open a backing track:
rest.openBackingTrack({id: context.JK.CurrentSessionModel.id(), backing_track_path: backingTrack.name})
.done(function(response) {
var result = context.jamClient.SessionOpenBackingTrackFile(backingTrack.name);
var result = context.jamClient.SessionOpenBackingTrackFile(backingTrack.name, false);
console.log("BackingTrackPlay response: %o", result);
// TODO: Possibly actually check the result. Investigate
@ -110,6 +110,11 @@
context.JK.helpBubble($whatAreBackingTracks, 'no help yet for this topic', {}, {positions:['bottom'], offsetParent: $dialog})
$whatAreBackingTracks.on('click', false) // no help yet
$displayAudioFileFolder.on('click', function(e) {
e.stopPropagation();
context.jamClient.OpenBackingTracksDirectory();
})
}
function initialize(){

View File

@ -727,10 +727,15 @@
function SetScoreWorkTimingInterval(knobs) {return true;}
function SessionOpenBackingTrackFile(path, loop) {
backingTrackPath=path
backingTrackPath = path
backingTrackLoop = loop
}
function SessionSetBackingTrackFileLoop(path, loop) {
backingTrackPath = path
backingTrackLoop = loop
}
function SessionCloseBackingTrackFile(path) {
backingTrackPath=""
}
@ -1055,6 +1060,7 @@
this.getBackingTrackList = getBackingTrackList;
this.SessionCloseBackingTrackFile = SessionCloseBackingTrackFile;
this.SessionOpenBackingTrackFile = SessionOpenBackingTrackFile;
this.SessionSetBackingTrackFileLoop = SessionSetBackingTrackFileLoop;
this.SessionCloseMetronome = SessionCloseMetronome;
this.SessionOpenMetronome = SessionOpenMetronome;

View File

@ -945,6 +945,7 @@
latency: "good",
gainPercent: 0,
muteClass: 'muted',
showLoop: true,
mixerId: "",
avatarClass : 'avatar-recording',
preMasteredClass: ""
@ -1691,6 +1692,17 @@
$trackIconMute.data('media-controls-disabled', true).data('media-track-opener', trackData.mediaTrackOpener)
}
if(trackData.showLoop) {
var $trackIconLoop = $track.find('.track-icon-loop')
$trackIconLoop.show()
var loopBtn = $trackIconLoop.find('#loop-button')
loopBtn.on('click', function(event) {
var loop = loopBtn.is(':checked')
console.log("Looping: ", loop);
context.jamClient.SessionSetBackingTrackFileLoop(trackData.name, loop)
})
}
// is this used?
tracks[trackData.trackId] = new context.JK.SessionTrack(trackData.clientId);
}

View File

@ -534,6 +534,22 @@ table.vu td {
text-align: center;
}
.track-icon-loop {
cursor: pointer;
position:absolute;
top:250px;
left:9;
width: 20px;
height: 18px;
// background-image:url('/assets/content/icon_mute.png');
// background-repeat:no-repeat;
text-align: center;
input {
font-size: 8pt;
font-weight: bold;
}
}
.metronome-selects {
position: absolute;
width: 52px;

View File

@ -118,6 +118,8 @@ script#template-session-track[type="text/template"]
img height="45" src="{instrumentIcon}" width="45"
.track-gain mixer-id="{mixerId}"
.track-icon-mute class="{muteClass}" control="mute" mixer-id="{muteMixerId}"
.track-icon-loop.hidden control="loop"
input#loop-button type="checkbox" value="loop" Loop
.track-connection.grey mixer-id="{mixerId}_connection"
CONNECTION
.disabled-track-overlay