@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
|
@@ -10532,7 +10532,7 @@ var createSession = function createSession(options) {
|
|
|
10532
10532
|
mediaProviders: Object.keys(MediaProvider),
|
|
10533
10533
|
keepAlive: keepAlive,
|
|
10534
10534
|
authToken: authToken,
|
|
10535
|
-
clientVersion: "2.0.
|
|
10535
|
+
clientVersion: "2.0.210",
|
|
10536
10536
|
clientOSVersion: window.navigator.appVersion,
|
|
10537
10537
|
clientBrowserVersion: window.navigator.userAgent,
|
|
10538
10538
|
msePacketizationVersion: 2,
|
|
@@ -11676,7 +11676,7 @@ var createSession = function createSession(options) {
|
|
|
11676
11676
|
* @param {HTMLElement} options.display Div element stream should be displayed in
|
|
11677
11677
|
* @param {Object=} options.custom User provided custom object that will be available in REST App code
|
|
11678
11678
|
* @param {Integer} [options.flashBufferTime=0] Specifies how long to buffer messages before starting to display the stream (Flash-only)
|
|
11679
|
-
* @param {
|
|
11679
|
+
* @param {string=} options.stripCodecs Comma separated string of codecs which should be stripped from WebRTC SDP (ex. "H264,PCMA,PCMU,G722")
|
|
11680
11680
|
* @param {string=} options.rtmpUrl Rtmp url stream should be forwarded to
|
|
11681
11681
|
* @param {Object=} options.mediaConnectionConstraints Stream specific constraints for underlying RTCPeerConnection
|
|
11682
11682
|
* @param {Boolean=} options.flashShowFullScreenButton Show full screen button in flash
|
|
@@ -11685,6 +11685,7 @@ var createSession = function createSession(options) {
|
|
|
11685
11685
|
* @param {Integer=} options.playoutDelay Time delay between network reception of media and playout
|
|
11686
11686
|
* @param {string=} options.useCanvasMediaStream EXPERIMENTAL: when publish bind browser's media stream to the canvas. It can be useful for image filtering
|
|
11687
11687
|
* @param {string=} options.videoContentHint Video content hint for browser ('detail' by default to maintain resolution), {@link Flashphoner.constants.CONTENT_HINT_TYPE}
|
|
11688
|
+
* @param {Boolean=} options.unmutePlayOnStart Unmute playback on start. May be used after user gesture only, so set 'unmutePlayOnStart: false' for autoplay
|
|
11688
11689
|
* @param {sdpHook} sdpHook The callback that handles sdp from the server
|
|
11689
11690
|
* @returns {Stream} Stream
|
|
11690
11691
|
* @throws {TypeError} Error if no options provided
|
|
@@ -11796,6 +11797,7 @@ var createSession = function createSession(options) {
|
|
|
11796
11797
|
var playoutDelay = options.playoutDelay;
|
|
11797
11798
|
var useCanvasMediaStream = options.useCanvasMediaStream;
|
|
11798
11799
|
var videoContentHint = options.videoContentHint;
|
|
11800
|
+
var unmutePlayOnStart = options.unmutePlayOnStart;
|
|
11799
11801
|
var audioState_;
|
|
11800
11802
|
var videoState_;
|
|
11801
11803
|
var connectionQuality;
|
|
@@ -11972,7 +11974,8 @@ var createSession = function createSession(options) {
|
|
|
11972
11974
|
connectionConstraints: mediaConnectionConstraints,
|
|
11973
11975
|
audioOutputId: audioOutputId,
|
|
11974
11976
|
remoteVideo: remoteVideo,
|
|
11975
|
-
playoutDelay: playoutDelay
|
|
11977
|
+
playoutDelay: playoutDelay,
|
|
11978
|
+
unmutePlayOnStart: unmutePlayOnStart
|
|
11976
11979
|
}, streamRefreshHandlers[id_]).then(function (newConnection) {
|
|
11977
11980
|
mediaConnection = newConnection;
|
|
11978
11981
|
|
|
@@ -13500,7 +13503,9 @@ var createConnection = function createConnection(options) {
|
|
|
13500
13503
|
var screenShare = false;
|
|
13501
13504
|
var playoutDelay = options.playoutDelay; // Set video track contentHint to `detail` by default to workaround Chromium 91 bug #WCS-3257
|
|
13502
13505
|
|
|
13503
|
-
var videoContentHint = options.videoContentHint ? options.videoContentHint : 'detail';
|
|
13506
|
+
var videoContentHint = options.videoContentHint ? options.videoContentHint : 'detail'; // Pass the option to unmute automatically (true by default) #WCS-2425
|
|
13507
|
+
|
|
13508
|
+
var unmutePlayOnStart = options.unmutePlayOnStart !== undefined ? options.unmutePlayOnStart : true;
|
|
13504
13509
|
|
|
13505
13510
|
if (bidirectional) {
|
|
13506
13511
|
localVideo = getCacheInstance(localDisplay);
|
|
@@ -13519,7 +13524,7 @@ var createConnection = function createConnection(options) {
|
|
|
13519
13524
|
remoteVideo = getCacheInstance(remoteDisplay);
|
|
13520
13525
|
|
|
13521
13526
|
if (!remoteVideo) {
|
|
13522
|
-
remoteVideo =
|
|
13527
|
+
remoteVideo = createVideoElement();
|
|
13523
13528
|
remoteDisplay.appendChild(remoteVideo);
|
|
13524
13529
|
}
|
|
13525
13530
|
|
|
@@ -13544,7 +13549,7 @@ var createConnection = function createConnection(options) {
|
|
|
13544
13549
|
if (cachedVideo) {
|
|
13545
13550
|
remoteVideo = cachedVideo;
|
|
13546
13551
|
} else {
|
|
13547
|
-
remoteVideo =
|
|
13552
|
+
remoteVideo = createVideoElement();
|
|
13548
13553
|
display.appendChild(remoteVideo);
|
|
13549
13554
|
}
|
|
13550
13555
|
|
|
@@ -13608,7 +13613,12 @@ var createConnection = function createConnection(options) {
|
|
|
13608
13613
|
|
|
13609
13614
|
remoteVideo.onloadedmetadata = function (e) {
|
|
13610
13615
|
if (remoteVideo) {
|
|
13611
|
-
remoteVideo.play()
|
|
13616
|
+
remoteVideo.play().then(function () {
|
|
13617
|
+
// Automatically unmute video if needed #WCS-2425
|
|
13618
|
+
if (unmutePlayOnStart) {
|
|
13619
|
+
remoteVideo.muted = false;
|
|
13620
|
+
}
|
|
13621
|
+
})["catch"](function (e) {
|
|
13612
13622
|
if (validBrowsers.includes(browserDetails.browser)) {
|
|
13613
13623
|
//WCS-1698. fixed autoplay in chromium based browsers
|
|
13614
13624
|
//WCS-2375. fixed autoplay in ios safari
|
|
@@ -14377,14 +14387,12 @@ var loadOrdinaryVideo = function loadOrdinaryVideo(display, stream, screenShare,
|
|
|
14377
14387
|
var vEl = video;
|
|
14378
14388
|
|
|
14379
14389
|
if (!vEl) {
|
|
14380
|
-
vEl =
|
|
14390
|
+
vEl = createVideoElement();
|
|
14381
14391
|
display.appendChild(vEl);
|
|
14382
14392
|
}
|
|
14383
14393
|
|
|
14384
14394
|
vEl.id = uuid_v1() + LOCAL_CACHED_VIDEO;
|
|
14385
|
-
vEl.srcObject = stream;
|
|
14386
|
-
|
|
14387
|
-
vEl.muted = true;
|
|
14395
|
+
vEl.srcObject = stream;
|
|
14388
14396
|
|
|
14389
14397
|
vEl.onloadedmetadata = function (e) {
|
|
14390
14398
|
//WCS-2751 Add screen capture using getDisplayMedia in Safari
|
|
@@ -14760,6 +14768,19 @@ function getCacheInstance(display) {
|
|
|
14760
14768
|
}
|
|
14761
14769
|
}
|
|
14762
14770
|
|
|
14771
|
+
function createVideoElement() {
|
|
14772
|
+
var video = document.createElement('video'); // Prepare video tag to auto play and add specific Safari tweaks #WCS-2425
|
|
14773
|
+
|
|
14774
|
+
video.muted = true;
|
|
14775
|
+
|
|
14776
|
+
if (util.Browser.isSafariWebRTC()) {
|
|
14777
|
+
video.setAttribute("playsinline", "");
|
|
14778
|
+
video.setAttribute("webkit-playsinline", "");
|
|
14779
|
+
}
|
|
14780
|
+
|
|
14781
|
+
return video;
|
|
14782
|
+
}
|
|
14783
|
+
|
|
14763
14784
|
function removeVideoElement(video) {
|
|
14764
14785
|
if (video.srcObject) {
|
|
14765
14786
|
//pause
|