* allow a non-video client into a session on a server configured with video
This commit is contained in:
parent
aec3d106fa
commit
795f0b5375
|
|
@ -19,7 +19,7 @@ module JamRuby
|
|||
:licensor_royalty_amount, :pro_royalty_amount, :plan_code, :initial_play_silence, :jam_track_tracks_attributes,
|
||||
:jam_track_tap_ins_attributes, :genre_ids, :version, :jmep_json, :jmep_text, :pro_ascap, :pro_bmi, :pro_sesac, :duration, as: :admin
|
||||
|
||||
validates :name, presence: true, uniqueness: true, length: {maximum: 200}
|
||||
validates :name, presence: true, length: {maximum: 200}
|
||||
validates :plan_code, presence: true, uniqueness: true, length: {maximum: 50 }
|
||||
validates :description, length: {maximum: 1000}
|
||||
validates :time_signature, inclusion: {in: [nil] + [''] + TIME_SIGNATURES} # the empty string is needed because of activeadmin
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ context.JK.WebcamViewer = class WebcamViewer
|
|||
this.loadResolutions()
|
||||
this.selectResolution()
|
||||
@initialScan = true
|
||||
@client.SessStopVideoSharing()
|
||||
# protect against non-video clients pointed at video-enabled server from getting into a session
|
||||
if @client.SessStopVideoSharing
|
||||
@client.SessStopVideoSharing()
|
||||
#client.SessSetInsetPosition(5)
|
||||
#client.SessSetInsetSize(1)
|
||||
#client.FTUESetAutoSelectVideoLayout(false)
|
||||
|
|
@ -82,14 +84,16 @@ context.JK.WebcamViewer = class WebcamViewer
|
|||
|
||||
selectedDeviceName:() =>
|
||||
webcamName="None Configured"
|
||||
webcam = @client.FTUECurrentSelectedVideoDevice()
|
||||
# protect against non-video clients pointed at video-enabled server from getting into a session
|
||||
webcam = if @client.FTUECurrentSelectedVideoDevice? then @client.FTUECurrentSelectedVideoDevice() else null
|
||||
if (webcam? && Object.keys(webcam).length>0)
|
||||
webcamName = _.values(webcam)[0]
|
||||
|
||||
webcamName
|
||||
|
||||
loadWebCams:() =>
|
||||
devices = @client.FTUEGetVideoCaptureDeviceNames()
|
||||
# protect against non-video clients pointed at video-enabled server from getting into a session
|
||||
devices = if @client.FTUEGetVideoCaptureDeviceNames? then @client.FTUEGetVideoCaptureDeviceNames() else []
|
||||
selectedDevice = this.selectedDeviceName()
|
||||
selectControl = @webcamSelect
|
||||
context._.each devices, (device) ->
|
||||
|
|
@ -107,7 +111,8 @@ context.JK.WebcamViewer = class WebcamViewer
|
|||
@root.find('.no-webcam-msg').addClass 'hidden'
|
||||
|
||||
loadResolutions:() =>
|
||||
resolutions = @client.FTUEGetAvailableEncodeVideoResolutions()
|
||||
# protect against non-video clients pointed at video-enabled server from getting into a session
|
||||
resolutions = if @client.FTUEGetAvailableEncodeVideoResolutions? then @client.FTUEGetAvailableEncodeVideoResolutions() else {}
|
||||
selectControl = @resolutionSelect
|
||||
@logger.debug 'FOUND THESE RESOLUTIONS', resolutions, selectControl
|
||||
context._.each resolutions, (value, key, obj) ->
|
||||
|
|
|
|||
Loading…
Reference in New Issue