@wazo/sdk 0.38.18 → 0.38.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/wazo-sdk.js +1 -1
  2. package/esm/__tests__/web-rtc-client.test.js +4 -2
  3. package/esm/checker/Checker.js +4 -2
  4. package/esm/checker/checks/index.js +4 -2
  5. package/esm/checker/checks/webrtc-transport.js +4 -2
  6. package/esm/checker/checks/webrtc.js +4 -2
  7. package/esm/index.js +4 -2
  8. package/esm/simple/Auth.js +4 -2
  9. package/esm/simple/Configuration.js +4 -2
  10. package/esm/simple/Phone.js +4 -2
  11. package/esm/simple/index.js +4 -2
  12. package/esm/simple/room/LocalParticipant.js +4 -2
  13. package/esm/simple/room/Participant.js +4 -2
  14. package/esm/simple/room/RemoteParticipant.js +4 -2
  15. package/esm/simple/room/Room.js +4 -2
  16. package/esm/simple/room/SipRoom.js +4 -2
  17. package/esm/simple/room/Stream.js +4 -2
  18. package/esm/simple/room/__tests__/Participant.test.js +4 -2
  19. package/esm/simple/room/__tests__/RemoteParticipant.test.js +4 -2
  20. package/esm/simple/utils.js +4 -2
  21. package/esm/web-rtc-client.js +4 -2
  22. package/lib/__tests__/web-rtc-client.test.js +4 -2
  23. package/lib/checker/Checker.js +4 -2
  24. package/lib/checker/checks/index.js +4 -2
  25. package/lib/checker/checks/webrtc-transport.js +4 -2
  26. package/lib/checker/checks/webrtc.js +4 -2
  27. package/lib/index.js +4 -2
  28. package/lib/simple/Auth.js +4 -2
  29. package/lib/simple/Configuration.js +4 -2
  30. package/lib/simple/Phone.js +4 -2
  31. package/lib/simple/index.js +4 -2
  32. package/lib/simple/room/LocalParticipant.js +4 -2
  33. package/lib/simple/room/Participant.js +4 -2
  34. package/lib/simple/room/RemoteParticipant.js +4 -2
  35. package/lib/simple/room/Room.js +4 -2
  36. package/lib/simple/room/SipRoom.js +4 -2
  37. package/lib/simple/room/Stream.js +4 -2
  38. package/lib/simple/room/__tests__/Participant.test.js +4 -2
  39. package/lib/simple/room/__tests__/RemoteParticipant.test.js +4 -2
  40. package/lib/simple/utils.js +4 -2
  41. package/lib/web-rtc-client.js +4 -2
  42. package/package.json +1 -1
  43. package/src/web-rtc-client.js +4 -2
