Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop

This commit is contained in:
Seth Call 2015-04-22 15:47:57 -05:00
commit d66f8e50d1
14 changed files with 49 additions and 23 deletions

View File

@ -45,7 +45,7 @@
var invalidProfiles = prettyPrintAudioProfiles(context.JK.getBadConfigMap());
var sessionSummary = summarizeSession(userDetail);
if(gon.global.video_available) {
if(gon.global.video_available && gon.global.video_available!="none" ) {
var webcamName;
var webcam = context.jamClient.FTUECurrentSelectedVideoDevice()
if (webcam == null || typeof(webcam) == "undefined" || Object.keys(webcam).length == 0) {

View File

@ -71,7 +71,7 @@
return ["Built-in Webcam HD"]
}
function FTUECurrentSelectedVideoDevice() {
return "Built-in Webcam HD"
return {"xy323ss": "Built-in Webcam HD"}
}
function FTUEGetAvailableEncodeVideoResolutions() {
return {
@ -80,6 +80,10 @@
}
}
function FTUEGetVideoCaptureDeviceCapabilities() {
return {}
}
function isSessVideoShared() {
return videoShared;
}
@ -1193,6 +1197,8 @@
this.FTUEGetVideoCaptureDeviceNames = FTUEGetVideoCaptureDeviceNames;
this.FTUECurrentSelectedVideoDevice = FTUECurrentSelectedVideoDevice;
this.FTUEGetAvailableEncodeVideoResolutions = FTUEGetAvailableEncodeVideoResolutions;
this.FTUEGetVideoCaptureDeviceCapabilities = FTUEGetVideoCaptureDeviceCapabilities;
this.isSessVideoShared = isSessVideoShared;
this.SessStopVideoSharing = SessStopVideoSharing;

View File

@ -144,7 +144,7 @@
var shareDialog = new JK.ShareDialog(context.JK.app, sessionId, "session");
shareDialog.initialize(context.JK.FacebookHelperInstance);
if(gon.global.video_available) {
if(gon.global.video_available && gon.global.video_available!="none") {
webcamViewer.beforeShow()
}
}
@ -506,7 +506,7 @@
}
function beforeHide(data) {
if(gon.global.video_available) {
if(gon.global.video_available && gon.global.video_available!="none") {
webcamViewer.setVideoOff()
}
@ -3228,7 +3228,7 @@
$fluidTracks = $screen.find('.session-fluidtracks');
$voiceChat = $screen.find('#voice-chat');
$tracksHolder = $screen.find('#tracks')
if(gon.global.video_available) {
if(gon.global.video_available && gon.global.video_available!="none") {
webcamViewer.init($(".webcam-container"))
webcamViewer.setVideoOff()
}

View File

@ -21,12 +21,13 @@ context.JK.WebcamViewer = class WebcamViewer
@webcamSelect.on("change", this.selectWebcam)
@toggleBtn.on 'click', @toggleWebcam
beforeShow:() =>
beforeShow:() =>
this.loadWebCams()
this.selectWebcam()
this.loadResolutions()
this.selectResolution()
@initialScan = true
@client.SessStopVideoSharing()
#client.SessSetInsetPosition(5)
#client.SessSetInsetSize(1)
#client.FTUESetAutoSelectVideoLayout(false)
@ -46,9 +47,9 @@ context.JK.WebcamViewer = class WebcamViewer
if @resolution?
@logger.debug 'Selecting res: ', @resolution
@client.FTUESetVideoEncodeResolution @resolution
if @isVideoShared
this.setVideoOff()
this.toggleWebcam()
# if @isVideoShared
# this.setVideoOff()
# this.toggleWebcam()
setVideoOff:() =>
if this.isVideoShared()

View File

@ -54,7 +54,7 @@
{% } %}
<% if Rails.application.config.video_available || (current_user && current_user.admin) %>
<% if (Rails.application.config.video_available && Rails.application.config.video_available != "none") || (current_user && current_user.admin) %>
<div class="account-left">
<h2>video gear:</h2>

View File

@ -15,7 +15,8 @@
a.button-grey.left[layout-link="share-dialog"]
= image_tag "content/icon_share.png", {:align => "texttop", :height => 12, :width => 12}
| SHARE
- if Rails.application.config.video_available || (current_user && current_user.admin)
- if (Rails.application.config.video_available && Rails.application.config.video_available!="none") || (current_user && current_user.admin)
a#session-webcam.button-grey-toggle.video.left
= image_tag "content/icon_cam.png", {:align => "texttop", :height => 12, :width => 12}
| VIDEO

View File

@ -158,7 +158,7 @@
%span.direct-monitoring-btn Play
-step=4
-if Rails.application.config.video_available || (current_user && current_user.admin)
-if (Rails.application.config.video_available && Rails.application.config.video_available!="none") || (current_user && current_user.admin)
.wizard-step.video-gear{ 'layout-wizard-step' => "#{step+=1}", 'dialog-title' => "Select Video Gear", 'dialog-purpose' => "SelectVideoGear" }
.ftuesteps
.clearall
@ -214,7 +214,7 @@
%a.ftue-stepnumber{'data-step-number' => 4} 5
.ftue-step-title Turn Off Direct Monitoring
-step = 4
-if Rails.application.config.video_available || (current_user && current_user.admin)
-if (Rails.application.config.video_available && Rails.application.config.video_available!="none") || (current_user && current_user.admin)
%a.ftue-stepnumber{'data-step-number' => step+=1}=step+1
.ftue-step-title Select Video Gear
%a.ftue-stepnumber{'data-step-number' => step+=1}=step+1

View File

@ -21,9 +21,9 @@
%br/
%select{:name => "genre"}
.field.w100.left{:purpose => "description"}
%label{:for => "description"} Description:
%label{:for => "description"}=Rails.application.config.video_available
%textarea#claim-recording-description.w100{:name => "description"}
- if Rails.application.config.video_available || (current_user && current_user.admin)
-if (Rails.application.config.video_available=="full") || (current_user && current_user.admin)
.field.left{:purpose => "save_video"}
%input{:checked => "checked", :name => "save_video", :type => "checkbox"}/
%label{:for => "save_video"} Save Video to Computer

View File

@ -22,7 +22,7 @@
<% if current_user && current_user.musician? %>
<% class_val = current_user.affiliate_partner.present? ? 'audio' : 'audio account-menu-group' %>
<li class="audio"><%= link_to "Audio Gear", '/client#/account/audio' %></li>
<% if Rails.application.config.video_available || (current_user && current_user.admin) %>
<% if (Rails.application.config.video_available && Rails.application.config.video_available!="none") || (current_user && current_user.admin) %>
<li class="<%= class_val%>"><%= link_to "Video Gear", '/client#/account/video' %></li>
<% end %>
<% end %>

View File

@ -327,6 +327,6 @@ if defined?(Bundler)
config.recurly_tax_estimate_jam_track_plan = 'jamtrack-acdc-backinblack'
config.minimal_curtain = false
config.video_available = false
config.video_available = "none"
end
end

View File

@ -91,5 +91,5 @@ SampleApp::Application.configure do
config.youtube_app_name = "JamKazamDev"
config.jam_tracks_available=true
config.minimal_curtain = true
config.video_available=false
config.video_available="full"
end

View File

@ -20,6 +20,7 @@ SampleApp::Application.configure do
config.assets.compress = true # Compress precompiled assets
config.assets.compile = true # Refuse to compile assets on-the-fly
config.assets.digest = true
#config.assets.debug = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
@ -105,6 +106,6 @@ SampleApp::Application.configure do
config.recurly_subdomain = 'jamkazam-test'
config.log_level = :debug
config.jam_tracks_available = true
config.video_available = true
config.video_available = "full"
end

1
web/jt_metadata.json Normal file
View File

@ -0,0 +1 @@
{"container_file": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/d20150421-97781-nm4hk4/jam-track-24.jkz", "version": "0", "coverart": null, "rsa_priv_file": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/d20150421-97781-nm4hk4/skey.pem", "tracks": [{"name": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/d20150421-97781-nm4hk4/2d18fa12-7f5e-49cb-909e-54c02ff8917e.ogg", "trackName": "track_00"}], "rsa_pub_file": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/d20150421-97781-nm4hk4/pkey.pem", "jamktrack_info": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/tmpVMfZui"}

View File

@ -1,25 +1,25 @@
require 'spec_helper'
describe "Gear Wizard", :js => true, :type => :feature, :capybara_feature => true, :slow => true do
describe "Gear Wizard", :js => true, :type => :feature, :capybara_feature => true do
subject { page }
let(:user) { FactoryGirl.create(:user) }
before(:each) do
emulate_client
LatencyTester.delete_all
end
before(:all) do
@old_video_available=Rails.application.config.video_available
Rails.application.config.video_available=false
@old_video_available=Rails.application.config.video_available
end
after(:all) do
Rails.application.config.video_available=@old_video_available
end
it "success path" do
def walk_wizard(has_video=false)
FactoryGirl.create(:latency_tester)
fast_signin user, '/client#/account/audio'
find("div.account-audio a[data-purpose='add-profile']").trigger(:click)
@ -61,6 +61,12 @@ describe "Gear Wizard", :js => true, :type => :feature, :capybara_feature => tru
find('.btn-next.button-orange:not(.disabled)').trigger(:click)
# Optional step 6 - configure video
if(has_video)
#find('.ftue-step-title', text: 'Select Video Gear')
find('.btn-next.button-orange:not(.disabled)').trigger(:click)
end
# step 6 - Test Router & Network
find('.ftue-step-title', text: 'Test Router & Network')
find('.button-orange.start-network-test').trigger(:click)
@ -79,5 +85,15 @@ describe "Gear Wizard", :js => true, :type => :feature, :capybara_feature => tru
# and should now be in session
find('h2', text: 'my tracks')
end
it "success path" do
Rails.application.config.video_available="none"
walk_wizard(false)
end
it "success path with video" do
Rails.application.config.video_available="mvp"
walk_wizard(true)
end
end