@flashphoner/websdk 2.0.217 → 2.0.221

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 (31) hide show
  1. package/docTemplate/README.md +1 -1
  2. package/examples/demo/streaming/conference/conference.js +9 -1
  3. package/examples/demo/streaming/console/console.html +149 -1
  4. package/examples/demo/streaming/console/console.js +282 -2
  5. package/examples/demo/streaming/console/jquery.dataTables.css +604 -0
  6. package/examples/demo/streaming/console/jquery.dataTables.js +15562 -0
  7. package/examples/demo/streaming/media_devices_manager/manager.js +49 -30
  8. package/examples/demo/streaming/player/player.js +12 -2
  9. package/examples/demo/streaming/stream-snapshot/stream-snapshot.js +11 -11
  10. package/examples/demo/streaming/video-chat-and-screen-sharing/video-chat-and-screen-sharing.js +12 -0
  11. package/flashphoner-no-flash.js +45 -4
  12. package/flashphoner-no-flash.min.js +1 -1
  13. package/flashphoner-no-webrtc.js +45 -4
  14. package/flashphoner-no-webrtc.min.js +1 -1
  15. package/flashphoner-no-wsplayer.js +45 -4
  16. package/flashphoner-no-wsplayer.min.js +1 -1
  17. package/flashphoner-rest-api.js +9 -1
  18. package/flashphoner-room-api.js +39 -3
  19. package/flashphoner-room-api.min.js +1 -1
  20. package/flashphoner-temasys-flash-websocket-without-adapterjs.js +45 -4
  21. package/flashphoner-temasys-flash-websocket.js +45 -4
  22. package/flashphoner-temasys-flash-websocket.min.js +1 -1
  23. package/flashphoner-webrtc-only.js +44 -3
  24. package/flashphoner-webrtc-only.min.js +1 -1
  25. package/flashphoner.js +45 -4
  26. package/flashphoner.min.js +1 -1
  27. package/package.json +1 -1
  28. package/src/constants.js +28 -1
  29. package/src/flashphoner-core.js +10 -1
  30. package/src/media-source-media-provider.js +1 -1
  31. package/src/rest-module.js +9 -1
@@ -7892,6 +7892,7 @@ var STREAM_STATUS = Object.freeze({
7892
7892
  PLAYBACK_PROBLEM: 'PLAYBACK_PROBLEM',
7893
7893
 
7894
7894
  /**
7895
+ * @deprecated WCS-3228 moved to {@link STREAM_EVENT_TYPE}
7895
7896
  * Fires if playing {@link Stream} picture resizing.
7896
7897
  * @event RESIZE
7897
7898
  * @memberof Flashphoner.constants.STREAM_STATUS
@@ -7899,6 +7900,7 @@ var STREAM_STATUS = Object.freeze({
7899
7900
  RESIZE: 'RESIZE',
7900
7901
 
7901
7902
  /**
7903
+ * @deprecated WCS-3228 moved to {@link STREAM_EVENT_TYPE}
7902
7904
  * Fires when {@link Stream} snapshot becomes available.
7903
7905
  * Snapshot is base64 encoded png available through {@link Stream.getInfo}
7904
7906
  * @event SNAPSHOT_COMPLETE
@@ -7907,6 +7909,7 @@ var STREAM_STATUS = Object.freeze({
7907
7909
  SNAPSHOT_COMPLETE: 'SNAPSHOT_COMPLETE',
7908
7910
 
7909
7911
  /**
7912
+ * @deprecated WCS-3228 moved to {@link STREAM_EVENT_TYPE}
7910
7913
  * Fires on playing {@link Stream} if bitrate is higher than available network bandwidth.
7911
7914
  * @event NOT_ENOUGH_BANDWIDTH
7912
7915
  * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
@@ -8605,7 +8608,35 @@ var STREAM_EVENT_TYPE = Object.freeze({
8605
8608
  * @see Stream
8606
8609
  * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
8607
8610
  */
8608
- DATA: 'data'
8611
+ DATA: 'data',
8612
+
8613
+ /**
8614
+ * Stream snapshot is completed
8615
+ * @see Stream
8616
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
8617
+ */
8618
+ SNAPSHOT_COMPLETED: 'snapshotCompleted',
8619
+
8620
+ /**
8621
+ * Stream snapshot is failed
8622
+ * @see Stream
8623
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
8624
+ */
8625
+ SNAPSHOT_FAILED: 'snapshotFailed',
8626
+
8627
+ /**
8628
+ * Fires if playing {@link Stream} picture resizing.
8629
+ * @event RESIZE
8630
+ * @memberof Flashphoner.constants.STREAM_STATUS
8631
+ */
8632
+ RESIZE: 'resize',
8633
+
8634
+ /**
8635
+ * Fires on playing {@link Stream} if bitrate is higher than available network bandwidth.
8636
+ * @event NOT_ENOUGH_BANDWIDTH
8637
+ * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
8638
+ */
8639
+ NOT_ENOUGH_BANDWIDTH: 'notEnoughBandwidth'
8609
8640
  });
8610
8641
  /**
8611
8642
  * WebRTC video content hint type
@@ -9280,7 +9311,7 @@ var createSession = function createSession(options) {
9280
9311
  mediaProviders: Object.keys(MediaProvider),
9281
9312
  keepAlive: keepAlive,
9282
9313
  authToken: authToken,
9283
- clientVersion: "2.0.217",
9314
+ clientVersion: "2.0",
9284
9315
  clientOSVersion: window.navigator.appVersion,
9285
9316
  clientBrowserVersion: window.navigator.userAgent,
9286
9317
  msePacketizationVersion: 2,
@@ -10582,6 +10613,15 @@ var createSession = function createSession(options) {
10582
10613
  var stream = {};
10583
10614
 
10584
10615
  streamEventRefreshHandlers[id_] = function (streamEvent) {
10616
+ if (streamEvent.type == STREAM_EVENT_TYPE.NOT_ENOUGH_BANDWIDTH) {
10617
+ var info = streamEvent.payload.info.split("/");
10618
+ remoteBitrate = info[0];
10619
+ networkBandwidth = info[1];
10620
+ } else if (streamEvent.type == STREAM_EVENT_TYPE.RESIZE) {
10621
+ resolution.width = streamEvent.payload.streamerVideoWidth;
10622
+ resolution.height = streamEvent.payload.streamerVideoHeight;
10623
+ }
10624
+
10585
10625
  if (callbacks[STREAM_EVENT]) {
10586
10626
  callbacks[STREAM_EVENT](streamEvent);
10587
10627
  }
@@ -10617,7 +10657,8 @@ var createSession = function createSession(options) {
10617
10657
  if (event == INBOUND_VIDEO_RATE || event == OUTBOUND_VIDEO_RATE) {
10618
10658
  detectConnectionQuality(event, streamInfo);
10619
10659
  return;
10620
- }
10660
+ } //Depricated. WCS-3228: RESIZE, SNAPSHOT_COMPLETE and NOT_ENOUGH_BANDWIDTH moved to STREAM_EVENT
10661
+
10621
10662
 
10622
10663
  if (event == STREAM_STATUS.RESIZE) {
10623
10664
  resolution.width = streamInfo.streamerVideoWidth;