@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
|
@@ -56,11 +56,14 @@ var createConnection = function (options) {
|
|
|
56
56
|
var screenShare = false;
|
|
57
57
|
var playoutDelay = options.playoutDelay;
|
|
58
58
|
// Set video track contentHint to `detail` by default to workaround Chromium 91 bug #WCS-3257
|
|
59
|
-
|
|
59
|
+
// Set video track contentHint to `motion` by default to keep bitrate and fps for better camera stream quality #WCS-4109
|
|
60
|
+
var videoContentHint = options.videoContentHint ? options.videoContentHint : 'motion';
|
|
60
61
|
// Pass the option to unmute automatically (true by default) #WCS-2425
|
|
61
62
|
var unmutePlayOnStart = options.unmutePlayOnStart !== undefined ? options.unmutePlayOnStart : true;
|
|
62
63
|
// Use a standard HTML5 video controls if needed (to enable fullscreen in Safari 16 for example) #WCS-3606
|
|
63
64
|
var useControls = options.useControls || false;
|
|
65
|
+
// Stream event handler to rise an event #WCS-4097
|
|
66
|
+
var unmuteRequiredEvent = options.unmuteRequiredEvent ? options.unmuteRequiredEvent : null;
|
|
64
67
|
|
|
65
68
|
if (bidirectional) {
|
|
66
69
|
localVideo = getCacheInstance(localDisplay);
|
|
@@ -174,6 +177,9 @@ var createConnection = function (options) {
|
|
|
174
177
|
// Automatically unmute video if needed #WCS-2425
|
|
175
178
|
if (unmutePlayOnStart) {
|
|
176
179
|
remoteVideo.muted = false;
|
|
180
|
+
} else {
|
|
181
|
+
// Fire UNMUTE_REQUIRED stream event #WCS-4097
|
|
182
|
+
fireUnmuteEvent();
|
|
177
183
|
}
|
|
178
184
|
}).catch(function (e) {
|
|
179
185
|
if (validBrowsers.includes(browserDetails.browser)) {
|
|
@@ -182,6 +188,8 @@ var createConnection = function (options) {
|
|
|
182
188
|
logger.info(LOG_PREFIX, "Autoplay detected! Trying to play a video with a muted sound...");
|
|
183
189
|
remoteVideo.muted = true;
|
|
184
190
|
remoteVideo.play();
|
|
191
|
+
// Fire UNMUTE_REQUIRED stream event #WCS-4097
|
|
192
|
+
fireUnmuteEvent();
|
|
185
193
|
} else {
|
|
186
194
|
logger.error(LOG_PREFIX, e);
|
|
187
195
|
}
|
|
@@ -793,6 +801,12 @@ var createConnection = function (options) {
|
|
|
793
801
|
});
|
|
794
802
|
};
|
|
795
803
|
|
|
804
|
+
var fireUnmuteEvent = function() {
|
|
805
|
+
if (unmuteRequiredEvent && typeof unmuteRequiredEvent === 'function') {
|
|
806
|
+
unmuteRequiredEvent();
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
|
|
796
810
|
var exports = {};
|
|
797
811
|
exports.state = state;
|
|
798
812
|
exports.createOffer = createOffer;
|