* wip
This commit is contained in:
parent
a724c19cac
commit
0d64724234
|
|
@ -304,3 +304,4 @@ jam_track_searchability.sql
|
|||
harry_fox_agency.sql
|
||||
jam_track_slug.sql
|
||||
mixdown.sql
|
||||
video_recording.sql
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE recordings ADD video BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
|
@ -213,7 +213,7 @@ module JamRuby
|
|||
recording.music_session = music_session
|
||||
recording.owner = owner
|
||||
recording.band = music_session.band
|
||||
recording.record_video = record_video
|
||||
recording.video = record_video
|
||||
|
||||
if recording.save
|
||||
GoogleAnalyticsEvent.report_band_recording(recording.band)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,12 @@
|
|||
// remove all display errors
|
||||
$('#recording-finished-dialog form .error-text').remove()
|
||||
$('#recording-finished-dialog form .error').removeClass("error")
|
||||
if(recording.video) {
|
||||
$dialog.find('.save-video').show()
|
||||
}
|
||||
else {
|
||||
$dialog.find('.save-video').hide()
|
||||
}
|
||||
removeGoogleLoginErrors()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
context = window
|
||||
logger = context.JK.logger
|
||||
|
||||
mixins = []
|
||||
|
||||
|
|
@ -26,9 +27,23 @@ if accessOpener
|
|||
if this.state.isRecording
|
||||
window.opener.RecordingActions.stopRecording()
|
||||
else
|
||||
window.opener.RecordingActions.startRecording()
|
||||
recordChat = false
|
||||
recordVideo = false
|
||||
|
||||
if @inputType != 'audio-only'
|
||||
recordVideo = true
|
||||
|
||||
if @audioType != 'audio-only'
|
||||
recordChat = true
|
||||
|
||||
logger.debug("@inputType, @udiotye", @inputType, @audioType)
|
||||
window.opener.RecordingActions.startRecording(recordVideo, recordChat)
|
||||
|
||||
onNoteShowHide: () ->
|
||||
|
||||
$root = $(this.getDOMNode())
|
||||
audioVideoValue = $root.find('input[name="recording-input-type"]').val()
|
||||
console.log("audio video value", audioVideoValue)
|
||||
this.setState(showNote: !this.state.showNote)
|
||||
|
||||
getInitialState: () ->
|
||||
|
|
@ -53,16 +68,34 @@ if accessOpener
|
|||
</div>
|
||||
</div>`
|
||||
|
||||
recordingJSX = `<div className="recording-options">
|
||||
<div className="field">
|
||||
<input type="radio" name="recording-input-type" id="recording-input-both" defaultChecked="checked" />
|
||||
<label htmlFor="recording-input-both">Record both video and audio</label>
|
||||
<div className="clearall"></div>
|
||||
recordingJSX =
|
||||
`<div className="recording-options">
|
||||
<div className="video-settings">
|
||||
<h3>Video Settings</h3>
|
||||
<div className="field">
|
||||
<input type="radio" name="recording-input-type" id="recording-input-audio" value="audio-only" defaultChecked="checked" />
|
||||
<label htmlFor="recording-input-audio">Record audio only</label>
|
||||
<div className="clearall"></div>
|
||||
</div>
|
||||
<div className="field">
|
||||
<input type="radio" name="recording-input-type" id="recording-input-both" value="audio-video" />
|
||||
<label htmlFor="recording-input-both">Record audio and video</label>
|
||||
<div className="clearall"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="field">
|
||||
<input type="radio" name="recording-input-type" id="recording-input-audio" />
|
||||
<label htmlFor="recording-input-audio">Record audio only</label>
|
||||
<div className="clearall"></div>
|
||||
|
||||
<div className="audio-settings">
|
||||
<h3>Audio Settings</h3>
|
||||
<div className="field">
|
||||
<input type="radio" name="recording-input-chat-option" id="recording-inputs-only" value="audio-only" defaultChecked="checked" />
|
||||
<label htmlFor="recording-inputs-only">Record track audio only</label>
|
||||
<div className="clearall"></div>
|
||||
</div>
|
||||
<div className="field">
|
||||
<input type="radio" name="recording-input-chat-option" id="recording-inputs-and-chat" value="audio-chat" />
|
||||
<label htmlFor="recording-inputs-and-chat">Record track audio and voice chat</label>
|
||||
<div className="clearall"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`
|
||||
|
||||
|
|
@ -108,6 +141,16 @@ if accessOpener
|
|||
windowUnloaded: () ->
|
||||
window.opener.RecordingActions.recordingControlsClosed()
|
||||
|
||||
trackInputType: (e) ->
|
||||
$checkedType = $(e.target);
|
||||
@inputType = $checkedType.val()
|
||||
logger.debug("updated @inputType",e.target, @inputType)
|
||||
|
||||
trackAudioType: (e) ->
|
||||
$checkedType = $(e.target);
|
||||
@audioType = $checkedType.val()
|
||||
logger.debug("updated @audioType", @inputType)
|
||||
|
||||
componentDidMount: () ->
|
||||
$(window).unload(@windowUnloaded)
|
||||
|
||||
|
|
@ -116,6 +159,12 @@ if accessOpener
|
|||
$recordingType = $root.find('input[type="radio"]')
|
||||
context.JK.checkbox($recordingType)
|
||||
|
||||
@inputType = 'audio-only'
|
||||
@audioType = 'audio-only'
|
||||
|
||||
$root.find('input[name="recording-input-type"]').on('ifChanged', @trackInputType)
|
||||
$root.find('input[name="recording-input-chat-option"]').on('ifChanged', @trackAudioType)
|
||||
|
||||
@resizeWindow()
|
||||
|
||||
# this is necessary due to whatever the client's rendering behavior is.
|
||||
|
|
|
|||
|
|
@ -23,8 +23,12 @@ logger = context.JK.logger
|
|||
@recordingModel = recordingModel
|
||||
this.trigger({isRecording: @recordingModel.isRecording()})
|
||||
|
||||
onStartRecording: (recordingVideo, recordChat) ->
|
||||
@recordingModel.startRecording(recordVideo, recordChat)
|
||||
onStartRecording: (recordVideo, recordChat) ->
|
||||
|
||||
frameRate = context.jamClient.GetCurrentVideoFrameRate() || 30;
|
||||
|
||||
logger.debug("onStartRecording: recordVideo: #{recordVideo}, recordChat: #{recordChat} frameRate: #{frameRate}")
|
||||
@recordingModel.startRecording(recordVideo, recordChat, frameRate)
|
||||
|
||||
onStopRecording: () ->
|
||||
@recordingModel.stopRecording()
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
|
||||
context.RecordingActions.startingRecording({isRecording: false})
|
||||
|
||||
currentRecording = rest.startRecording({"music_session_id": sessionId, recordVideo: recordVideo})
|
||||
currentRecording = rest.startRecording({"music_session_id": sessionId, record_video: recordVideo})
|
||||
.done(function(recording) {
|
||||
currentRecordingId = recording.id;
|
||||
currentOrLastRecordingId = recording.id;
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@ body.recording-start-stop {
|
|||
|
||||
.field {
|
||||
height:18px;
|
||||
&:nth-child(1) {
|
||||
&:nth-of-type(1) {
|
||||
|
||||
}
|
||||
&:nth-child(2) {
|
||||
&:nth-of-type(2) {
|
||||
margin-top:9px;
|
||||
}
|
||||
}
|
||||
|
|
@ -83,6 +83,16 @@ body.recording-start-stop {
|
|||
width:260px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size:14px;
|
||||
font-weight:bold;
|
||||
margin-bottom:6px;
|
||||
}
|
||||
|
||||
.video-settings {
|
||||
margin-bottom:20px;
|
||||
}
|
||||
|
||||
a.note-show-hide {
|
||||
margin-top:5px;
|
||||
text-decoration:underline;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
object @recording
|
||||
|
||||
attributes :id, :band, :created_at, :duration, :comment_count, :like_count, :play_count, :when_will_be_discarded?, :jam_track_id, :jam_track_initiator_id, :music_session_id, :music_session
|
||||
attributes :id, :band, :created_at, :duration, :comment_count, :like_count, :play_count, :when_will_be_discarded?, :jam_track_id, :jam_track_initiator_id, :music_session_id, :music_session, :video
|
||||
|
||||
node :fan_access do |recording|
|
||||
recording.non_active_music_session.fan_access
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@
|
|||
%br/
|
||||
%textarea#claim-recording-description.w100{:name => "description"}
|
||||
-if (Rails.application.config.video_available=="full") || (current_user && current_user.admin)
|
||||
.field.left{:purpose => "save_video"}
|
||||
.save-video.field.left{:purpose => "save_video"}
|
||||
%input{:name => "save_video", :type => "checkbox"}/
|
||||
%label{:for => "save_video"} Save Video to Computer
|
||||
.field.left{:purpose => "upload_to_youtube"}
|
||||
.hidden.field.left{:purpose => "upload_to_youtube"}
|
||||
%span
|
||||
%input{:name => "upload_to_youtube", :type => "checkbox"}/
|
||||
%label{:for => "upload_to_youtube"} Upload Video to YouTube
|
||||
|
|
|
|||
Loading…
Reference in New Issue