Fix UI issues with modals. Resize webcam video

This commit is contained in:
perroned 2015-09-15 12:06:18 -07:00
parent 0378b2e723
commit 484ce4fb38
5 changed files with 42 additions and 38 deletions

View File

@ -169,10 +169,11 @@ this.docall_verto = function(extension, conferenceUsername, conferenceIdNumber,
// displays a local feed of the user's webcam // displays a local feed of the user's webcam
this.doWebcamPreview = function(onSuccess, onFailure, videoTag) { this.doWebcamPreview = function(onSuccess, onFailure, videoTag) {
var selectedVideoConstraints = getChosenWebcamResolution(); // this is the video profile the user chose var selectedVideoConstraints = getChosenWebcamResolution(); // this is the video profile the user chose
my_real_size(selectedVideoConstraints);
selectedVideoConstraints = getWebcamConstraintsFromResolution(selectedVideoConstraints); // convert to a valid constraints object selectedVideoConstraints = getWebcamConstraintsFromResolution(selectedVideoConstraints); // convert to a valid constraints object
console.log("screen constraints", selectedVideoConstraints) console.log("screen constraints", selectedVideoConstraints)
previewLocalMedia(webcamStream, selectedVideoConstraints, videoTag, onSuccess, onFailure); previewLocalMedia(webcamStream, selectedVideoConstraints, videoTag, onSuccess, onFailure);
window.videoTag = videoTag;
my_real_size()
} }
// return the webcam resolution that the user has selected // return the webcam resolution that the user has selected

View File

@ -6,34 +6,12 @@
padding: 5px; padding: 5px;
} }
.screenshareShow { .screenshareShow, .screenshareStart, .webcamStart, .webcamShow {
color: lime; color: lime;
font-size: 30px; font-size: 30px;
} }
.screenshareHide { .screenshareHide, .screenshareStop, .webcamStop, .webcamHide {
color: red;
display: none;
font-size: 30px;
}
.screenshareStart {
color: lime;
font-size: 30px;
}
.screenshareStop {
color: red;
display: none;
font-size: 30px;
}
.webcamStart {
color: lime;
font-size: 30px;
}
.webcamStop {
color: red; color: red;
display: none; display: none;
font-size: 30px; font-size: 30px;

View File

@ -2,25 +2,28 @@ Template.vertoDeskshareMenu.events
"click .vertoButton": (event) -> "click .vertoButton": (event) ->
$("#settingsModal").foundation('reveal', 'close') $("#settingsModal").foundation('reveal', 'close')
"click #getAdjustedResolutions": (event) ->
getAdjustedResolutions (result) ->
for i of result
$("#adjustedResolutions").append(i + ": " + result[i].width + "x" + result[i].height + "<br/>")
"click .screenshareShow": (event) -> "click .screenshareShow": (event) ->
$("#deskshareModal").foundation('reveal', 'open'); $("#deskshareModal").foundation('reveal', 'open');
$("#screenshareShow").hide() $("#screenshareShow").hide()
$("#screenshareHide").show() $("#screenshareHide").show()
"click .screenshareHide": (event) -> "click .screenshareHide": (event) ->
if(!!window["deskshareStream"])
$("#webcam").src = null;
window["deskshareStream"].stop();
else
screenStart(false, (->))
$("#screenshareShow").show() $("#screenshareShow").show()
$("#screenshareHide").hide() $("#screenshareHide").hide()
$("#screenshareStart").show()
$("#screenshareStop").hide()
Template.deskshareModal.events Template.deskshareModal.events
"click .screenshareStart": (event) -> "click .screenshareStart": (event) ->
$("#deskshareModal").foundation('reveal', 'close') $("#deskshareModal").foundation('reveal', 'close')
$("#screenshareStart").hide() $("#screenshareStart").hide()
$("#screenshareStaop").show() $("#screenshareStop").show()
screenStart(true, (->), "webcam") screenStart(true, (->), "webcam")
"click .screenshareStop": (event) -> "click .screenshareStop": (event) ->
@ -32,7 +35,24 @@ Template.deskshareModal.events
"click #desksharePreview": (event) -> "click #desksharePreview": (event) ->
doDesksharePreview((->), (->), "webcam"); doDesksharePreview((->), (->), "webcam");
Template.vertoWebcam.events Template.vertoWebcamMenu.events
"click .vertoButton": (event) ->
$("#settingsModal").foundation('reveal', 'close')
"click .webcamShow": (event) ->
$("#webcamModal").foundation('reveal', 'open');
$("#webcamShow").hide()
$("#webcamHide").show()
"click .webcamHide": (event) ->
if(!!window["webcamStream"])
$("#webcam").src = null;
window["webcamStream"].stop();
$("#webcamShow").show()
$("#webcamHide").hide()
Template.webcamModal.events
"click .vertoButton": (event) -> "click .vertoButton": (event) ->
$("#settingsModal").foundation('reveal', 'close') $("#settingsModal").foundation('reveal', 'close')
@ -45,8 +65,13 @@ Template.vertoWebcam.events
$("#webcamStart").show() $("#webcamStart").show()
$("#webcamStop").hide() $("#webcamStop").hide()
# "click #webcamPreview": (event) -> "click #webcamPreview": (event) ->
# doWebcamPreview((->), (->), "webcam"); doWebcamPreview((->), (->), "webcam");
"click #getAdjustedResolutions": (event) ->
getAdjustedResolutions (result) ->
for i of result
$("#adjustedResolutions").append(i + ": " + result[i].width + "x" + result[i].height + "<br/>")
@toggleWhiteboardVideo = (display) -> @toggleWhiteboardVideo = (display) ->
if display is "whiteboard" if display is "whiteboard"

View File

@ -3,7 +3,7 @@
{{> makeButton id="screenshareHide" btn_class="screenshareHide vertoButton settingsButton" i_class="fi-monitor" rel="tooltip" data_placement="bottom" title="Stop sharing your screen"}} {{> makeButton id="screenshareHide" btn_class="screenshareHide vertoButton settingsButton" i_class="fi-monitor" rel="tooltip" data_placement="bottom" title="Stop sharing your screen"}}
</template> </template>
<template name="vertoWebcam"> <template name="vertoWebcamMenu">
{{> makeButton id="webcamStart" btn_class="webcamStart vertoButton settingsButton" i_class="fi-camera" rel="tooltip" data_placement="bottom" title="Share your webcam"}} {{> makeButton id="webcamShow" btn_class="webcamShow vertoButton settingsButton" i_class="fi-camera" rel="tooltip" data_placement="bottom" title="Share your webcam"}}
{{> makeButton id="webcamStop" btn_class="webcamStop vertoButton settingsButton" i_class="fi-camera" rel="tooltip" data_placement="bottom" title="Stop sharing your webcam"}} {{> makeButton id="webcamHide" btn_class="webcamHide vertoButton settingsButton" i_class="fi-camera" rel="tooltip" data_placement="bottom" title="Stop sharing your webcam"}}
</template> </template>

View File

@ -44,7 +44,7 @@
{{> optionsFontSize}} {{> optionsFontSize}}
<br/> <br/>
{{> vertoDeskshareMenu}} {{> vertoDeskshareMenu}}
{{> vertoWebcam}} {{> vertoWebcamMenu}}
<br/> <br/>
{{{getBBBSettingsInfo}}} {{{getBBBSettingsInfo}}}
</div> </div>