* VRFS-3466 - updated frontend to pass in GUIDs

This commit is contained in:
Seth Call 2015-08-25 14:52:05 -05:00
parent 1252dbe178
commit 7560b340c7
1 changed files with 11 additions and 8 deletions

View File

@ -88,7 +88,8 @@ context.JK.WebcamViewer = class WebcamViewer
if device?
caps = @client.FTUEGetVideoCaptureDeviceCapabilities(device)
@logger.debug("Got capabilities from device", caps, device)
@client.FTUESelectVideoCaptureDevice(device, caps)
result = @client.FTUESelectVideoCaptureDevice(device, caps)
@logger.debug("FTUESelectVideoCaptureDevice result: ", result)
updateBackend: (selectedResolution, selectedFps) =>
@logger.debug 'Selecting webcam resolution: ', selectedResolution
@ -141,22 +142,24 @@ context.JK.WebcamViewer = class WebcamViewer
webcamName="None Configured"
# protect against non-video clients pointed at video-enabled server from getting into a session
webcam = if @client.FTUECurrentSelectedVideoDevice? then @client.FTUECurrentSelectedVideoDevice() else null
logger.debug("currently selected video device", webcam)
if (webcam? && Object.keys(webcam).length>0)
webcamName = _.values(webcam)[0]
webcamName = Object.keys(webcam)[0]
webcamName
loadWebCams:() =>
# protect against non-video clients pointed at video-enabled server from getting into a session
devices = if @client.FTUEGetVideoCaptureDeviceNames? then @client.FTUEGetVideoCaptureDeviceNames() else []
devices = if @client.FTUEGetVideoCaptureDeviceNames? then @client.FTUEGetVideoCaptureDeviceNames() else {}
@logger.debug("webcam devices", devices)
selectedDevice = this.selectedDeviceName()
selectControl = @webcamSelect
context._.each devices, (device) ->
selected = device == selectedDevice
context._.each devices, (deviceName, deviceGuid) ->
selected = deviceName == selectedDevice
option = $('<option/>',
id: device
value: device
text: device)
id: deviceGuid
value: deviceGuid
text: deviceName)
selectControl.append option
selectControl.val selectedDevice