fix start/stop recording dialog for session with video
This commit is contained in:
parent
7c306a13df
commit
f4aebb44e2
|
|
@ -49,6 +49,8 @@
|
|||
var connectTimeout = null;
|
||||
var activityTimeout;
|
||||
|
||||
|
||||
|
||||
// elements
|
||||
var $inSituBanner = null;
|
||||
var $inSituBannerHolder = null;
|
||||
|
|
|
|||
|
|
@ -531,6 +531,7 @@
|
|||
logger.log(`3010 JKVideoSession: ${response['JKVideoSession']['connect']}`);
|
||||
const vidConnect = response['JKVideoSession']['connect'];
|
||||
context.ExternalVideoActions.setVideoEnabled(vidConnect);
|
||||
context.JK.videoIsOngoing = vidConnect;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -474,6 +474,9 @@
|
|||
this.clientId = null;
|
||||
this.initialRouting = initialRouting;
|
||||
|
||||
//video server
|
||||
this.videoIsOngoing = false;
|
||||
|
||||
$(document).triggerHandler('JAMKAZAM_CONSTRUCTED', {app:this})
|
||||
return this;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -45,16 +45,14 @@ if accessOpener
|
|||
|
||||
mixins: mixins
|
||||
|
||||
getInitialState: () ->
|
||||
{ videoEnabled: false }
|
||||
|
||||
onExternalVideoStateChanged: (videoState) ->
|
||||
unless videoState.videoEnabled
|
||||
$root = $(this.getDOMNode())
|
||||
$root.find('#recording-input-audio').iCheck('check').attr('checked', 'checked')
|
||||
this.setState(videoState)
|
||||
$root = $(this.getDOMNode())
|
||||
if videoState.videoEnabled
|
||||
$root.find('#recording-input-both').iCheck('uncheck').attr('disabled', false)
|
||||
else
|
||||
$root.find('#recording-input-both').prop('disabled',true).iCheck('update').iCheck('uncheck');
|
||||
$root.find('#recording-input-audio').iCheck('check').attr('checked', true)
|
||||
|
||||
|
||||
onMixersChanged: (mixers) ->
|
||||
this.setState(chatMixer: mixers.chatMixer)
|
||||
|
||||
|
|
@ -73,10 +71,10 @@ if accessOpener
|
|||
recordVideo = NoVideoRecordActive
|
||||
|
||||
$root = $(this.getDOMNode())
|
||||
|
||||
|
||||
if @inputType != 'audio-only'
|
||||
console.log('==DEBUG==', this.state.videoEnabled)
|
||||
return unless this.state.videoEnabled
|
||||
#return unless this.state.videoEnabled
|
||||
return unless reactContext.JK.videoIsOngoing
|
||||
|
||||
# selection = $root.find('#recording-selection').val()
|
||||
|
||||
|
|
@ -148,7 +146,7 @@ if accessOpener
|
|||
<div className="clearall"></div>
|
||||
</div>
|
||||
<div className="field">
|
||||
<input type="radio" name="recording-input-type" id="recording-input-both" value="audio-video" disabled={!this.state.videoEnabled} />
|
||||
<input type="radio" name="recording-input-type" id="recording-input-both" value="audio-video" disabled={!reactContext.JK.videoIsOngoing} />
|
||||
<label htmlFor="recording-input-both">Audio and video</label>
|
||||
<div className="clearall"></div>
|
||||
</div>
|
||||
|
|
@ -208,6 +206,7 @@ if accessOpener
|
|||
e.preventDefault()
|
||||
|
||||
context.JK.prodBubble($(e.target), 'vid-record-chat-input', {}, {positions:['left']})
|
||||
|
||||
trackInputType: (e) ->
|
||||
$checkedType = $(e.target);
|
||||
@inputType = $checkedType.val()
|
||||
|
|
@ -255,45 +254,53 @@ if accessOpener
|
|||
# setTimeout(@resizeWindow, 300)
|
||||
|
||||
componentDidMount: `async function() {
|
||||
$(window).unload(this.windowUnloaded);
|
||||
|
||||
$(window).unload(this.windowUnloaded);
|
||||
|
||||
const $root = jQuery(this.getDOMNode());
|
||||
const $root = jQuery(this.getDOMNode());
|
||||
|
||||
const $recordingType = $root.find('input[type="radio"]');
|
||||
context.JK.checkbox($recordingType);
|
||||
$root.find('#recording-input-audio').iCheck('check')
|
||||
$root.find('#recording-input-both').iCheck().attr('disabled', !reactContext.JK.videoIsOngoing)
|
||||
|
||||
this.inputType = 'audio-only';
|
||||
this.audioType = 'audio-only';
|
||||
const $recordingType = $root.find('input[type="radio"]');
|
||||
context.JK.checkbox($recordingType);
|
||||
|
||||
$root.find('input[name="recording-input-type"]').on('ifChanged', this.trackInputType);
|
||||
$root.find('input[name="recording-input-chat-option"]').on('ifChanged', this.trackAudioType);
|
||||
this.inputType = 'audio-only';
|
||||
this.audioType = 'audio-only';
|
||||
|
||||
const $recordingRegion = $root.find('#recording-selection');
|
||||
//console.log("$recordingou", $recordingRegion)
|
||||
//context.JK.dropdown($recordingRegion)
|
||||
$root.find('input[name="recording-input-type"]').on('ifChanged', this.trackInputType);
|
||||
$root.find('input[name="recording-input-chat-option"]').on('ifChanged', this.trackAudioType);
|
||||
|
||||
const $includeChat = $root.find('#include-chat');
|
||||
context.JK.checkbox($includeChat);
|
||||
const $recordingRegion = $root.find('#recording-selection');
|
||||
//console.log("$recordingou", $recordingRegion)
|
||||
//context.JK.dropdown($recordingRegion)
|
||||
|
||||
const openWindows = await window.opener.jamClient.getOpenVideoSources();
|
||||
const $includeChat = $root.find('#include-chat');
|
||||
context.JK.checkbox($includeChat);
|
||||
|
||||
console.log("open video sources", openWindows);
|
||||
const openWindows = await window.opener.jamClient.getOpenVideoSources();
|
||||
|
||||
const fixedwindows = [];
|
||||
if (openWindows != null) {
|
||||
for (let key in openWindows) {
|
||||
const value = openWindows[key];
|
||||
fixedwindows.push(value);
|
||||
}
|
||||
console.log("open video sources", openWindows);
|
||||
|
||||
const fixedwindows = [];
|
||||
if (openWindows != null) {
|
||||
for (let key in openWindows) {
|
||||
const value = openWindows[key];
|
||||
fixedwindows.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
this.setState({openWindows: fixedwindows});
|
||||
this.resizeWindow();
|
||||
this.setState({openWindows: fixedwindows});
|
||||
this.resizeWindow();
|
||||
|
||||
//this is necessary due to whatever the client rendering behavior is.
|
||||
return setTimeout(this.resizeWindow, 300);
|
||||
//this is necessary due to whatever the client rendering behavior is.
|
||||
return setTimeout(this.resizeWindow, 300);
|
||||
}`
|
||||
|
||||
componentWillUnmount: () ->
|
||||
$root = jQuery(this.getDOMNode());
|
||||
$root.find('#recording-input-both').iCheck('uncheck').attr('disabled', true)
|
||||
|
||||
componentDidUpdate: () ->
|
||||
@resizeWindow()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue