Guest User

Untitled

a guest
Aug 16th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. peerx.on('signal', function(data)
  2. {
  3.  
  4. console.log("1");
  5.  
  6. console.log(JSON.stringify(data));
  7.  
  8. this.targetpeer = data;
  9.  
  10. **this.initiatorOffer = JSON.stringify(data); // i have initialized there**
  11.  
  12. console.log(this.initiatorOffer);
  13.  
  14.  
  15. }
  16.  
  17. this._chatservice.clientconnected().subscribe(data => {
  18.  
  19. **console.log(this.initiatorOffer);** // getting value
  20.  
  21. })
  22.  
  23. peerx.on('signal', function(data)
  24. {
  25. this.ngZone.run(() => {
  26. console.log("1");
  27. console.log(JSON.stringify(data));
  28. this.targetpeer = data;
  29. this.initiatorOffer = JSON.stringify(data); // i have initialized there**
  30. console.log(this.initiatorOffer);
  31. })
  32. })
Add Comment
Please, Sign In to add comment