@flashphoner/websdk 2.0.240 → 2.0.242
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 +42 -13
- package/flashphoner-no-flash.min.js +3 -3
- package/flashphoner-no-webrtc.js +28 -12
- package/flashphoner-no-webrtc.min.js +3 -3
- package/flashphoner-no-wsplayer.js +42 -13
- package/flashphoner-no-wsplayer.min.js +3 -3
- package/flashphoner-room-api.js +49 -17
- package/flashphoner-room-api.min.js +6 -6
- package/flashphoner-temasys-flash-websocket-without-adapterjs.js +28 -12
- package/flashphoner-temasys-flash-websocket.js +28 -12
- package/flashphoner-temasys-flash-websocket.min.js +3 -3
- package/flashphoner-webrtc-only.js +40 -11
- package/flashphoner-webrtc-only.min.js +1 -1
- package/flashphoner.js +42 -13
- package/flashphoner.min.js +3 -3
- package/package.json +1 -1
- package/src/flashphoner-core.js +30 -12
- package/src/media-source-media-provider.js +4 -4
- package/src/webrtc-media-provider.js +15 -1
package/package.json
CHANGED
package/src/flashphoner-core.js
CHANGED
|
@@ -829,7 +829,7 @@ var createSession = function (options) {
|
|
|
829
829
|
* @param {string=} options.stripCodecs Comma separated strings of codecs which should be stripped from WebRTC SDP (ex. "SILK,G722")
|
|
830
830
|
* @param {Array<string>=} options.sipSDP Array of custom SDP params (ex. bandwidth (b=))
|
|
831
831
|
* @param {Array<string>=} options.sipHeaders Array of custom SIP headers
|
|
832
|
-
* @param {string=} options.videoContentHint Video content hint for browser ('
|
|
832
|
+
* @param {string=} options.videoContentHint Video content hint for browser ('motion' by default to maintain bitrate and fps), {@link Flashphoner.constants.CONTENT_HINT_TYPE}
|
|
833
833
|
* @param {Boolean=} options.useControls Use a standard HTML5 video controls (play, pause, fullscreen). May be a workaround for fullscreen mode to work in Safari 16
|
|
834
834
|
* @param {Object=} options.logger Call logger options
|
|
835
835
|
* @param {sdpHook} sdpHook The callback that handles sdp from the server
|
|
@@ -1619,7 +1619,7 @@ var createSession = function (options) {
|
|
|
1619
1619
|
* @param {Boolean=} options.cvoExtension Enable rtp video orientation extension
|
|
1620
1620
|
* @param {Integer=} options.playoutDelay Time delay between network reception of media and playout
|
|
1621
1621
|
* @param {string=} options.useCanvasMediaStream EXPERIMENTAL: when publish bind browser's media stream to the canvas. It can be useful for image filtering
|
|
1622
|
-
* @param {string=} options.videoContentHint Video content hint for browser ('
|
|
1622
|
+
* @param {string=} options.videoContentHint Video content hint for browser ('motion' by default to maintain bitrate and fps), {@link Flashphoner.constants.CONTENT_HINT_TYPE}
|
|
1623
1623
|
* @param {Boolean=} options.unmutePlayOnStart Unmute playback on start. May be used after user gesture only, so set 'unmutePlayOnStart: false' for autoplay
|
|
1624
1624
|
* @param {Boolean=} options.useControls Use a standard HTML5 video controls (play, pause, fullscreen). May be a workaround for fullscreen mode to work in Safari 16
|
|
1625
1625
|
* @param {Object=} options.logger Stream logger options
|
|
@@ -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;
|