@flashphoner/websdk 2.0.254 → 2.0.256
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/firewall-traversal-streaming/firewall-traversal-streaming.js +21 -5
- package/flashphoner-no-flash.js +6 -2
- package/flashphoner-no-flash.min.js +1 -1
- package/flashphoner-no-webrtc.js +6 -2
- package/flashphoner-no-webrtc.min.js +1 -1
- package/flashphoner-no-wsplayer.js +6 -2
- package/flashphoner-no-wsplayer.min.js +1 -1
- package/flashphoner-room-api-webrtc-only.js +6 -2
- package/flashphoner-room-api-webrtc-only.min.js +1 -1
- package/flashphoner-room-api.js +6 -2
- package/flashphoner-room-api.min.js +1 -1
- package/flashphoner-temasys-flash-websocket-without-adapterjs.js +6 -2
- package/flashphoner-temasys-flash-websocket.js +6 -2
- package/flashphoner-temasys-flash-websocket.min.js +1 -1
- package/flashphoner-webrtc-only.js +6 -2
- package/flashphoner-webrtc-only.min.js +1 -1
- package/flashphoner.js +6 -2
- package/flashphoner.min.js +1 -1
- package/package.json +1 -1
- package/src/flashphoner-core.js +6 -2
package/docTemplate/README.md
CHANGED
package/examples/demo/streaming/firewall-traversal-streaming/firewall-traversal-streaming.js
CHANGED
|
@@ -140,13 +140,21 @@ function playBtnClick() {
|
|
|
140
140
|
function publishStream() {
|
|
141
141
|
var session = Flashphoner.getSessions()[0];
|
|
142
142
|
var streamName = $('#publishStream').val();
|
|
143
|
-
|
|
143
|
+
|
|
144
|
+
var options = {
|
|
144
145
|
name: streamName,
|
|
145
146
|
display: localVideo,
|
|
146
147
|
cacheLocalResources: true,
|
|
147
148
|
receiveVideo: false,
|
|
148
149
|
receiveAudio: false
|
|
149
|
-
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
if ($("#forceRelay").is(':checked')) {
|
|
153
|
+
options.transport = "UDP";
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
session.createStream(options)
|
|
157
|
+
.on(STREAM_STATUS.PUBLISHING, function (stream) {
|
|
150
158
|
setStatus("#publishStatus", STREAM_STATUS.PUBLISHING);
|
|
151
159
|
onPublishing(stream);
|
|
152
160
|
}).on(STREAM_STATUS.UNPUBLISHED, function () {
|
|
@@ -161,10 +169,18 @@ function publishStream() {
|
|
|
161
169
|
function playStream() {
|
|
162
170
|
var session = Flashphoner.getSessions()[0];
|
|
163
171
|
var streamName = $('#playStream').val();
|
|
164
|
-
|
|
172
|
+
|
|
173
|
+
var options = {
|
|
165
174
|
name: streamName,
|
|
166
|
-
display: remoteVideo
|
|
167
|
-
}
|
|
175
|
+
display: remoteVideo,
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
if ($("#forceRelay").is(':checked')) {
|
|
179
|
+
options.transport = "UDP";
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
session.createStream(options)
|
|
183
|
+
.on(STREAM_STATUS.PLAYING, function (stream) {
|
|
168
184
|
document.getElementById(stream.id()).addEventListener('resize', function (event) {
|
|
169
185
|
resizeVideo(event.target);
|
|
170
186
|
});
|
package/flashphoner-no-flash.js
CHANGED
|
@@ -9304,8 +9304,9 @@ var createSession = function createSession(options) {
|
|
|
9304
9304
|
}
|
|
9305
9305
|
switch (data.message) {
|
|
9306
9306
|
case 'ping':
|
|
9307
|
+
logger.debug(LOG_PREFIX, "<<< ping");
|
|
9307
9308
|
send("pong", null);
|
|
9308
|
-
|
|
9309
|
+
logger.debug(LOG_PREFIX, ">>> pong");
|
|
9309
9310
|
break;
|
|
9310
9311
|
case 'getUserData':
|
|
9311
9312
|
authToken = obj.authToken;
|
|
@@ -9415,8 +9416,11 @@ var createSession = function createSession(options) {
|
|
|
9415
9416
|
}
|
|
9416
9417
|
break;
|
|
9417
9418
|
default:
|
|
9418
|
-
|
|
9419
|
+
logger.info(LOG_PREFIX, "Unknown server message " + data.message);
|
|
9419
9420
|
}
|
|
9421
|
+
// Reset missing pings counter on any message received successfully #WCS-4343
|
|
9422
|
+
logger.debug(LOG_PREFIX, "Reset missing pings counter by " + data.message + " message");
|
|
9423
|
+
wsPingReceiver.success();
|
|
9420
9424
|
};
|
|
9421
9425
|
}
|
|
9422
9426
|
|