Good day.
We tested this as follows:
1. Modify the file
/usr/local/FlashphonerWebCallServer/client2/examples/demo/streaming/webrtc-as-rtmp-republishing/webrtc-as-rtmp-republishing.js
2. Open WebRTC as RTMP example
https://test1.flashphoner.com:8444/client2/examples/demo/streaming/webrtc-as-rtmp-republishing/webrtc-as-rtmp-republishing.html
As you can see, websocket URL is substituted correctly, the stream is publishing successfully
So please check if you're modifying the code and running the test on the same server. For example, if WebSDK and the example code is placed on a different web server, it should be modified there.
You can also set a fixed websocket URL directly in
createSession
call if you do not want client to change the URL
Code:
function start() {
//check if we already have session
if (Flashphoner.getSessions().length > 0) {
startStreaming(Flashphoner.getSessions()[0]);
} else {
//create session
var url = "wss://wcs_address:8443";//field('url');
console.log("Create new session with url " + url);
Flashphoner.createSession({urlServer: url}).on(SESSION_STATUS.ESTABLISHED, function(session){
//session connected, start streaming
startStreaming(session);
...
});
}
}
Plaese also check if websocket port 8443 is available on WCS server.