I am facing the following error when trying to connect an rtsp signal as shown in the example Player
flashphoner.js:9968 Uncaught Error: Invalid session state CONNECTED
How can I fix this or if I really have a session connected, how can I use it?
This error occurs because when opening createSession, SESSION_STATUS.CONNECTED is returning
flashphoner.js:9968 Uncaught Error: Invalid session state CONNECTED
How can I fix this or if I really have a session connected, how can I use it?
This error occurs because when opening createSession, SESSION_STATUS.CONNECTED is returning
Code:
function init_api(urlServer = wssUri) {
Flashphoner.init({});
//Connect to WCS server over websockets
session = Flashphoner.createSession({
urlServer
}).on(SESSION_STATUS.ESTABLISHED, function(session) {
console.log("ESTABLISHED");
startVideos();
}).on(STREAM_STATUS.FAILED, function (stream) {
console.log(stream);
showDangerToast("Erro WSS", "Falha ao se conectar com o WSS", 100000);
showDangerToast("Reconectando", "Aguarde....", "alert", 8000);
init_api(wssUriBkp);
}).on(SESSION_STATUS.CONNECTED, function(session) {
console.log("CONNECTED");
startVideos();
});
console.log(session);
}