* VRFS-971 adding progress at bottom of fotor
This commit is contained in:
parent
4c35f05826
commit
a400c0f289
|
|
@ -19,8 +19,8 @@ module JamRuby
|
|||
"s3://#{@aws_bucket}/#{filename}"
|
||||
end
|
||||
|
||||
def url(filename)
|
||||
"https://s3.amazonaws.com/#{@aws_bucket}/#{filename}"
|
||||
def url(filename, options = @@def_opts)
|
||||
"http#{options[:secure] ? "s" : ""}://s3.amazonaws.com/#{@aws_bucket}/#{filename}"
|
||||
end
|
||||
|
||||
def upload_sign(filename, content_md5, part_number, upload_id)
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe S3Util do
|
||||
|
||||
describe "sign_url" do
|
||||
pending
|
||||
it "returns something" do
|
||||
pending "until it uses jamkazam-test credentials"
|
||||
S3Util.sign_url("jamkazam-dev", "avatar-tmp/user/image.png").should_not be_nil
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -283,6 +283,10 @@
|
|||
];
|
||||
}
|
||||
|
||||
function RegisterRecordingManagerCallbacks(commandStart, commandProgress, commandStop, commandsChanged) {
|
||||
|
||||
}
|
||||
|
||||
function RegisterRecordingCallbacks(startRecordingCallbackName, stopRecordingCallbackName, startedRecordingCallbackName, stoppedRecordingCallbackName, abortedRecordingCallbackName) {
|
||||
fakeJamClientRecordings.RegisterRecordingCallbacks(startRecordingCallbackName, stopRecordingCallbackName, startedRecordingCallbackName,stoppedRecordingCallbackName, abortedRecordingCallbackName);
|
||||
}
|
||||
|
|
@ -633,6 +637,7 @@
|
|||
this.SessionAddTrack = SessionAddTrack;
|
||||
this.SessionGetControlState = SessionGetControlState;
|
||||
this.SessionGetIDs = SessionGetIDs;
|
||||
this.RegisterRecordingManagerCallbacks = RegisterRecordingManagerCallbacks;
|
||||
this.RegisterRecordingCallbacks = RegisterRecordingCallbacks;
|
||||
this.SessionRegisterCallback = SessionRegisterCallback;
|
||||
this.SessionSetAlertCallback = SessionSetAlertCallback;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Static functions for creating pagination
|
||||
* Playback widget (play, pause , etc)
|
||||
*/
|
||||
(function(context, $) {
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,123 @@
|
|||
/**
|
||||
* Recording Manager viewer
|
||||
* Although multiple instances could be made, only one should be
|
||||
*/
|
||||
(function(context, $) {
|
||||
|
||||
"use strict";
|
||||
|
||||
context.JK = context.JK || {};
|
||||
|
||||
context.JK.RecordingManager = function(){
|
||||
|
||||
var $parentElement = $('#recording-manager-viewer');
|
||||
|
||||
var logger = context.JK.logger;
|
||||
if($parentElement.length == 0) {
|
||||
logger.debug("no $parentElement specified in RecordingManager");
|
||||
}
|
||||
|
||||
var $downloadCommand = $('#recording-manager-download', $parentElement);
|
||||
var $downloadPercent = $('#recording-manager-download .percent', $parentElement);
|
||||
var $uploadCommand = $('#recording-manager-upload', $parentElement);
|
||||
var $uploadPercent = $('#recording-manager-upload .percent', $parentElement);
|
||||
var $convertCommand = $('#recording-manager-convert', $parentElement);
|
||||
var $convertPercent = $('#recording-manager-convert .percent', $parentElement);
|
||||
|
||||
// keys come from backend
|
||||
var lookup = {
|
||||
SyncDownload: { command: $downloadCommand, percent: $downloadPercent },
|
||||
SyncUpload: { command: $uploadCommand, percent: $uploadPercent },
|
||||
SyncConvert: { command: $convertCommand, percent: $convertPercent }
|
||||
}
|
||||
|
||||
var $self = $(this);
|
||||
|
||||
|
||||
function renderStartCommand($command) {
|
||||
$command.css('visibility', 'visible');
|
||||
}
|
||||
|
||||
function renderEndCommand($command) {
|
||||
$command.css('visibility', 'hidden');
|
||||
}
|
||||
|
||||
function renderPercentage($percent, value) {
|
||||
$percent.text(Math.round(value * 100));
|
||||
}
|
||||
|
||||
function onStartCommand(id, type) {
|
||||
var command = lookup[type];
|
||||
if(!command) { return }
|
||||
|
||||
var existingCommandId = command.command.data('command-id');
|
||||
|
||||
if(existingCommandId && existingCommandId != id) {
|
||||
renderEndCommand(command.command);
|
||||
}
|
||||
|
||||
command.command.data('command-id', id);
|
||||
renderStartCommand(command.command);
|
||||
renderPercentage(command.percent, 0);
|
||||
}
|
||||
|
||||
function onStopCommand(id, type, success, reason, detail) {
|
||||
var command = lookup[type];
|
||||
if(!command) { return }
|
||||
|
||||
var existingCommandId = command.command.data('command-id');
|
||||
|
||||
if(!existingCommandId) {
|
||||
command.command.data('command-id', id);
|
||||
renderStartCommand(command.command);
|
||||
}
|
||||
else if(existingCommandId && existingCommandId != id) {
|
||||
renderEndCommand(command.command);
|
||||
command.command.data('command-id', id);
|
||||
renderStartCommand(command.command);
|
||||
}
|
||||
|
||||
renderPercentage(command.percent, 1);
|
||||
renderEndCommand(command.command);
|
||||
command.command.data('command-id', null);
|
||||
}
|
||||
|
||||
function onCommandProgress(id, type, progress) {
|
||||
var command = lookup[type];
|
||||
if(!command) { return }
|
||||
|
||||
var existingCommandId = command.command.data('command-id');
|
||||
|
||||
if(!existingCommandId) {
|
||||
command.command.data('command-id', id);
|
||||
renderStartCommand(command.command);
|
||||
}
|
||||
else if(existingCommandId && existingCommandId != id) {
|
||||
renderEndCommand(command.command);
|
||||
command.command.data('command-id', id);
|
||||
renderStartCommand(command.command);
|
||||
}
|
||||
|
||||
renderPercentage(command.percent, progress);
|
||||
}
|
||||
|
||||
function onCommandsChanged(id, type) {
|
||||
|
||||
}
|
||||
|
||||
context.JK.RecordingManagerCommandStart = onStartCommand;
|
||||
context.JK.RecordingManagerCommandStop = onStopCommand;
|
||||
context.JK.RecordingManagerCommandProgress = onCommandProgress;
|
||||
context.JK.RecordingManagerCommandsChanged = onCommandsChanged;
|
||||
|
||||
context.jamClient.RegisterRecordingManagerCallbacks(
|
||||
"JK.RecordingManagerCommandStart",
|
||||
"JK.RecordingManagerCommandProgress",
|
||||
"JK.RecordingManagerCommandStop",
|
||||
"JK.RecordingManagerCommandsChanged"
|
||||
|
||||
)
|
||||
|
||||
return this;
|
||||
}
|
||||
})(window, jQuery);
|
||||
|
|
@ -590,7 +590,7 @@
|
|||
|
||||
var recordedTracks = sessionModel.recordedTracks();
|
||||
|
||||
console.log("recorded tracks=%o local_media_mixers=%o", recordedTracks, localMediaMixers);
|
||||
console.log("recorded tracks=%o local media=%o", recordedTracks, localMediaMixers);
|
||||
|
||||
if(recordedTracks && localMediaMixers.length == 0) {
|
||||
// if we are the creator, then rather than raise an error, tell the server the recording is over.
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
*= require ./header
|
||||
#= require ./user_dropdown
|
||||
*= require ./footer
|
||||
*= require ./recordingManager
|
||||
*= require ./screen_common
|
||||
*= require ./notify
|
||||
*= require ./dialog
|
||||
|
|
|
|||
|
|
@ -1,34 +1,35 @@
|
|||
#client_update {
|
||||
display:none;
|
||||
|
||||
.progress-bar {
|
||||
width:100%;
|
||||
background-color:#000;
|
||||
border: solid 1px #ED3618;
|
||||
height:22px;
|
||||
}
|
||||
|
||||
#progress-bar {
|
||||
width:0%;
|
||||
}
|
||||
|
||||
.progress-bar-progress {
|
||||
background-color:#ED3618;
|
||||
border:solid 1px #000;
|
||||
height:20px;
|
||||
display:block;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight:bold;
|
||||
font-size:x-large;
|
||||
}
|
||||
|
||||
#client-updater-updating #update-steps {
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
#client-updater-updating span.status {
|
||||
color:white;
|
||||
}
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
width:100%;
|
||||
background-color:#000;
|
||||
border: solid 1px #ED3618;
|
||||
height:22px;
|
||||
}
|
||||
|
||||
#progress-bar {
|
||||
width:0%;
|
||||
}
|
||||
|
||||
.progress-bar-progress {
|
||||
background-color:#ED3618;
|
||||
border:solid 1px #000;
|
||||
height:20px;
|
||||
display:block;
|
||||
}
|
||||
|
||||
#client_update h2 {
|
||||
font-weight:bold;
|
||||
font-size:x-large;
|
||||
}
|
||||
|
||||
#client-updater-updating #update-steps {
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
#client-updater-updating span.status {
|
||||
color:white;
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
#recording-manager-viewer {
|
||||
|
||||
color: #CCCCCC;
|
||||
font-size: 11px;
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
left: 25%;
|
||||
width: 50%;
|
||||
|
||||
.recording-manager-command {
|
||||
box-sizing: border-box;
|
||||
width:33%;
|
||||
margin:5px 10px;
|
||||
visibility: hidden;
|
||||
|
||||
.percent {
|
||||
margin-left:3px;
|
||||
}
|
||||
|
||||
.percent:after {
|
||||
content:"%";
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
width:100%;
|
||||
background-color:#000;
|
||||
border: solid 1px #ED3618;
|
||||
height:22px;
|
||||
display:inline;
|
||||
}
|
||||
|
||||
.progress-bar-progress {
|
||||
background-color:#ED3618;
|
||||
border:solid 1px #000;
|
||||
height:20px;
|
||||
display:block;
|
||||
width:0%;
|
||||
display:inline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
<!-- start footer -->
|
||||
<div id="footer">
|
||||
|
||||
<%= render "recordingManager" %>
|
||||
|
||||
<!-- copyright -->
|
||||
<div id="copyright">Copyright © 2013 JamKazam, Inc. All Rights Reserved</div>
|
||||
|
||||
<!-- footer links -->
|
||||
|
||||
<div id="footer-links">
|
||||
<%= link_to "about", corp_about_path , :rel=>"external" %> | <%= link_to "news", corp_news_path , :rel=>"external" %> | <%= link_to "media", corp_media_center_path , :rel=>"external" %> | <%= link_to "contact", corp_contact_path , :rel=>"external" %> | <%= link_to "privacy", corp_privacy_path, :rel=>"external" %> | <%= link_to "terms of service", corp_terms_path , :rel=>"external" %> | <%= link_to "help", corp_help_path , :rel=>"external" %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
<span id="recording-manager-viewer">
|
||||
<span id="recording-manager-convert" class="recording-manager-command">
|
||||
<span>converting</span><span class="percent">0</span>
|
||||
</span>
|
||||
<span id="recording-manager-upload" class="recording-manager-command">
|
||||
<span>uploading</span><span class="percent">0</span>
|
||||
</span>
|
||||
<span id="recording-manager-download" class="recording-manager-command">
|
||||
<span>downloading</span><span class="percent">0</span>
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -91,6 +91,8 @@
|
|||
// Some things can't be initialized until we're connected. Put them here.
|
||||
function _initAfterConnect() {
|
||||
|
||||
var recordingManager = new JK.RecordingManager();
|
||||
|
||||
var invitationDialog = new JK.InvitationDialog(JK.app);
|
||||
invitationDialog.initialize();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue