@flashphoner/websdk 2.0.240 → 2.0.241
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/docTemplate/README.md +1 -1
- package/examples/demo/streaming/embed_player/player.js +2 -0
- package/examples/demo/streaming/player/player.html +8 -0
- package/examples/demo/streaming/player/player.js +28 -6
- package/flashphoner-no-flash.js +38 -10
- package/flashphoner-no-flash.min.js +3 -3
- package/flashphoner-no-webrtc.js +26 -10
- package/flashphoner-no-webrtc.min.js +3 -3
- package/flashphoner-no-wsplayer.js +38 -10
- package/flashphoner-no-wsplayer.min.js +3 -3
- package/flashphoner-room-api.js +45 -14
- package/flashphoner-room-api.min.js +6 -6
- package/flashphoner-temasys-flash-websocket-without-adapterjs.js +26 -10
- package/flashphoner-temasys-flash-websocket.js +26 -10
- package/flashphoner-temasys-flash-websocket.min.js +3 -3
- package/flashphoner-webrtc-only.js +36 -8
- package/flashphoner-webrtc-only.min.js +1 -1
- package/flashphoner.js +38 -10
- package/flashphoner.min.js +3 -3
- package/package.json +1 -1
- package/src/flashphoner-core.js +28 -10
- package/src/media-source-media-provider.js +4 -4
- package/src/webrtc-media-provider.js +13 -0
package/package.json
CHANGED
package/src/flashphoner-core.js
CHANGED
|
@@ -1790,18 +1790,25 @@ var createSession = function (options) {
|
|
|
1790
1790
|
|
|
1791
1791
|
var event = streamInfo.status;
|
|
1792
1792
|
|
|
1793
|
-
if (event
|
|
1793
|
+
if (event === INBOUND_VIDEO_RATE || event === OUTBOUND_VIDEO_RATE) {
|
|
1794
1794
|
detectConnectionQuality(event, streamInfo);
|
|
1795
1795
|
return;
|
|
1796
1796
|
}
|
|
1797
1797
|
|
|
1798
|
-
|
|
1799
|
-
|
|
1798
|
+
if (event === STREAM_EVENT) {
|
|
1799
|
+
if (!streamInfo.mediaSessionId)
|
|
1800
|
+
streamInfo.mediaSessionId = id_;
|
|
1801
|
+
streamEventRefreshHandlers[id_](streamInfo);
|
|
1802
|
+
return;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
//Deprecated. WCS-3228: RESIZE, SNAPSHOT_COMPLETE and NOT_ENOUGH_BANDWIDTH moved to STREAM_EVENT
|
|
1806
|
+
if (event === STREAM_STATUS.RESIZE) {
|
|
1800
1807
|
resolution.width = streamInfo.streamerVideoWidth;
|
|
1801
1808
|
resolution.height = streamInfo.streamerVideoHeight;
|
|
1802
|
-
} else if (event
|
|
1809
|
+
} else if (event === STREAM_STATUS.SNAPSHOT_COMPLETE) {
|
|
1803
1810
|
|
|
1804
|
-
} else if (event
|
|
1811
|
+
} else if (event === STREAM_STATUS.NOT_ENOUGH_BANDWIDTH) {
|
|
1805
1812
|
var info = streamInfo.info.split("/");
|
|
1806
1813
|
remoteBitrate = info[0];
|
|
1807
1814
|
networkBandwidth = info[1];
|
|
@@ -1809,15 +1816,17 @@ var createSession = function (options) {
|
|
|
1809
1816
|
status_ = event;
|
|
1810
1817
|
}
|
|
1811
1818
|
|
|
1812
|
-
|
|
1813
|
-
|
|
1819
|
+
if (streamInfo.audioState)
|
|
1820
|
+
audioState_ = streamInfo.audioState;
|
|
1821
|
+
if (streamInfo.videoState)
|
|
1822
|
+
videoState_ = streamInfo.videoState;
|
|
1814
1823
|
|
|
1815
1824
|
if (streamInfo.info)
|
|
1816
1825
|
info_ = streamInfo.info;
|
|
1817
1826
|
|
|
1818
1827
|
//release stream
|
|
1819
|
-
if (event
|
|
1820
|
-
event
|
|
1828
|
+
if (event === STREAM_STATUS.FAILED || event === STREAM_STATUS.STOPPED ||
|
|
1829
|
+
event === STREAM_STATUS.UNPUBLISHED) {
|
|
1821
1830
|
|
|
1822
1831
|
delete streams[id_];
|
|
1823
1832
|
delete streamRefreshHandlers[id_];
|
|
@@ -1920,7 +1929,8 @@ var createSession = function (options) {
|
|
|
1920
1929
|
playoutDelay: playoutDelay,
|
|
1921
1930
|
unmutePlayOnStart: unmutePlayOnStart,
|
|
1922
1931
|
useControls: useControls,
|
|
1923
|
-
logger: logger
|
|
1932
|
+
logger: logger,
|
|
1933
|
+
unmuteRequiredEvent: fireUnmuteEvent
|
|
1924
1934
|
}, streamRefreshHandlers[id_]).then(function (newConnection) {
|
|
1925
1935
|
mediaConnection = newConnection;
|
|
1926
1936
|
try {
|
|
@@ -2599,6 +2609,14 @@ var createSession = function (options) {
|
|
|
2599
2609
|
return streamLogger;
|
|
2600
2610
|
};
|
|
2601
2611
|
|
|
2612
|
+
var fireUnmuteEvent = function() {
|
|
2613
|
+
if (isRemoteAudioMuted()) {
|
|
2614
|
+
if (streamRefreshHandlers[id_] && typeof streamRefreshHandlers[id_] === 'function') {
|
|
2615
|
+
streamRefreshHandlers[id_]({status: STREAM_EVENT, type: STREAM_EVENT_TYPE.UNMUTE_REQUIRED});
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
};
|
|
2619
|
+
|
|
2602
2620
|
stream.play = play;
|
|
2603
2621
|
stream.publish = publish;
|
|
2604
2622
|
stream.stop = stop;
|