@@ -8599,7 +8599,7 @@ class WebRTCClient extends Emitter {
8599
8599
 
8600
8600
  _setupMedias(session , newStream ) {
8601
8601
  // Safari hack, because you cannot call .play() from a non user action
8602
- const sessionId = this.getSipSessionId(session).substr(0, 20);
8602
+ const sessionId = this.getSipSessionId(session);
8603
8603
  const isConference = this.isConference(sessionId);
8604
8604
 
8605
8605
  if (sessionId in this.audioElements) {
@@ -8614,7 +8614,9 @@ class WebRTCClient extends Emitter {
8614
8614
  const audioElement = this.audioElements[sessionId];
8615
8615
  const sipSession = this.sipSessions[session.callId];
8616
8616
  const removeStream = this.getRemoteStream(sessionId);
8617
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
8617
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
8618
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
8619
+ const stream = newStream || removeStream || earlyStream;
8618
8620
 
8619
8621
  if (!this._isWeb() || !stream) {
8620
8622
  return;
@@ -8599,7 +8599,7 @@ class WebRTCClient extends Emitter {
8599
8599
 
8600
8600
  _setupMedias(session , newStream ) {
8601
8601
  // Safari hack, because you cannot call .play() from a non user action
8602
- const sessionId = this.getSipSessionId(session).substr(0, 20);
8602
+ const sessionId = this.getSipSessionId(session);
8603
8603
  const isConference = this.isConference(sessionId);
8604
8604
 
8605
8605
  if (sessionId in this.audioElements) {
@@ -8614,7 +8614,9 @@ class WebRTCClient extends Emitter {
8614
8614
  const audioElement = this.audioElements[sessionId];
8615
8615
  const sipSession = this.sipSessions[session.callId];
8616
8616
  const removeStream = this.getRemoteStream(sessionId);
8617
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
8617
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
8618
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
8619
+ const stream = newStream || removeStream || earlyStream;
8618
8620
 
8619
8621
  if (!this._isWeb() || !stream) {
8620
8622
  return;
@@ -8930,7 +8930,7 @@ class WebRTCClient extends Emitter {
8930
8930
 
8931
8931
  _setupMedias(session , newStream ) {
8932
8932
  // Safari hack, because you cannot call .play() from a non user action
8933
- const sessionId = this.getSipSessionId(session).substr(0, 20);
8933
+ const sessionId = this.getSipSessionId(session);
8934
8934
  const isConference = this.isConference(sessionId);
8935
8935
 
8936
8936
  if (sessionId in this.audioElements) {
@@ -8945,7 +8945,9 @@ class WebRTCClient extends Emitter {
8945
8945
  const audioElement = this.audioElements[sessionId];
8946
8946
  const sipSession = this.sipSessions[session.callId];
8947
8947
  const removeStream = this.getRemoteStream(sessionId);
8948
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
8948
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
8949
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
8950
+ const stream = newStream || removeStream || earlyStream;
8949
8951
 
8950
8952
  if (!this._isWeb() || !stream) {
8951
8953
  return;
@@ -8932,7 +8932,7 @@ class WebRTCClient extends Emitter {
8932
8932
 
8933
8933
  _setupMedias(session , newStream ) {
8934
8934
  // Safari hack, because you cannot call .play() from a non user action
8935
- const sessionId = this.getSipSessionId(session).substr(0, 20);
8935
+ const sessionId = this.getSipSessionId(session);
8936
8936
  const isConference = this.isConference(sessionId);
8937
8937
 
8938
8938
  if (sessionId in this.audioElements) {
@@ -8947,7 +8947,9 @@ class WebRTCClient extends Emitter {
8947
8947
  const audioElement = this.audioElements[sessionId];
8948
8948
  const sipSession = this.sipSessions[session.callId];
8949
8949
  const removeStream = this.getRemoteStream(sessionId);
8950
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
8950
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
8951
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
8952
+ const stream = newStream || removeStream || earlyStream;
8951
8953
 
8952
8954
  if (!this._isWeb() || !stream) {
8953
8955
  return;
@@ -8930,7 +8930,7 @@ class WebRTCClient extends Emitter {
8930
8930
 
8931
8931
  _setupMedias(session , newStream ) {
8932
8932
  // Safari hack, because you cannot call .play() from a non user action
8933
- const sessionId = this.getSipSessionId(session).substr(0, 20);
8933
+ const sessionId = this.getSipSessionId(session);
8934
8934
  const isConference = this.isConference(sessionId);
8935
8935
 
8936
8936
  if (sessionId in this.audioElements) {
@@ -8945,7 +8945,9 @@ class WebRTCClient extends Emitter {
8945
8945
  const audioElement = this.audioElements[sessionId];
8946
8946
  const sipSession = this.sipSessions[session.callId];
8947
8947
  const removeStream = this.getRemoteStream(sessionId);
8948
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
8948
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
8949
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
8950
+ const stream = newStream || removeStream || earlyStream;
8949
8951
 
8950
8952
  if (!this._isWeb() || !stream) {
8951
8953
  return;
@@ -8930,7 +8930,7 @@ class WebRTCClient extends Emitter {
8930
8930
 
8931
8931
  _setupMedias(session , newStream ) {
8932
8932
  // Safari hack, because you cannot call .play() from a non user action
8933
- const sessionId = this.getSipSessionId(session).substr(0, 20);
8933
+ const sessionId = this.getSipSessionId(session);
8934
8934
  const isConference = this.isConference(sessionId);
8935
8935
 
8936
8936
  if (sessionId in this.audioElements) {
@@ -8945,7 +8945,9 @@ class WebRTCClient extends Emitter {
8945
8945
  const audioElement = this.audioElements[sessionId];
8946
8946
  const sipSession = this.sipSessions[session.callId];
8947
8947
  const removeStream = this.getRemoteStream(sessionId);
8948
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
8948
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
8949
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
8950
+ const stream = newStream || removeStream || earlyStream;
8949
8951
 
8950
8952
  if (!this._isWeb() || !stream) {
8951
8953
  return;
@@ -8930,7 +8930,7 @@ class WebRTCClient extends Emitter {
8930
8930
 
8931
8931
  _setupMedias(session , newStream ) {
8932
8932
  // Safari hack, because you cannot call .play() from a non user action
8933
- const sessionId = this.getSipSessionId(session).substr(0, 20);
8933
+ const sessionId = this.getSipSessionId(session);
8934
8934
  const isConference = this.isConference(sessionId);
8935
8935
 
8936
8936
  if (sessionId in this.audioElements) {
@@ -8945,7 +8945,9 @@ class WebRTCClient extends Emitter {
8945
8945
  const audioElement = this.audioElements[sessionId];
8946
8946
  const sipSession = this.sipSessions[session.callId];
8947
8947
  const removeStream = this.getRemoteStream(sessionId);
8948
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
8948
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
8949
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
8950
+ const stream = newStream || removeStream || earlyStream;
8949
8951
 
8950
8952
  if (!this._isWeb() || !stream) {
8951
8953
  return;
@@ -8930,7 +8930,7 @@ class WebRTCClient extends Emitter {
8930
8930
 
8931
8931
  _setupMedias(session , newStream ) {
8932
8932
  // Safari hack, because you cannot call .play() from a non user action
8933
- const sessionId = this.getSipSessionId(session).substr(0, 20);
8933
+ const sessionId = this.getSipSessionId(session);
8934
8934
  const isConference = this.isConference(sessionId);
8935
8935
 
8936
8936
  if (sessionId in this.audioElements) {
@@ -8945,7 +8945,9 @@ class WebRTCClient extends Emitter {
8945
8945
  const audioElement = this.audioElements[sessionId];
8946
8946
  const sipSession = this.sipSessions[session.callId];
8947
8947
  const removeStream = this.getRemoteStream(sessionId);
8948
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
8948
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
8949
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
8950
+ const stream = newStream || removeStream || earlyStream;
8949
8951
 
8950
8952
  if (!this._isWeb() || !stream) {
8951
8953
  return;
@@ -8932,7 +8932,7 @@ class WebRTCClient extends Emitter {
8932
8932
 
8933
8933
  _setupMedias(session , newStream ) {
8934
8934
  // Safari hack, because you cannot call .play() from a non user action
8935
- const sessionId = this.getSipSessionId(session).substr(0, 20);
8935
+ const sessionId = this.getSipSessionId(session);
8936
8936
  const isConference = this.isConference(sessionId);
8937
8937
 
8938
8938
  if (sessionId in this.audioElements) {
@@ -8947,7 +8947,9 @@ class WebRTCClient extends Emitter {
8947
8947
  const audioElement = this.audioElements[sessionId];
8948
8948
  const sipSession = this.sipSessions[session.callId];
8949
8949
  const removeStream = this.getRemoteStream(sessionId);
8950
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
8950
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
8951
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
8952
+ const stream = newStream || removeStream || earlyStream;
8951
8953
 
8952
8954
  if (!this._isWeb() || !stream) {
8953
8955
  return;
@@ -7519,7 +7519,7 @@ class WebRTCClient extends Emitter {
7519
7519
 
7520
7520
  _setupMedias(session , newStream ) {
7521
7521
  // Safari hack, because you cannot call .play() from a non user action
7522
- const sessionId = this.getSipSessionId(session).substr(0, 20);
7522
+ const sessionId = this.getSipSessionId(session);
7523
7523
  const isConference = this.isConference(sessionId);
7524
7524
 
7525
7525
  if (sessionId in this.audioElements) {
@@ -7534,7 +7534,9 @@ class WebRTCClient extends Emitter {
7534
7534
  const audioElement = this.audioElements[sessionId];
7535
7535
  const sipSession = this.sipSessions[session.callId];
7536
7536
  const removeStream = this.getRemoteStream(sessionId);
7537
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
7537
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
7538
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
7539
+ const stream = newStream || removeStream || earlyStream;
7538
7540
 
7539
7541
  if (!this._isWeb() || !stream) {
7540
7542
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wazo/sdk",
3
- "version": "0.38.18",
3
+ "version": "0.38.20",
4
4
  "description": "Wazo's JavaScript Software Development Kit.",
5
5
  "main": "dist/wazo-sdk.js",
6
6
  "author": "Wazo (http://wazo.io)",
@@ -1965,7 +1965,7 @@ export default class WebRTCClient extends Emitter {
1965
1965
 
1966
1966
  _setupMedias(session: Session, newStream: ?MediaStream) {
1967
1967
  // Safari hack, because you cannot call .play() from a non user action
1968
- const sessionId = this.getSipSessionId(session).substr(0, 20);
1968
+ const sessionId = this.getSipSessionId(session);
1969
1969
  const isConference = this.isConference(sessionId);
1970
1970
 
1971
1971
  if (sessionId in this.audioElements) {
@@ -1980,7 +1980,9 @@ export default class WebRTCClient extends Emitter {
1980
1980
  const audioElement = this.audioElements[sessionId];
1981
1981
  const sipSession = this.sipSessions[session.callId];
1982
1982
  const removeStream = this.getRemoteStream(sessionId);
1983
- const stream = newStream || removeStream || sipSession.sessionDescriptionHandler.remoteMediaStream;
1983
+ const earlyStream = sipSession && sipSession.sessionDescriptionHandler
1984
+ ? sipSession.sessionDescriptionHandler.remoteMediaStream : null;
1985
+ const stream = newStream || removeStream || earlyStream;
1984
1986
 
1985
1987
  if (!this._isWeb() || !stream) {
1986
1988
  return;