diff --git a/web/app/assets/javascripts/accounts.js b/web/app/assets/javascripts/accounts.js
index f4db5fff3..91454c046 100644
--- a/web/app/assets/javascripts/accounts.js
+++ b/web/app/assets/javascripts/accounts.js
@@ -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) {
diff --git a/web/app/assets/javascripts/fakeJamClient.js b/web/app/assets/javascripts/fakeJamClient.js
index 1157bc981..98468defb 100644
--- a/web/app/assets/javascripts/fakeJamClient.js
+++ b/web/app/assets/javascripts/fakeJamClient.js
@@ -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;
diff --git a/web/app/assets/javascripts/session.js b/web/app/assets/javascripts/session.js
index dadb21870..49e5a1cb1 100644
--- a/web/app/assets/javascripts/session.js
+++ b/web/app/assets/javascripts/session.js
@@ -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()
}
diff --git a/web/app/assets/javascripts/webcam_viewer.js.coffee b/web/app/assets/javascripts/webcam_viewer.js.coffee
index f19e5ebd9..ed2b1d772 100644
--- a/web/app/assets/javascripts/webcam_viewer.js.coffee
+++ b/web/app/assets/javascripts/webcam_viewer.js.coffee
@@ -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()
diff --git a/web/app/views/clients/_account.html.erb b/web/app/views/clients/_account.html.erb
index 49e9472ac..aff5520fc 100644
--- a/web/app/views/clients/_account.html.erb
+++ b/web/app/views/clients/_account.html.erb
@@ -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) %>
video gear:
diff --git a/web/app/views/clients/_session.html.slim b/web/app/views/clients/_session.html.slim
index 0dbbde59b..06006845e 100644
--- a/web/app/views/clients/_session.html.slim
+++ b/web/app/views/clients/_session.html.slim
@@ -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
diff --git a/web/app/views/clients/wizard/gear/_gear_wizard.html.haml b/web/app/views/clients/wizard/gear/_gear_wizard.html.haml
index a26224413..df46ae1e5 100644
--- a/web/app/views/clients/wizard/gear/_gear_wizard.html.haml
+++ b/web/app/views/clients/wizard/gear/_gear_wizard.html.haml
@@ -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
diff --git a/web/app/views/dialogs/_recordingFinishedDialog.html.haml b/web/app/views/dialogs/_recordingFinishedDialog.html.haml
index 9870e4943..66e1cffa2 100644
--- a/web/app/views/dialogs/_recordingFinishedDialog.html.haml
+++ b/web/app/views/dialogs/_recordingFinishedDialog.html.haml
@@ -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
diff --git a/web/app/views/users/_user_dropdown.html.erb b/web/app/views/users/_user_dropdown.html.erb
index 75af674db..29ffca473 100644
--- a/web/app/views/users/_user_dropdown.html.erb
+++ b/web/app/views/users/_user_dropdown.html.erb
@@ -22,7 +22,7 @@
<% if current_user && current_user.musician? %>
<% class_val = current_user.affiliate_partner.present? ? 'audio' : 'audio account-menu-group' %>
<%= link_to "Audio Gear", '/client#/account/audio' %>
- <% 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) %>
<%= link_to "Video Gear", '/client#/account/video' %>
<% end %>
<% end %>
diff --git a/web/config/application.rb b/web/config/application.rb
index 352cf5187..b57464159 100644
--- a/web/config/application.rb
+++ b/web/config/application.rb
@@ -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
diff --git a/web/config/environments/development.rb b/web/config/environments/development.rb
index 51e10582b..2225000ef 100644
--- a/web/config/environments/development.rb
+++ b/web/config/environments/development.rb
@@ -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
diff --git a/web/config/environments/test.rb b/web/config/environments/test.rb
index 7e7ea6d9f..565634690 100644
--- a/web/config/environments/test.rb
+++ b/web/config/environments/test.rb
@@ -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
diff --git a/web/jt_metadata.json b/web/jt_metadata.json
new file mode 100644
index 000000000..c84472c1e
--- /dev/null
+++ b/web/jt_metadata.json
@@ -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"}
\ No newline at end of file
diff --git a/web/spec/features/gear_wizard_spec.rb b/web/spec/features/gear_wizard_spec.rb
index 44badf594..fc9b401b6 100644
--- a/web/spec/features/gear_wizard_spec.rb
+++ b/web/spec/features/gear_wizard_spec.rb
@@ -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