@flashphoner/websdk 2.0.239 → 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/dependencies/js/utils.js +16 -14
- package/examples/demo/streaming/embed_player/player.js +2 -0
- package/examples/demo/streaming/hls-player/hls-player.js +108 -13
- package/examples/demo/streaming/hls-player/player-page.html +13 -2
- 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
|
@@ -61,6 +61,8 @@ var createConnection = function (options) {
|
|
|
61
61
|
var unmutePlayOnStart = options.unmutePlayOnStart !== undefined ? options.unmutePlayOnStart : true;
|
|
62
62
|
// Use a standard HTML5 video controls if needed (to enable fullscreen in Safari 16 for example) #WCS-3606
|
|
63
63
|
var useControls = options.useControls || false;
|
|
64
|
+
// Stream event handler to rise an event #WCS-4097
|
|
65
|
+
var unmuteRequiredEvent = options.unmuteRequiredEvent ? options.unmuteRequiredEvent : null;
|
|
64
66
|
|
|
65
67
|
if (bidirectional) {
|
|
66
68
|
localVideo = getCacheInstance(localDisplay);
|
|
@@ -174,6 +176,9 @@ var createConnection = function (options) {
|
|
|
174
176
|
// Automatically unmute video if needed #WCS-2425
|
|
175
177
|
if (unmutePlayOnStart) {
|
|
176
178
|
remoteVideo.muted = false;
|
|
179
|
+
} else {
|
|
180
|
+
// Fire UNMUTE_REQUIRED stream event #WCS-4097
|
|
181
|
+
fireUnmuteEvent();
|
|
177
182
|
}
|
|
178
183
|
}).catch(function (e) {
|
|
179
184
|
if (validBrowsers.includes(browserDetails.browser)) {
|
|
@@ -182,6 +187,8 @@ var createConnection = function (options) {
|
|
|
182
187
|
logger.info(LOG_PREFIX, "Autoplay detected! Trying to play a video with a muted sound...");
|
|
183
188
|
remoteVideo.muted = true;
|
|
184
189
|
remoteVideo.play();
|
|
190
|
+
// Fire UNMUTE_REQUIRED stream event #WCS-4097
|
|
191
|
+
fireUnmuteEvent();
|
|
185
192
|
} else {
|
|
186
193
|
logger.error(LOG_PREFIX, e);
|
|
187
194
|
}
|
|
@@ -793,6 +800,12 @@ var createConnection = function (options) {
|
|
|
793
800
|
});
|
|
794
801
|
};
|
|
795
802
|
|
|
803
|
+
var fireUnmuteEvent = function() {
|
|
804
|
+
if (unmuteRequiredEvent && typeof unmuteRequiredEvent === 'function') {
|
|
805
|
+
unmuteRequiredEvent();
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
|
|
796
809
|
var exports = {};
|
|
797
810
|
exports.state = state;
|
|
798
811
|
exports.createOffer = createOffer;
|