@flashphoner/websdk 2.0.218 → 2.0.222
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.
- package/Gruntfile.js +30 -1
- package/docTemplate/README.md +1 -1
- package/examples/demo/streaming/console/console.html +149 -1
- package/examples/demo/streaming/console/console.js +282 -2
- package/examples/demo/streaming/console/jquery.dataTables.css +604 -0
- package/examples/demo/streaming/console/jquery.dataTables.js +15562 -0
- package/examples/demo/streaming/media_devices_manager/manager.js +49 -30
- package/examples/demo/streaming/player/player.js +12 -2
- package/examples/demo/streaming/stream-snapshot/stream-snapshot.js +11 -11
- package/flashphoner-no-flash.js +49 -7
- package/flashphoner-no-flash.min.js +1 -1
- package/flashphoner-no-webrtc.js +4675 -6124
- package/flashphoner-no-webrtc.min.js +2 -2
- package/flashphoner-no-wsplayer.js +4100 -5549
- package/flashphoner-no-wsplayer.min.js +2 -2
- package/flashphoner-rest-api.js +9 -1
- package/flashphoner-room-api.js +82 -659
- package/flashphoner-room-api.min.js +2 -2
- package/flashphoner-temasys-flash-websocket-without-adapterjs.js +4162 -5611
- package/flashphoner-temasys-flash-websocket.js +4162 -5611
- package/flashphoner-temasys-flash-websocket.min.js +1 -1
- package/flashphoner-webrtc-only.js +48 -6
- package/flashphoner-webrtc-only.min.js +1 -1
- package/flashphoner.js +4170 -5619
- package/flashphoner.min.js +2 -2
- package/package.json +1 -1
- package/src/constants.js +28 -1
- package/src/flashphoner-core.js +12 -2
- package/src/media-source-media-provider.js +1 -1
- package/src/rest-module.js +9 -1
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -147,12 +147,14 @@ const STREAM_STATUS = Object.freeze({
|
|
|
147
147
|
*/
|
|
148
148
|
PLAYBACK_PROBLEM: 'PLAYBACK_PROBLEM',
|
|
149
149
|
/**
|
|
150
|
+
* @deprecated WCS-3228 moved to {@link STREAM_EVENT_TYPE}
|
|
150
151
|
* Fires if playing {@link Stream} picture resizing.
|
|
151
152
|
* @event RESIZE
|
|
152
153
|
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
153
154
|
*/
|
|
154
155
|
RESIZE: 'RESIZE',
|
|
155
156
|
/**
|
|
157
|
+
* @deprecated WCS-3228 moved to {@link STREAM_EVENT_TYPE}
|
|
156
158
|
* Fires when {@link Stream} snapshot becomes available.
|
|
157
159
|
* Snapshot is base64 encoded png available through {@link Stream.getInfo}
|
|
158
160
|
* @event SNAPSHOT_COMPLETE
|
|
@@ -160,6 +162,7 @@ const STREAM_STATUS = Object.freeze({
|
|
|
160
162
|
*/
|
|
161
163
|
SNAPSHOT_COMPLETE: 'SNAPSHOT_COMPLETE',
|
|
162
164
|
/**
|
|
165
|
+
* @deprecated WCS-3228 moved to {@link STREAM_EVENT_TYPE}
|
|
163
166
|
* Fires on playing {@link Stream} if bitrate is higher than available network bandwidth.
|
|
164
167
|
* @event NOT_ENOUGH_BANDWIDTH
|
|
165
168
|
* @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
|
|
@@ -775,7 +778,31 @@ const STREAM_EVENT_TYPE = Object.freeze({
|
|
|
775
778
|
* @see Stream
|
|
776
779
|
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
777
780
|
*/
|
|
778
|
-
DATA: 'data'
|
|
781
|
+
DATA: 'data',
|
|
782
|
+
/**
|
|
783
|
+
* Stream snapshot is completed
|
|
784
|
+
* @see Stream
|
|
785
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
786
|
+
*/
|
|
787
|
+
SNAPSHOT_COMPLETED: 'snapshotCompleted',
|
|
788
|
+
/**
|
|
789
|
+
* Stream snapshot is failed
|
|
790
|
+
* @see Stream
|
|
791
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
792
|
+
*/
|
|
793
|
+
SNAPSHOT_FAILED: 'snapshotFailed',
|
|
794
|
+
/**
|
|
795
|
+
* Fires if playing {@link Stream} picture resizing.
|
|
796
|
+
* @event RESIZE
|
|
797
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
798
|
+
*/
|
|
799
|
+
RESIZE: 'resize',
|
|
800
|
+
/**
|
|
801
|
+
* Fires on playing {@link Stream} if bitrate is higher than available network bandwidth.
|
|
802
|
+
* @event NOT_ENOUGH_BANDWIDTH
|
|
803
|
+
* @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
|
|
804
|
+
*/
|
|
805
|
+
NOT_ENOUGH_BANDWIDTH: 'notEnoughBandwidth'
|
|
779
806
|
});
|
|
780
807
|
|
|
781
808
|
/**
|
package/src/flashphoner-core.js
CHANGED
|
@@ -108,7 +108,8 @@ var init = function (options) {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
// flashMediaProvider is disables by default due to end of support in the most browsers #WCS-3577
|
|
112
|
+
var flashProvider = null;
|
|
112
113
|
if (flashProvider && flashProvider.hasOwnProperty('available') && flashProvider.available() &&
|
|
113
114
|
(!MediaProvider.WebRTC || (options.preferredMediaProviders && options.preferredMediaProviders.indexOf("Flash") >= 0))) {
|
|
114
115
|
MediaProvider.Flash = flashProvider;
|
|
@@ -561,7 +562,7 @@ var createSession = function (options) {
|
|
|
561
562
|
mediaProviders: Object.keys(MediaProvider),
|
|
562
563
|
keepAlive: keepAlive,
|
|
563
564
|
authToken:authToken,
|
|
564
|
-
clientVersion: "2.0
|
|
565
|
+
clientVersion: "2.0",
|
|
565
566
|
clientOSVersion: window.navigator.appVersion,
|
|
566
567
|
clientBrowserVersion: window.navigator.userAgent,
|
|
567
568
|
msePacketizationVersion: 2,
|
|
@@ -1721,6 +1722,14 @@ var createSession = function (options) {
|
|
|
1721
1722
|
var stream = {};
|
|
1722
1723
|
|
|
1723
1724
|
streamEventRefreshHandlers[id_] = function (streamEvent) {
|
|
1725
|
+
if (streamEvent.type == STREAM_EVENT_TYPE.NOT_ENOUGH_BANDWIDTH) {
|
|
1726
|
+
var info = streamEvent.payload.info.split("/");
|
|
1727
|
+
remoteBitrate = info[0];
|
|
1728
|
+
networkBandwidth = info[1];
|
|
1729
|
+
} else if (streamEvent.type == STREAM_EVENT_TYPE.RESIZE) {
|
|
1730
|
+
resolution.width = streamEvent.payload.streamerVideoWidth;
|
|
1731
|
+
resolution.height = streamEvent.payload.streamerVideoHeight;
|
|
1732
|
+
}
|
|
1724
1733
|
if (callbacks[STREAM_EVENT]) {
|
|
1725
1734
|
callbacks[STREAM_EVENT](streamEvent);
|
|
1726
1735
|
}
|
|
@@ -1757,6 +1766,7 @@ var createSession = function (options) {
|
|
|
1757
1766
|
return;
|
|
1758
1767
|
}
|
|
1759
1768
|
|
|
1769
|
+
//Depricated. WCS-3228: RESIZE, SNAPSHOT_COMPLETE and NOT_ENOUGH_BANDWIDTH moved to STREAM_EVENT
|
|
1760
1770
|
if (event == STREAM_STATUS.RESIZE) {
|
|
1761
1771
|
resolution.width = streamInfo.streamerVideoWidth;
|
|
1762
1772
|
resolution.height = streamInfo.streamerVideoHeight;
|