webrtc-rails 0.3.10 → 0.3.11

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: 102ce3b28c0ad4bfe1f395b681ed5e323f5e550f
4
- data.tar.gz: 0a89133bbf6cd37e42251a12294ca4126b24c625
3
+ metadata.gz: be24d47fe4e296985fa163e55792456b3b95f270
4
+ data.tar.gz: 6a621ff3885d1241bb2b5ab13ae60ad32d03ea18
5
5
  SHA512:
6
- metadata.gz: f2c687e56fc2b4029bf6eb1e0788ddd95c82052d2a2076a10f2ac16d24ea84676e8d59ada51ac230734e83e0202e7de5faffdf8f199b9b6ccfc22d95a6447bc1
7
- data.tar.gz: fb3fb51c6b5d1e96549432b28a1baa15e4978ddb2e3b1c1736b9b58c851482433310ee778eb0bed0e4d7f1ca1621742cbc9b39fc7866c32c6f4723e6d5823e85
6
+ metadata.gz: 362fdb4b8bcc3aca24e5d967bf60ebc9d32bb476cb54b3d075d96ba54e77bb16f690fda609a73c198e0976862d5026872a352f32a21ab936520343bd73a59250
7
+ data.tar.gz: 71c64c555c991356f318faffde070663d9d0f5cd2e144f612fd5284d295fe8223348d1cec549936ed3666c866bf5a8c0636c29f853ea8c7f0f0e385ac40d73ae
@@ -281,12 +281,6 @@ class @WebRTC
281
281
  pcConfig = 'iceServers': [ "urls": "stun:stun.l.google.com:19302" ]
282
282
  peer = null
283
283
 
284
- onRemoteStreamAdded = (event) =>
285
- @remoteOutput.src = window.URL.createObjectURL(event.stream)
286
-
287
- onRemoteStreamRemoved = (event) =>
288
- @remoteOutput.src = ''
289
-
290
284
  try
291
285
  peer = new @_RTCPeerConnection(pcConfig)
292
286
  catch e
@@ -318,8 +312,9 @@ class @WebRTC
318
312
  @onWebRTCReconnected()
319
313
 
320
314
  peer.addStream(@_localStream)
321
- peer.addEventListener('addstream', onRemoteStreamAdded, false)
322
- peer.addEventListener('removestream', onRemoteStreamRemoved, false)
315
+ peer.onaddstream = (obj) =>
316
+ @remoteOutput.src = window.URL.createObjectURL(event.stream)
317
+
323
318
  peer
324
319
 
325
320
  _reconnectPeer: ->
@@ -372,6 +367,7 @@ class @WebRTC
372
367
  @_hangedUp = true
373
368
  @onWebRTCHangedUp()
374
369
  @remoteUserIdentifier = null
370
+ @remoteOutput.src = ''
375
371
 
376
372
  _stop: ->
377
373
  if @_peerConnection?
@@ -1,3 +1,3 @@
1
1
  module WebrtcRails
2
- VERSION = "0.3.10"
2
+ VERSION = "0.3.11"
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.10
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koji Murata