webrtc-rails 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46715b540b07d892527e2b7f6f247304cd8d2ff6
4
- data.tar.gz: bfcbfc2836a9cfaf8800a0589f712a609acc6afd
3
+ metadata.gz: 223b136426d7cb271b1a46b9e98bf0ccf2fbd394
4
+ data.tar.gz: 87bd96f99254da54dc98924210dcd2aba81e38f3
5
5
  SHA512:
6
- metadata.gz: e19d70a685b8a37cc879cc80b9986db73c20a894bc4609333ef7be5eadd41bf803beebc516d17971381795b3e65e95cdfe7fc3a951f2302f8fdfc4e67aa4b2ad
7
- data.tar.gz: 69c07d010291f9ed3639c598e91fb59fc843143c07ceae596c64f9ab684d34362102dca5e069af9d89da9b86b8a77d9e45b890904318d71e6567f5599cebfec5
6
+ metadata.gz: 8ffced78af7b77b13397d982f9ef62a255b754e055934b93cf5b9de64befc20efe82dc275292d32569f26bc63c7ac7d9cc50f694f14eb83842142103ab67fe0c
7
+ data.tar.gz: 131c3658bcbff1dcac74391a8109f2da000b4499ca8276b0ac342b0ae22714760240dc871d06d80112cb66c4630bca1ce3f8289e8d54646211b6443ab810a318
@@ -4,6 +4,7 @@ class @WebRTC
4
4
  @CALLING: 2
5
5
 
6
6
  myUserIdentifier: null
7
+ remoteUserIdentifier: null
7
8
 
8
9
  onWebSocketConnected: ->
9
10
  onWebSocketReconnectingStarted: ->
@@ -40,7 +41,7 @@ class @WebRTC
40
41
  return
41
42
 
42
43
  @_isCaller = true
43
- @_remoteUserIdentifier = remoteUserIdentifier
44
+ @remoteUserIdentifier = remoteUserIdentifier
44
45
  if !@_peerStarted && @_localStream
45
46
  @_sendMessage(
46
47
  type: 'call'
@@ -112,7 +113,7 @@ class @WebRTC
112
113
  @_sendValue('setMyToken')
113
114
  if @_wantWebRTCReconnecting
114
115
  @_wantWebRTCReconnecting = false
115
- @call(@_remoteUserIdentifier)
116
+ @call(@remoteUserIdentifier)
116
117
 
117
118
  @_webSocket.onclose = (event) =>
118
119
  unless @_isWebSocketReconnectingStarted
@@ -128,7 +129,7 @@ class @WebRTC
128
129
  return
129
130
 
130
131
  if eventType != 'myUserIdentifier' && eventType != 'call' && eventType != 'webSocketReconnected'
131
- if @_remoteUserIdentifier != event['remoteUserIdentifier']
132
+ if @remoteUserIdentifier != event['remoteUserIdentifier']
132
133
  return
133
134
 
134
135
  switch eventType
@@ -144,7 +145,7 @@ class @WebRTC
144
145
  @onWebSocketConnected()
145
146
  @_webSocketConnected = true
146
147
  when 'webSocketReconnected'
147
- if @_hangedUp || @_remoteUserIdentifier != event['remoteUserIdentifier']
148
+ if @_hangedUp || @remoteUserIdentifier != event['remoteUserIdentifier']
148
149
  @_sendMessageToOther(type: 'hangUp', event['remoteUserIdentifier'])
149
150
  when 'callFailed'
150
151
  @_callAnswerReceived = true
@@ -158,8 +159,8 @@ class @WebRTC
158
159
  else if event['reconnect'] && @_hangedUp
159
160
  @_sendMessage(type: 'hangUp')
160
161
  else
161
- @_remoteUserIdentifier = event['remoteUserIdentifier']
162
- @onWebRTCCall(@_remoteUserIdentifier)
162
+ @remoteUserIdentifier = event['remoteUserIdentifier']
163
+ @onWebRTCCall(@remoteUserIdentifier)
163
164
  when 'hangUp'
164
165
  @_callAnswerReceived = true
165
166
  @_hangUp()
@@ -211,7 +212,7 @@ class @WebRTC
211
212
  )
212
213
 
213
214
  _sendMessage: (message) ->
214
- @_sendMessageToOther(message, @_remoteUserIdentifier)
215
+ @_sendMessageToOther(message, @remoteUserIdentifier)
215
216
 
216
217
  _startOutput: (localOutput) ->
217
218
  isVideo = (@localOutput? && @localOutput.tagName.toUpperCase() == 'VIDEO')
@@ -303,7 +304,7 @@ class @WebRTC
303
304
  if @_isCaller
304
305
  @_webRTCReconnecting = true
305
306
  if @_webSocket.readyState == WebSocket.OPEN
306
- @call(@_remoteUserIdentifier)
307
+ @call(@remoteUserIdentifier)
307
308
  else
308
309
  @_wantWebRTCReconnecting = true
309
310
 
@@ -1,3 +1,3 @@
1
1
  module WebrtcRails
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webrtc-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koji Murata