@flashphoner/websdk 2.0.209 → 2.0.210
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/2players/2players.js +0 -5
- package/examples/demo/streaming/canvas_streaming/canvas_streaming.js +0 -12
- package/examples/demo/streaming/embed_player/player.js +127 -198
- package/examples/demo/streaming/firewall-traversal-streaming/firewall-traversal-streaming.js +0 -12
- package/examples/demo/streaming/mcu_client/mcu_client.js +0 -8
- package/examples/demo/streaming/media_devices_manager/manager.js +0 -12
- package/examples/demo/streaming/player/player.js +10 -9
- package/examples/demo/streaming/stream-diagnostic/stream-diagnostic.js +0 -8
- package/examples/demo/streaming/stream-local-snapshot/stream-local-snapshot.js +0 -6
- package/examples/demo/streaming/stream-snapshot/stream-snapshot.js +0 -6
- package/examples/demo/streaming/stream_recording/recording.js +0 -6
- package/examples/demo/streaming/streamer/streamer.js +0 -8
- package/examples/demo/streaming/two_way_streaming/two_way_streaming.js +0 -11
- package/examples/demo/streaming/webrtc-as-rtmp-republishing/webrtc-as-rtmp-republishing.js +0 -6
- package/flashphoner-no-flash.js +32 -11
- package/flashphoner-no-flash.min.js +2 -2
- package/flashphoner-no-webrtc.js +6 -3
- package/flashphoner-no-webrtc.min.js +1 -1
- package/flashphoner-no-wsplayer.js +32 -11
- package/flashphoner-no-wsplayer.min.js +2 -2
- package/flashphoner-room-api.js +29 -9
- package/flashphoner-room-api.min.js +2 -2
- package/flashphoner-temasys-flash-websocket-without-adapterjs.js +6 -3
- package/flashphoner-temasys-flash-websocket.js +6 -3
- package/flashphoner-temasys-flash-websocket.min.js +1 -1
- package/flashphoner-webrtc-only.js +32 -11
- package/flashphoner-webrtc-only.min.js +1 -1
- package/flashphoner.js +32 -11
- package/flashphoner.min.js +2 -2
- package/package.json +1 -1
- package/src/flashphoner-core.d.ts +18 -4
- package/src/flashphoner-core.js +6 -3
- package/src/webrtc-media-provider.js +23 -6
package/flashphoner-room-api.js
CHANGED
|
@@ -10171,7 +10171,7 @@ var createSession = function (options) {
|
|
|
10171
10171
|
mediaProviders: Object.keys(MediaProvider),
|
|
10172
10172
|
keepAlive: keepAlive,
|
|
10173
10173
|
authToken:authToken,
|
|
10174
|
-
clientVersion: "2.0.
|
|
10174
|
+
clientVersion: "2.0.210",
|
|
10175
10175
|
clientOSVersion: window.navigator.appVersion,
|
|
10176
10176
|
clientBrowserVersion: window.navigator.userAgent,
|
|
10177
10177
|
msePacketizationVersion: 2,
|
|
@@ -11177,7 +11177,7 @@ var createSession = function (options) {
|
|
|
11177
11177
|
* @param {HTMLElement} options.display Div element stream should be displayed in
|
|
11178
11178
|
* @param {Object=} options.custom User provided custom object that will be available in REST App code
|
|
11179
11179
|
* @param {Integer} [options.flashBufferTime=0] Specifies how long to buffer messages before starting to display the stream (Flash-only)
|
|
11180
|
-
* @param {
|
|
11180
|
+
* @param {string=} options.stripCodecs Comma separated string of codecs which should be stripped from WebRTC SDP (ex. "H264,PCMA,PCMU,G722")
|
|
11181
11181
|
* @param {string=} options.rtmpUrl Rtmp url stream should be forwarded to
|
|
11182
11182
|
* @param {Object=} options.mediaConnectionConstraints Stream specific constraints for underlying RTCPeerConnection
|
|
11183
11183
|
* @param {Boolean=} options.flashShowFullScreenButton Show full screen button in flash
|
|
@@ -11186,6 +11186,7 @@ var createSession = function (options) {
|
|
|
11186
11186
|
* @param {Integer=} options.playoutDelay Time delay between network reception of media and playout
|
|
11187
11187
|
* @param {string=} options.useCanvasMediaStream EXPERIMENTAL: when publish bind browser's media stream to the canvas. It can be useful for image filtering
|
|
11188
11188
|
* @param {string=} options.videoContentHint Video content hint for browser ('detail' by default to maintain resolution), {@link Flashphoner.constants.CONTENT_HINT_TYPE}
|
|
11189
|
+
* @param {Boolean=} options.unmutePlayOnStart Unmute playback on start. May be used after user gesture only, so set 'unmutePlayOnStart: false' for autoplay
|
|
11189
11190
|
* @param {sdpHook} sdpHook The callback that handles sdp from the server
|
|
11190
11191
|
* @returns {Stream} Stream
|
|
11191
11192
|
* @throws {TypeError} Error if no options provided
|
|
@@ -11289,6 +11290,7 @@ var createSession = function (options) {
|
|
|
11289
11290
|
var playoutDelay = options.playoutDelay;
|
|
11290
11291
|
var useCanvasMediaStream = options.useCanvasMediaStream;
|
|
11291
11292
|
var videoContentHint = options.videoContentHint;
|
|
11293
|
+
var unmutePlayOnStart = options.unmutePlayOnStart;
|
|
11292
11294
|
|
|
11293
11295
|
var audioState_;
|
|
11294
11296
|
var videoState_;
|
|
@@ -11463,7 +11465,8 @@ var createSession = function (options) {
|
|
|
11463
11465
|
connectionConstraints: mediaConnectionConstraints,
|
|
11464
11466
|
audioOutputId: audioOutputId,
|
|
11465
11467
|
remoteVideo: remoteVideo,
|
|
11466
|
-
playoutDelay: playoutDelay
|
|
11468
|
+
playoutDelay: playoutDelay,
|
|
11469
|
+
unmutePlayOnStart: unmutePlayOnStart
|
|
11467
11470
|
}, streamRefreshHandlers[id_]).then(function (newConnection) {
|
|
11468
11471
|
mediaConnection = newConnection;
|
|
11469
11472
|
try {
|
|
@@ -13970,6 +13973,8 @@ var createConnection = function (options) {
|
|
|
13970
13973
|
var playoutDelay = options.playoutDelay;
|
|
13971
13974
|
// Set video track contentHint to `detail` by default to workaround Chromium 91 bug #WCS-3257
|
|
13972
13975
|
var videoContentHint = options.videoContentHint ? options.videoContentHint : 'detail';
|
|
13976
|
+
// Pass the option to unmute automatically (true by default) #WCS-2425
|
|
13977
|
+
var unmutePlayOnStart = options.unmutePlayOnStart !== undefined ? options.unmutePlayOnStart : true;
|
|
13973
13978
|
|
|
13974
13979
|
if (bidirectional) {
|
|
13975
13980
|
localVideo = getCacheInstance(localDisplay);
|
|
@@ -13985,7 +13990,7 @@ var createConnection = function (options) {
|
|
|
13985
13990
|
}
|
|
13986
13991
|
remoteVideo = getCacheInstance(remoteDisplay);
|
|
13987
13992
|
if (!remoteVideo) {
|
|
13988
|
-
remoteVideo =
|
|
13993
|
+
remoteVideo = createVideoElement();
|
|
13989
13994
|
remoteDisplay.appendChild(remoteVideo);
|
|
13990
13995
|
}
|
|
13991
13996
|
remoteVideo.id = id + "-remote";
|
|
@@ -14006,7 +14011,7 @@ var createConnection = function (options) {
|
|
|
14006
14011
|
if (cachedVideo) {
|
|
14007
14012
|
remoteVideo = cachedVideo;
|
|
14008
14013
|
} else {
|
|
14009
|
-
remoteVideo =
|
|
14014
|
+
remoteVideo = createVideoElement();
|
|
14010
14015
|
display.appendChild(remoteVideo);
|
|
14011
14016
|
}
|
|
14012
14017
|
remoteVideo.id = id;
|
|
@@ -14059,7 +14064,12 @@ var createConnection = function (options) {
|
|
|
14059
14064
|
remoteVideo.srcObject = event.streams[0];
|
|
14060
14065
|
remoteVideo.onloadedmetadata = function (e) {
|
|
14061
14066
|
if (remoteVideo) {
|
|
14062
|
-
remoteVideo.play().
|
|
14067
|
+
remoteVideo.play().then(function() {
|
|
14068
|
+
// Automatically unmute video if needed #WCS-2425
|
|
14069
|
+
if (unmutePlayOnStart) {
|
|
14070
|
+
remoteVideo.muted = false;
|
|
14071
|
+
}
|
|
14072
|
+
}).catch(function (e) {
|
|
14063
14073
|
if (validBrowsers.includes(browserDetails.browser)) {
|
|
14064
14074
|
//WCS-1698. fixed autoplay in chromium based browsers
|
|
14065
14075
|
//WCS-2375. fixed autoplay in ios safari
|
|
@@ -14632,6 +14642,7 @@ var createConnection = function (options) {
|
|
|
14632
14642
|
};
|
|
14633
14643
|
|
|
14634
14644
|
|
|
14645
|
+
|
|
14635
14646
|
var mixAudioTracks = function (stream1, stream2) {
|
|
14636
14647
|
var stream1Sound = audioContext.createMediaStreamSource(stream1);
|
|
14637
14648
|
var stream2Sound = audioContext.createMediaStreamSource(stream2);
|
|
@@ -14763,13 +14774,11 @@ var getMediaAccess = function (constraints, display, disableConstraintsNormaliza
|
|
|
14763
14774
|
var loadOrdinaryVideo = function(display, stream, screenShare, constraints, video) {
|
|
14764
14775
|
let vEl = video;
|
|
14765
14776
|
if (!vEl) {
|
|
14766
|
-
vEl =
|
|
14777
|
+
vEl = createVideoElement();
|
|
14767
14778
|
display.appendChild(vEl);
|
|
14768
14779
|
}
|
|
14769
14780
|
vEl.id = uuid_v1() + LOCAL_CACHED_VIDEO;
|
|
14770
14781
|
vEl.srcObject = stream;
|
|
14771
|
-
//mute audio
|
|
14772
|
-
vEl.muted = true;
|
|
14773
14782
|
vEl.onloadedmetadata = function (e) {
|
|
14774
14783
|
//WCS-2751 Add screen capture using getDisplayMedia in Safari
|
|
14775
14784
|
if (screenShare && !screenCaptureSupportedBrowsers()) {
|
|
@@ -15103,6 +15112,17 @@ function getCacheInstance(display) {
|
|
|
15103
15112
|
}
|
|
15104
15113
|
}
|
|
15105
15114
|
|
|
15115
|
+
function createVideoElement() {
|
|
15116
|
+
let video = document.createElement('video');
|
|
15117
|
+
// Prepare video tag to auto play and add specific Safari tweaks #WCS-2425
|
|
15118
|
+
video.muted = true;
|
|
15119
|
+
if(util.Browser.isSafariWebRTC()) {
|
|
15120
|
+
video.setAttribute("playsinline", "");
|
|
15121
|
+
video.setAttribute("webkit-playsinline", "");
|
|
15122
|
+
}
|
|
15123
|
+
return(video);
|
|
15124
|
+
}
|
|
15125
|
+
|
|
15106
15126
|
function removeVideoElement(video) {
|
|
15107
15127
|
if (video.srcObject) {
|
|
15108
15128
|
//pause
|