diff --git a/admin/app/admin/jam_ruby_users.rb b/admin/app/admin/jam_ruby_users.rb
index 61a1d3db7..828e6d7f1 100644
--- a/admin/app/admin/jam_ruby_users.rb
+++ b/admin/app/admin/jam_ruby_users.rb
@@ -113,6 +113,21 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
@user.delete_mod(User::MOD_GEAR, User::MOD_GEAR_FRAME_OPTIONS)
end
+
+ if params[:jam_ruby_user][:how_to_use_video_no_show].to_i == 1
+ @user.mod_merge({User::MOD_NO_SHOW => {User::HOWTO_USE_VIDEO_NOSHOW => true}})
+ else
+ @user.delete_mod(User::MOD_NO_SHOW, User::HOWTO_USE_VIDEO_NOSHOW)
+ end
+
+
+ if params[:jam_ruby_user][:configure_video_no_show].to_i == 1
+ @user.mod_merge({User::MOD_NO_SHOW => {User::CONFIGURE_VIDEO_NOSHOW=> true}})
+ else
+ @user.delete_mod(User::MOD_NO_SHOW, User::CONFIGURE_VIDEO_NOSHOW)
+ end
+
+
@user.save!
redirect_to edit_admin_user_path(@user)
diff --git a/admin/app/views/admin/users/_form.html.slim b/admin/app/views/admin/users/_form.html.slim
index 204d9a4da..f8803324d 100644
--- a/admin/app/views/admin/users/_form.html.slim
+++ b/admin/app/views/admin/users/_form.html.slim
@@ -9,4 +9,7 @@
= f.input :musician
= f.inputs "Gear Mods" do
= f.input :show_frame_options, as: :boolean
+ = f.inputs "Do Not Shows" do
+ = f.input :how_to_use_video_no_show, as: :boolean
+ = f.input :configure_video_no_show, as: :boolean
= f.actions
diff --git a/admin/config/initializers/jam_ruby_user.rb b/admin/config/initializers/jam_ruby_user.rb
index 6d7dca153..57435d83f 100644
--- a/admin/config/initializers/jam_ruby_user.rb
+++ b/admin/config/initializers/jam_ruby_user.rb
@@ -27,4 +27,13 @@
def show_frame_options
self.get_gear_mod(MOD_GEAR_FRAME_OPTIONS)
end
+
+
+ def how_to_use_video_no_show
+ self.get_no_show_mod(HOWTO_USE_VIDEO_NOSHOW)
+ end
+
+ def configure_video_no_show
+ self.get_no_show_mod(CONFIGURE_VIDEO_NOSHOW)
+ end
end
diff --git a/ruby/lib/jam_ruby/jam_track_importer.rb b/ruby/lib/jam_ruby/jam_track_importer.rb
index ca5c9172e..403c75330 100644
--- a/ruby/lib/jam_ruby/jam_track_importer.rb
+++ b/ruby/lib/jam_ruby/jam_track_importer.rb
@@ -1774,7 +1774,7 @@ module JamRuby
end
if count > 500
- break
+ #break
end
end
diff --git a/ruby/lib/jam_ruby/models/user.rb b/ruby/lib/jam_ruby/models/user.rb
index 691f03a30..ea72b803c 100644
--- a/ruby/lib/jam_ruby/models/user.rb
+++ b/ruby/lib/jam_ruby/models/user.rb
@@ -24,6 +24,8 @@ module JamRuby
MOD_GEAR_FRAME_OPTIONS = "show_frame_options"
MOD_NO_SHOW = "no_show"
+ HOWTO_USE_VIDEO_NOSHOW = 'how-to-use-video'
+ CONFIGURE_VIDEO_NOSHOW = 'configure-video'
# MIN/MAX AUDIO LATENCY
MINIMUM_AUDIO_LATENCY = 2
diff --git a/web/app/assets/images/content/webcam-icon-gray.png b/web/app/assets/images/content/webcam-icon-gray.png
new file mode 100644
index 000000000..c2b03c469
Binary files /dev/null and b/web/app/assets/images/content/webcam-icon-gray.png differ
diff --git a/web/app/assets/images/content/webcam-icon.png b/web/app/assets/images/content/webcam-icon.png
new file mode 100644
index 000000000..29248197e
Binary files /dev/null and b/web/app/assets/images/content/webcam-icon.png differ
diff --git a/web/app/assets/javascripts/accounts_video_profile.js b/web/app/assets/javascripts/accounts_video_profile.js
index 8d5a64ad7..628b1e870 100644
--- a/web/app/assets/javascripts/accounts_video_profile.js
+++ b/web/app/assets/javascripts/accounts_video_profile.js
@@ -4,7 +4,7 @@
context.JK = context.JK || {};
context.JK.AccountVideoProfile = function (app) {
- var $webcamViewer = new context.JK.WebcamViewer()
+ var webcamViewerReact = null;
function initialize() {
var screenBindings = {
'beforeShow': beforeShow,
@@ -12,16 +12,19 @@
};
app.bindScreen('account/video', screenBindings);
- var $root = $("#account-video-profile .webcam-container")
- $webcamViewer.init($root, true)
+ var reactElement = React.createElement(window.WebcamViewer, {isVisible: false});
+ var reactDomNode = $("#account-video-profile .webcam-container").get(0)
+ webcamViewerReact = React.render(reactElement, reactDomNode)
}
+
function beforeShow() {
- $webcamViewer.beforeShow()
+ console.log("webcamViewerReact", webcamViewerReact)
+ webcamViewerReact.beforeShow()
}
function beforeHide() {
- $webcamViewer.beforeHide()
+ webcamViewerReact.beforeHide()
}
this.beforeShow = beforeShow
diff --git a/web/app/assets/javascripts/backend_alerts.js b/web/app/assets/javascripts/backend_alerts.js
index 348560630..bf5b1993b 100644
--- a/web/app/assets/javascripts/backend_alerts.js
+++ b/web/app/assets/javascripts/backend_alerts.js
@@ -131,6 +131,12 @@
// context.JK.CurrentSessionModel.onPlaybackStateChange(type, text);
context.MediaPlaybackActions.playbackStateChange(text);
}
+ else if(type === ALERT_NAMES.VIDEO_WINDOW_OPENED) {
+ context.VideoActions.videoWindowOpened()
+ }
+ else if(type === ALERT_NAMES.VIDEO_WINDOW_CLOSED) {
+ context.VideoActions.videoWindowClosed()
+ }
else if((!context.JK.CurrentSessionModel || !context.JK.CurrentSessionModel.inSession()) &&
(ALERT_NAMES.INPUT_IO_RATE == type || ALERT_NAMES.INPUT_IO_JTR == type || ALERT_NAMES.OUTPUT_IO_RATE == type || ALERT_NAMES.OUTPUT_IO_JTR== type)) {
// squelch these events if not in session
diff --git a/web/app/assets/javascripts/client_init.js.coffee b/web/app/assets/javascripts/client_init.js.coffee
index 78f2f58b9..c84859b69 100644
--- a/web/app/assets/javascripts/client_init.js.coffee
+++ b/web/app/assets/javascripts/client_init.js.coffee
@@ -39,4 +39,6 @@ context.JK.ClientInit = class ClientInit
nativeClientInit: () =>
@gearUtils.bootstrapDefaultPlaybackProfile();
+ window.VideoActions.checkPromptConfigureVideo()
+
diff --git a/web/app/assets/javascripts/fakeJamClient.js b/web/app/assets/javascripts/fakeJamClient.js
index c70d18e3b..c7ea183cf 100644
--- a/web/app/assets/javascripts/fakeJamClient.js
+++ b/web/app/assets/javascripts/fakeJamClient.js
@@ -80,20 +80,20 @@
}
function FTUEGetVideoCaptureDeviceNames() {
- return ["Built-in Webcam HD"]
+ return {"xy323ss": "Built-in Webcam HD"}
}
function FTUECurrentSelectedVideoDevice() {
- return {"xy323ss": "Built-in Webcam HD"}
+ //return {"xy323ss": "Built-in Webcam HD"}
+ return {}
}
function FTUEGetAvailableEncodeVideoResolutions() {
return {
- 1 : "QCIF (176X144)",
- 2 : "CIF (352X288)",
- 3 : "VGA (640X480)",
- 4 : "4CIF (704X576)",
- 5 : "1/2WHD (640X360)",
- 6: "WHD (1280X720)",
- 7 : "FHD (1920x1080)"
+ 1 : "CIF (352X288)",
+ 2 : "VGA (640X480)",
+ 3 : "4CIF (704X576)",
+ 4 : "1/2WHD (640X360)",
+ 5 : "WHD (1280X720)",
+ 6 : "FHD (1920x1080)"
}
}
diff --git a/web/app/assets/javascripts/globals.js b/web/app/assets/javascripts/globals.js
index b8f138522..396e30be4 100644
--- a/web/app/assets/javascripts/globals.js
+++ b/web/app/assets/javascripts/globals.js
@@ -116,7 +116,16 @@
SHOW_PREFERENCES : 39, // tell frontend to show preferences dialog
USB_CONNECTED : 40, // tell frontend that a USB device was connected
USB_DISCONNECTED : 41, // tell frontend that a USB device was disconnected
- LAST_ALERT : 42
+ JAM_TRACK_SERVER_ERROR : 42, //error talking with server
+ BAD_INTERVAL_RATE : 43, //the audio gear is calling back at rate that does not match the expected interval
+ FIRST_AUDIO_PACKET : 44,// we are receiving audio from peer
+ NETWORK_PORT_MANGLED : 45, // packet from peer indicates network port is being mangled
+ NO_GLOBAL_CLOCK_SERVER : 46, //can't reach global clock NTP server
+ GLOBAL_CLOCK_SYNCED : 47, //clock synced
+ RECORDING_DONE :48, //the recording writer thread is done
+ VIDEO_WINDOW_OPENED :49, //video window opened
+ VIDEO_WINDOW_CLOSED :50,
+ LAST_ALERT : 51
}
// recreate eThresholdType enum from MixerDialog.h
context.JK.ALERT_TYPES = {
@@ -171,7 +180,16 @@
39: {"title": "", "message": ""}, // SHOW_PREFERENCES, //show preferences dialog
40: {"title": "", "message": ""}, // USB_CONNECTED
41: {"title": "", "message": ""}, // USB_DISCONNECTED, // tell frontend that a USB device was disconnected
- 42: {"title": "", "message": ""} // LAST_ALERT
+ 42: {"title": "", "message": ""}, // JAM_TRACK_SERVER_ERROR
+ 43: {"title": "", "message": ""}, // BAD_INTERVAL_RATE
+ 44: {"title": "", "message": ""}, // FIRST_AUDIO_PACKET
+ 45: {"title": "", "message": ""}, // NETWORK_PORT_MANGLED
+ 46: {"title": "", "message": ""}, // NO_GLOBAL_CLOCK_SERVER
+ 47: {"title": "", "message": ""}, // GLOBAL_CLOCK_SYNCED
+ 48: {"title": "", "message": ""}, // RECORDING_DONE
+ 49: {"title": "", "message": ""}, // VIDEO_WINDOW_OPENED
+ 50: {"title": "", "message": ""}, // VIDEO_WINDOW_CLOSED
+ 51: {"title": "", "message": ""} // LAST_ALERT
};
// add the alert's name to the ALERT_TYPES structure
@@ -311,7 +329,9 @@
/** NAMED_MESSAGES means messages that we show to the user (dialogs/banners/whatever), that we have formally named */
context.JK.NAMED_MESSAGES = {
- MASTER_VS_PERSONAL_MIX : 'master_vs_personal_mix'
+ MASTER_VS_PERSONAL_MIX : 'master_vs_personal_mix',
+ HOWTO_USE_VIDEO_NOSHOW : 'how-to-use-video',
+ CONFIGURE_VIDEO_NOSHOW : 'configure-video'
}
context.JK.ChannelGroupIds = {
diff --git a/web/app/assets/javascripts/react-components.js b/web/app/assets/javascripts/react-components.js
index 348d88b96..a7ca5b73f 100644
--- a/web/app/assets/javascripts/react-components.js
+++ b/web/app/assets/javascripts/react-components.js
@@ -12,6 +12,7 @@
//= require ./react-components/stores/SessionMyTracksStore
//= require ./react-components/stores/SessionOtherTracksStore
//= require ./react-components/stores/SessionMediaTracksStore
+//= require ./react-components/stores/VideoStore
//= require_directory ./react-components/stores
//= require_directory ./react-components/mixins
//= require_directory ./react-components
diff --git a/web/app/assets/javascripts/react-components/PopupConfigureVideoGear.js.jsx.coffee b/web/app/assets/javascripts/react-components/PopupConfigureVideoGear.js.jsx.coffee
new file mode 100644
index 000000000..7ffd1e641
--- /dev/null
+++ b/web/app/assets/javascripts/react-components/PopupConfigureVideoGear.js.jsx.coffee
@@ -0,0 +1,108 @@
+context = window
+logger = context.JK.logger
+
+mixins = []
+
+
+# make sure this is actually us opening the window, not someone else (by checking for MixerStore)
+
+accessOpener = false
+if window.opener?
+ try
+ m = window.opener.MixerStore
+ accessOpener = true
+ catch e
+
+
+if accessOpener
+ VideoActions = window.opener.VideoActions
+ VideoStore = window.opener.VideoStore
+
+#mixins.push(Reflux.listenTo(VideoStore, 'onVideoStateChanged'))
+
+
+@PopupConfigureVideoGear = React.createClass({
+
+ mixins: mixins
+ logger: context.JK.logger
+
+ render: () ->
+ `
+
+
+
video is not configured
+
+ If you might like to use video in sessions, please select a webcam to use, and a video resolution and frame rate to capture. Then click the TEST WEBCAM button to verify that you see video from your webcam properly. In sessions, you can choose to turn video on or off any time.
+
+
+
+
+
+
+
+
+
+ Important Note
+
+
+ You can update your video configuration any time in your Account settings, or in the menus of the video window while in a session.
+
- Select webcam to use for video in sessions. Verify that you see video from webcam in the external application window (it may be behind this window). Configure webcam settings if desired.
+ Select webcam to use for video in sessions. Verify that you see video from webcam in the external application window (it may be behind this window).
- <%= render 'webcam' %>
diff --git a/web/app/views/clients/wizard/gear/_video_gear.html.haml b/web/app/views/clients/wizard/gear/_video_gear.html.haml
index 888067af9..452b9a615 100644
--- a/web/app/views/clients/wizard/gear/_video_gear.html.haml
+++ b/web/app/views/clients/wizard/gear/_video_gear.html.haml
@@ -8,7 +8,7 @@
%li Select video capture settings.
%li Click the Test webcam button to open a window and verify that your webcam is properly capturing video. Then use the Window / Close Video Window menu command to close the window, and click the Next button to move forward.
.wizard-step-column
- =render(partial: '/clients/webcam')
+ .webcam-container
.clearall
/ Webcam from client can't currently be embedded:
/ .wizard-step-column
diff --git a/web/app/views/layouts/minimal.html.erb b/web/app/views/layouts/minimal.html.erb
index 3a5ad3ea9..5e7e80320 100644
--- a/web/app/views/layouts/minimal.html.erb
+++ b/web/app/views/layouts/minimal.html.erb
@@ -25,6 +25,7 @@
<%= yield %>
+ <%= render "clients/help" %>