VRFS-2874 : Initial analytics for playing JamTracks in a session attended by multiple participants.
This commit is contained in:
parent
34edd24972
commit
6784c750ce
|
|
@ -13,6 +13,7 @@
|
|||
var modUtils = context.JK.ModUtils;
|
||||
var logger = context.JK.logger;
|
||||
var self = this;
|
||||
var trackedJamPlay=false;
|
||||
|
||||
var defaultParticipant = {
|
||||
tracks: [{
|
||||
|
|
@ -2650,7 +2651,7 @@
|
|||
text: "Unable to open your JamTrack. Please contact support@jamkazam.com"
|
||||
}, null, true);
|
||||
} else {
|
||||
rest.playJamTrack(jamTrack.id);
|
||||
playJamTrack(jamTrack.id);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -2669,6 +2670,23 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
function playJamTrack(jamTrackId) {
|
||||
var participantCnt=sessionModel.participants().length
|
||||
rest.playJamTrack(jamTrack.id)
|
||||
if(!trackedJamPlay && participantCnt > 1) {
|
||||
context.stats.write('web.jamtrack.play', {
|
||||
category: "JamTrackGlobal",
|
||||
value: 1,
|
||||
action: "PublicPerformance",
|
||||
optional_label: "InSession",
|
||||
session_size: participantCnt,
|
||||
user_id: context.JK.currentUserId,
|
||||
user_name: context.JK.currentUserName
|
||||
})
|
||||
trackedJamPlay=true
|
||||
}// if
|
||||
}// function
|
||||
|
||||
function openBackingTrackFile(e) {
|
||||
|
||||
// just ignore the click if they are currently recording for now
|
||||
|
|
@ -2681,6 +2699,12 @@
|
|||
return false;
|
||||
} else {
|
||||
context.jamClient.openBackingTrackFile(sessionModel.backing_track)
|
||||
context.stats.write('web.backingtrack.open', {
|
||||
value: 1,
|
||||
session_size: participantCnt,
|
||||
user_id: context.JK.currentUserId,
|
||||
user_name: context.JK.currentUserName
|
||||
})
|
||||
//context.JK.CurrentSessionModel.refreshCurrentSession(true);
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue