* VRFS-1330 - load recordings again
This commit is contained in:
parent
ddcbcbdd9e
commit
e01491aa86
|
|
@ -38,6 +38,7 @@
|
|||
var audioDomElement = null;
|
||||
var musicSessionId = null;
|
||||
var waitForBufferingTimeout = null;
|
||||
var fanAccess = null;
|
||||
var retryAttempts = 0;
|
||||
var self = this;
|
||||
|
||||
|
|
@ -381,6 +382,10 @@
|
|||
musicSessionId = $parent.attr('data-music-session');
|
||||
if(!musicSessionId) throw "data-music-session must be specified on $parentElement";
|
||||
|
||||
fanAccess = $parent.attr('fan-access');
|
||||
if(fanAccess === null) throw 'fan-access must be specified in $parentElement';
|
||||
fanAccess = $parent.attr('fan-access') === 'true' // coerce to boolean
|
||||
|
||||
$audio = $('audio', $parent);
|
||||
|
||||
if($audio.length == 0) {
|
||||
|
|
|
|||
|
|
@ -186,7 +186,9 @@
|
|||
});
|
||||
})
|
||||
}, 100);
|
||||
|
||||
}
|
||||
else if(sessionModel.id() && text == 'RebuildMediaControl') {
|
||||
sessionModel.refreshCurrentSession(true);
|
||||
}
|
||||
}
|
||||
else if (type === 19) { // NO_VALID_AUDIO_CONFIG
|
||||
|
|
|
|||
|
|
@ -163,10 +163,10 @@
|
|||
/**
|
||||
* Refresh the current session, and participants.
|
||||
*/
|
||||
function refreshCurrentSession() {
|
||||
function refreshCurrentSession(force) {
|
||||
// XXX use backend instead: https://jamkazam.atlassian.net/browse/VRFS-854
|
||||
//logger.debug("SessionModel.refreshCurrentSession(" + currentSessionId +")");
|
||||
refreshCurrentSessionRest(sessionChanged);
|
||||
refreshCurrentSessionRest(sessionChanged, force);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
* Reload the session data from the REST server, calling
|
||||
* the provided callback when complete.
|
||||
*/
|
||||
function refreshCurrentSessionRest(callback) {
|
||||
function refreshCurrentSessionRest(callback, force) {
|
||||
var url = "/api/sessions/" + currentSessionId;
|
||||
if(requestingSessionRefresh) {
|
||||
// if someone asks for a refresh while one is going on, we ask for another to queue up
|
||||
|
|
@ -213,7 +213,7 @@
|
|||
type: "GET",
|
||||
url: url,
|
||||
success: function(response) {
|
||||
if(currentTrackChanges < response.track_changes_counter) {
|
||||
if(force === true || currentTrackChanges < response.track_changes_counter) {
|
||||
logger.debug("updating current track changes from %o to %o", currentTrackChanges, response.track_changes_counter)
|
||||
currentTrackChanges = response.track_changes_counter;
|
||||
sendClientParticipantChanges(currentSession, response);
|
||||
|
|
@ -232,7 +232,7 @@
|
|||
if(pendingSessionRefresh) {
|
||||
// and when the request is done, if we have a pending, fire it off again
|
||||
pendingSessionRefresh = false;
|
||||
refreshCurrentSessionRest(sessionChanged);
|
||||
refreshCurrentSessionRest(sessionChanged, force);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
/ timeline and controls
|
||||
.right.w40
|
||||
/ recording play controls
|
||||
.session-controls{ class: (feed_item.is_over? ? 'ended' : 'inprogress'), 'data-music-session' => feed_item.id }
|
||||
.session-controls{ class: (feed_item.is_over? ? 'ended' : 'inprogress'), 'data-music-session' => feed_item.id, 'fan-access' => feed_item.fan_access}
|
||||
/ session status
|
||||
%a.left.play-button{href:'#'}
|
||||
= image_tag 'content/icon_playbutton.png', width:20, height:20, class:'play-icon'
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
%audio{preload: 'none'}
|
||||
%source{src: feed_item.music_session.mount.url, type: feed_item.music_session.mount.resolve_string(:mime_type)}
|
||||
.session-status
|
||||
= feed_item.is_over? ? 'SESSION ENDED' : 'SESSION IN PROGRESS'
|
||||
= feed_item.is_over? ? 'SESSION ENDED' : (feed_item.fan_access ? 'SESSION IN PROGRESS' : 'PRIVATE SESSION')
|
||||
/ current playback time
|
||||
= session_duration(feed_item, class: 'session-duration tick-duration recording-current', 'data-created-at' => feed_item.created_at.to_i)
|
||||
/ end recording play controls
|
||||
|
|
|
|||
Loading…
Reference in New Issue