mirror of
https://github.com/atom/atom.git
synced 2026-02-18 18:34:21 -05:00
Don't turn on the web cam until sharing is begun
This commit is contained in:
@@ -33,6 +33,7 @@ class GuestSession
|
||||
guest = doc.get('collaborationState.guest')
|
||||
host = doc.get('collaborationState.host')
|
||||
@mediaConnection = new MediaConnection(guest, host, isHost: false)
|
||||
@mediaConnection.start()
|
||||
|
||||
waitForStream: (callback) ->
|
||||
@mediaConnection.waitForStream callback
|
||||
|
||||
@@ -37,6 +37,7 @@ class HostSession
|
||||
start: ->
|
||||
return if @isSharing()
|
||||
|
||||
@mediaConnection.start()
|
||||
patrick.snapshot project.getPath(), (error, repoSnapshot) =>
|
||||
throw new Error(error) if error
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ class MediaConnection
|
||||
isHost: null
|
||||
|
||||
constructor: (@local, @remote, {@isHost}={}) ->
|
||||
|
||||
start: ->
|
||||
constraints = {video: true, audio: true}
|
||||
navigator.webkitGetUserMedia constraints, @onUserMediaAvailable, @onUserMediaUnavailable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user