mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
Merge pull request #446 in FS/freeswitch from ~JMESQUITA/freeswitch:bugfix/FS-8040-add-no-camera-mode to master
* commit 'da0750231e44aeb726867f7c29c9c48566f5571d': FS-8040: [verto_communicator] Check if we have a valid resolution reported before calling camera routines and hide controls if none are found.
This commit is contained in:
commit
07e1ef63db
@ -36,7 +36,7 @@
|
|||||||
<button tooltips="" tooltip-title="(un)Mute Mic" tooltip-side="bottom" tooltip-lazy="false" class="btn btn-material-blue-900" ng-click="muteMic(cbMuteMic)">
|
<button tooltips="" tooltip-title="(un)Mute Mic" tooltip-side="bottom" tooltip-lazy="false" class="btn btn-material-blue-900" ng-click="muteMic(cbMuteMic)">
|
||||||
<i class="" ng-class="{'mdi-av-mic': !verto.data.mutedMic, 'mdi-av-mic-off': verto.data.mutedMic}"></i>
|
<i class="" ng-class="{'mdi-av-mic': !verto.data.mutedMic, 'mdi-av-mic-off': verto.data.mutedMic}"></i>
|
||||||
</button>
|
</button>
|
||||||
<button tooltips="" tooltip-title="(un)Mute Video" tooltip-side="bottom" tooltip-lazy="false" class="btn btn-material-blue-900" ng-click="muteVideo(cbMuteVideo)">
|
<button tooltips="" tooltip-title="(un)Mute Video" tooltip-side="bottom" tooltip-lazy="false" class="btn btn-material-blue-900" ng-click="muteVideo(cbMuteVideo)" ng-if="verto.data.canVideo">
|
||||||
<i class="" ng-class="{'mdi-av-videocam': !verto.data.mutedVideo, 'mdi-av-videocam-off': verto.data.mutedVideo}"></i>
|
<i class="" ng-class="{'mdi-av-videocam': !verto.data.mutedVideo, 'mdi-av-videocam-off': verto.data.mutedVideo}"></i>
|
||||||
</button>
|
</button>
|
||||||
<button tooltips="" tooltip-title="Toggle Fullscreen Mode" tooltip-side="bottom" tooltip-lazy="false" class="btn btn-material-blue-900" ng-click="goFullscreen()">
|
<button tooltips="" tooltip-title="Toggle Fullscreen Mode" tooltip-side="bottom" tooltip-lazy="false" class="btn btn-material-blue-900" ng-click="goFullscreen()">
|
||||||
|
@ -177,11 +177,15 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
maxHeight = data.bestHeight;
|
maxHeight = data.bestHeight;
|
||||||
|
|
||||||
if(!data.bestWidth) {
|
if(!data.bestWidth) {
|
||||||
maxWidth = videoResolution[data.vidQual].width;
|
if (videoResolution[data.vidQual]) {
|
||||||
|
maxWidth = videoResolution[data.vidQual].width;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!data.bestHeight) {
|
if(!data.bestHeight) {
|
||||||
maxHeight = videoResolution[data.vidQual].height;
|
if (videoResolution[data.vidQual]) {
|
||||||
|
maxHeight = videoResolution[data.vidQual].height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -539,12 +543,21 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
};
|
};
|
||||||
|
|
||||||
var init = function(resolutions) {
|
var init = function(resolutions) {
|
||||||
|
// This means that we cannot use video!
|
||||||
|
if (resolutions.validRes.length === 0) {
|
||||||
|
console.log('No valid resolutions, disabling video.');
|
||||||
|
data.canVideo = false;
|
||||||
|
} else {
|
||||||
|
data.canVideo = true;
|
||||||
|
}
|
||||||
data.bestWidth = resolutions['bestResSupported'][0];
|
data.bestWidth = resolutions['bestResSupported'][0];
|
||||||
data.bestHeight = resolutions['bestResSupported'][1];
|
data.bestHeight = resolutions['bestResSupported'][1];
|
||||||
|
|
||||||
that.updateResolutions(resolutions['validRes']);
|
if (data.canVideo) {
|
||||||
|
that.updateResolutions(resolutions['validRes']);
|
||||||
that.refreshVideoResolution();
|
that.refreshVideoResolution();
|
||||||
|
}
|
||||||
|
|
||||||
// Checking if we have a failed connection attempt before
|
// Checking if we have a failed connection attempt before
|
||||||
// connecting again.
|
// connecting again.
|
||||||
if (data.instance && !data.instance.rpcClient.socketReady()) {
|
if (data.instance && !data.instance.rpcClient.socketReady()) {
|
||||||
@ -557,10 +570,6 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
socketUrl: data.wsURL,
|
socketUrl: data.wsURL,
|
||||||
tag: "webcam",
|
tag: "webcam",
|
||||||
ringFile: "sounds/bell_ring2.wav",
|
ringFile: "sounds/bell_ring2.wav",
|
||||||
loginParams: {
|
|
||||||
foo: true,
|
|
||||||
bar: "yes"
|
|
||||||
},
|
|
||||||
videoParams: getVideoParams(),
|
videoParams: getVideoParams(),
|
||||||
// TODO: Add options for this.
|
// TODO: Add options for this.
|
||||||
audioParams: {
|
audioParams: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user