uneeq-js 2.40.3 → 2.40.4

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.
@@ -5,7 +5,6 @@ export declare class MediaHandler {
5
5
  private options;
6
6
  private remoteVideoReady;
7
7
  remoteStream$: BehaviorSubject<any>;
8
- remoteTrack$: BehaviorSubject<any>;
9
8
  avatarVideoElement: HTMLMediaElement;
10
9
  localStream$: BehaviorSubject<any>;
11
10
  publishState$: BehaviorSubject<PublishSubscribeState>;
@@ -33,7 +33,6 @@ export declare class UneeqWebRTC {
33
33
  sendDataMessage(message: string): void;
34
34
  getStats(callback: any): any;
35
35
  updateStreamTracks(stream: MediaStream): void;
36
- private sdpTransform;
37
36
  private onStats;
38
37
  private enableDiagnostics;
39
38
  private isMessageForUs;
@@ -60,7 +59,6 @@ export interface UneeqWebRTCOptions {
60
59
  forceTurnServerUse?: boolean;
61
60
  diagnostics?: boolean;
62
61
  onAddStream?: (stream: any) => void;
63
- onAddTrack?: (track: MediaStreamTrack) => void;
64
62
  onConnect?: () => void;
65
63
  onData?: (data: any) => void;
66
64
  onClose?: () => void;
package/dist/umd/index.js CHANGED
@@ -18117,7 +18117,7 @@ function zipAll(project) {
18117
18117
  /* 224 */
18118
18118
  /***/ (function(module) {
18119
18119
 
18120
- module.exports = JSON.parse("{\"name\":\"uneeq-js\",\"version\":\"2.40.2\",\"description\":\"\",\"main\":\"dist/index.js\",\"types\":\"dist/src/index.d.ts\",\"scripts\":{\"start\":\"npx webpack -w\",\"test-local\":\"./node_modules/karma/bin/karma start karma.conf.js -logLevel=DEBUG\",\"test\":\"./node_modules/karma/bin/karma start --browsers ChromeHeadless --single-run\",\"test:windows\":\"karma start karma.conf.js\",\"build\":\"webpack --config webpack.config.prod.js && webpack --config webpack.config.umd.js\",\"lint\":\"./node_modules/tslint/bin/tslint -p tsconfig.json --fix\",\"docs\":\"./node_modules/typedoc/bin/typedoc --options\"},\"files\":[\"dist\",\"!dist/test\"],\"author\":\"\",\"license\":\"ISC\",\"dependencies\":{\"@stomp/stompjs\":\"^6.0.0\",\"@uehreka/seriously\":\"^1.0.1\",\"fast-text-encoding\":\"^1.0.0\",\"intrinsic-scale\":\"^3.0.4\",\"promjs\":\"^0.4.1\",\"rxjs\":\"^6.2.2\",\"rxjs-compat\":\"^6.3.2\",\"simple-peer\":\"9.11.0\",\"webrtc-adapter\":\"8.1.0\"},\"devDependencies\":{\"@types/jasmine\":\"^2.8.8\",\"@types/node\":\"^10.9.4\",\"fetch-mock\":\"7.7.3\",\"ignore-styles\":\"^5.0.1\",\"jasmine\":\"^3.2.0\",\"jasmine-class-mock\":\"^1.0.1\",\"jasmine-core\":\"^3.3.0\",\"karma\":\"^5.0.0\",\"karma-chrome-launcher\":\"^2.2.0\",\"karma-firefox-launcher\":\"^1.1.0\",\"karma-jasmine\":\"^2.0.1\",\"karma-jasmine-html-reporter\":\"^1.4.0\",\"karma-requirejs\":\"^1.1.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-typescript\":\"^5.0.0\",\"karma-typescript-es6-transform\":\"^5.0.0\",\"nock\":\"^9.6.1\",\"requirejs\":\"^2.3.6\",\"ts-loader\":\"^5.0.0\",\"ts-node\":\"^7.0.1\",\"tslint\":\"^5.11.0\",\"tslint-no-focused-test\":\"^0.5.0\",\"typedoc\":\"^0.18.0\",\"typescript\":\"^3.9.7\",\"webpack\":\"^4.17.1\",\"webpack-cli\":\"^3.1.0\"}}");
18120
+ module.exports = JSON.parse("{\"name\":\"uneeq-js\",\"version\":\"2.40.3\",\"description\":\"\",\"main\":\"dist/index.js\",\"types\":\"dist/src/index.d.ts\",\"scripts\":{\"start\":\"npx webpack -w\",\"test-local\":\"./node_modules/karma/bin/karma start karma.conf.js -logLevel=DEBUG\",\"test\":\"./node_modules/karma/bin/karma start --browsers ChromeHeadless --single-run\",\"test:windows\":\"karma start karma.conf.js\",\"build\":\"webpack --config webpack.config.prod.js && webpack --config webpack.config.umd.js\",\"lint\":\"./node_modules/tslint/bin/tslint -p tsconfig.json --fix\",\"docs\":\"./node_modules/typedoc/bin/typedoc --options\"},\"files\":[\"dist\",\"!dist/test\"],\"author\":\"\",\"license\":\"ISC\",\"dependencies\":{\"@stomp/stompjs\":\"^6.0.0\",\"@uehreka/seriously\":\"^1.0.1\",\"fast-text-encoding\":\"^1.0.0\",\"intrinsic-scale\":\"^3.0.4\",\"promjs\":\"^0.4.1\",\"rxjs\":\"^6.2.2\",\"rxjs-compat\":\"^6.3.2\",\"simple-peer\":\"9.11.0\",\"webrtc-adapter\":\"8.1.0\"},\"devDependencies\":{\"@types/jasmine\":\"^2.8.8\",\"@types/node\":\"^10.9.4\",\"fetch-mock\":\"7.7.3\",\"ignore-styles\":\"^5.0.1\",\"jasmine\":\"^3.2.0\",\"jasmine-class-mock\":\"^1.0.1\",\"jasmine-core\":\"^3.3.0\",\"karma\":\"^5.0.0\",\"karma-chrome-launcher\":\"^2.2.0\",\"karma-firefox-launcher\":\"^1.1.0\",\"karma-jasmine\":\"^2.0.1\",\"karma-jasmine-html-reporter\":\"^1.4.0\",\"karma-requirejs\":\"^1.1.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-typescript\":\"^5.0.0\",\"karma-typescript-es6-transform\":\"^5.0.0\",\"nock\":\"^9.6.1\",\"requirejs\":\"^2.3.6\",\"ts-loader\":\"^5.0.0\",\"ts-node\":\"^7.0.1\",\"tslint\":\"^5.11.0\",\"tslint-no-focused-test\":\"^0.5.0\",\"typedoc\":\"^0.18.0\",\"typescript\":\"^3.9.7\",\"webpack\":\"^4.17.1\",\"webpack-cli\":\"^3.1.0\"}}");
18121
18121
 
18122
18122
  /***/ }),
18123
18123
  /* 225 */
@@ -18492,7 +18492,6 @@ class MediaHandler {
18492
18492
  this.remoteVideoReady = remoteVideoReady;
18493
18493
  /* Subscribe */
18494
18494
  this.remoteStream$ = new rxjs_1.BehaviorSubject(null);
18495
- this.remoteTrack$ = new rxjs_1.BehaviorSubject(null);
18496
18495
  /* Publish */
18497
18496
  this.localStream$ = new rxjs_1.BehaviorSubject(null);
18498
18497
  this.publishState$ = new rxjs_1.BehaviorSubject(PublishSubscribeState_1.PublishSubscribeState.DISCONNECTED);
@@ -18513,16 +18512,6 @@ class MediaHandler {
18513
18512
  }
18514
18513
  remoteVideoReady();
18515
18514
  });
18516
- this.remoteTrack$.filter((track) => track !== null).subscribe((track) => {
18517
- if (track.kind === 'audio') {
18518
- const audioElement = document.createElement('Audio');
18519
- const audioStream = new MediaStream();
18520
- audioStream.addTrack(track);
18521
- audioElement.srcObject = audioStream;
18522
- audioElement.play();
18523
- return;
18524
- }
18525
- });
18526
18515
  this.localStream$.filter((stream) => stream !== null).subscribe((stream) => {
18527
18516
  const video = document.createElement('video');
18528
18517
  this.localVideoElement = video;
@@ -18635,7 +18624,6 @@ class MediaHandler {
18635
18624
  const forceTurnServerUse = this.options.session.forceTurnServerUse;
18636
18625
  const publishState = this.publishState$;
18637
18626
  const remoteStream = this.remoteStream$;
18638
- const remoteTrack = this.remoteTrack$;
18639
18627
  const stream = this.localStream$.getValue();
18640
18628
  if (!stream || !this.options.session.edgeNodeId) {
18641
18629
  console.error('Not ready to publish');
@@ -18662,10 +18650,6 @@ class MediaHandler {
18662
18650
  logger_1.logger.log('WEBRTC: onAddStream ' + event.stream);
18663
18651
  remoteStream.next(event.stream);
18664
18652
  },
18665
- onAddTrack: (event) => {
18666
- logger_1.logger.log('WEBRTC: onAddTrack', event);
18667
- remoteTrack.next(event);
18668
- },
18669
18653
  forceTurnServerUse: forceTurnServerUse,
18670
18654
  iceServers: [{
18671
18655
  urls: turnServerAddresses,
@@ -25819,12 +25803,10 @@ class UneeqWebRTC {
25819
25803
  this.close();
25820
25804
  this.client = new simple_peer_1.default({
25821
25805
  initiator: true,
25822
- config: { iceServers: this.options.iceServers, sdpSemantics: 'unified-plan', c: false },
25806
+ config: { iceServers: this.options.iceServers },
25823
25807
  stream: stream,
25824
25808
  channelName: 'UneeqChannel',
25825
25809
  });
25826
- // sdpSemantics: 'unified-plan'
25827
- console.log('Peer Client: ', this.client);
25828
25810
  if (this.options.diagnostics) {
25829
25811
  this.enableDiagnostics();
25830
25812
  }
@@ -25848,9 +25830,6 @@ class UneeqWebRTC {
25848
25830
  edgeNodeId: this.options.edgeNodeId
25849
25831
  };
25850
25832
  if ('type' in data && data['type'] === 'offer') {
25851
- console.log('sdp: ', data.sdp);
25852
- data.sdp = data.sdp.replace('useinbandfec=1', 'useinbandfec=1;stereo=1;sprop-maxcapturerate=48000');
25853
- // console.log('*** setting audio to stereo');
25854
25833
  msgPayload['payload'] = JSON.stringify({ type: 'offer', sdp: data.sdp });
25855
25834
  msgPayload['type'] = 'OfferMessage';
25856
25835
  this.log('Offer payload ', msgPayload);
@@ -25898,11 +25877,6 @@ class UneeqWebRTC {
25898
25877
  this.options.onAddStream({ stream: mediaStream });
25899
25878
  }
25900
25879
  });
25901
- this.client.on('track', (e) => {
25902
- if (this.options.onAddTrack !== undefined) {
25903
- this.options.onAddTrack(e);
25904
- }
25905
- });
25906
25880
  }
25907
25881
  /**
25908
25882
  * Close the connection.
@@ -25974,11 +25948,6 @@ class UneeqWebRTC {
25974
25948
  });
25975
25949
  });
25976
25950
  }
25977
- sdpTransform(sdp) {
25978
- sdp = sdp.replace('useinbandfec=1', 'useinbandfec=1;stereo=1;sprop-maxcapturerate=48000');
25979
- console.log('*** setting audio to stereo', sdp);
25980
- return sdp;
25981
- }
25982
25951
  enableDiagnostics() {
25983
25952
  // workaround for firefox
25984
25953
  if (this.client._pc && this.client._pc.getStats.length !== 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uneeq-js",
3
- "version": "2.40.3",
3
+ "version": "2.40.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/src/index.d.ts",
package/readme.md CHANGED
@@ -8,6 +8,9 @@ https://docs.uneeq.io/#/js_sdk
8
8
  To use uneeq-js with a typescript version < 3.8, 'skipLibCheck' must be set to true.
9
9
 
10
10
  ## Release Notes
11
+ #### 2.41.0
12
+ * Added support for voice activity detection
13
+
11
14
  #### 2.40.2
12
15
  * Minor tweak to client performance metricing
13
16