Need start player every cut on stream

Vico

Member
Hi super Max!, I´m feeding my WCS servers with a Rtsp live video, every time the rtsp feed have a cut(o micro-cut) the user needs to push the play button again.

There is a way to force the player to autostart when the rtsp starts again? it´s too crazy?

A way to always autoplay?

Thanks in advance men!!,
Vico
 

Max

Administrator
Staff member
Good day.
Please try to restore stream playback automatically by tweakling player code as described here.
 
Last edited:

Max

Administrator
Staff member
We prepared player.js file for Embed Player with playback restart. Restart parameters are configured with the following variables in the script:
Code:
var restartTimeout = 3000; //ms
var restartMaxTimes = 100; //will try to restart playback for 5 minutes
So by default it will try to play a stream againg every 3 seconds during 5 minutes. That should be enough, but you can increase if needed.
Unpack zip file attached and replace the file /usr/local/FlashphonerWebCallServer-5.2.944-XXXX/client2/examples/demo/streaming/embed_player/player.js with the script
 

Attachments

Max

Administrator
Staff member
You are using too old WebSDK build, so our example did not work.
We've updated WebSDK on your server to latest build 2.0.189, and Embed Player example now works:
1628565244453.png
 

Vico

Member
Booooooooommmmm!!!, amazing Max. woks like a charm.
How to propely update my other servers to the 2.0.189?
Thaks for this men,
Vico
 

Max

Administrator
Staff member
How to propely update my other servers to the 2.0.189?
1. Download WebSDK build
Code:
wget https://flashphoner.com/downloads/builds/flashphoner_client/wcs_api-2.0/flashphoner-api-2.0.189-cc8e7265a3adb7a55546a48ee0fc31df6fff2f6d.tar.gz
2. Unpack the archive
Code:
tar -xzf flashphoner-api-2.0.189-cc8e7265a3adb7a55546a48ee0fc31df6fff2f6d.tar.gz
3. Backup old WebSDK
Code:
cd /usr/local/FlashphonerWebCallServer
sudo mkdir -p client2.backup
sudo cp -r client2/* client2.backup
sudo rm -rf client2/*
4. Go to the archive folder unpacked and copy it over the old WebSDK
Code:
cd ~
cd @flashphoner/websdk-2.0.189
sudo cp -r * /usr/local/FlashphonerWebCallServer/client2
cd ~
sudo cp -r client.version /usr/local/FlashphonerWebCallServer/client2
5. Copy modified player.js to the Embed Player example folder
Code:
sudo cp player.js /usr/local/FlashphonerWebCallServer/client2/examples/demo/streaming/embed_player
6. Optionally, restart WCS to display a new version in dashboard
Code:
sudo systemctl restart webcallserver
 

Max

Administrator
Staff member
Good day.
We tried to check the stream rtsp://**.***.**.***:***/75502645 that you've provided in latest report sent from this topic. Unfortunately this is unavailable with message Failed to connect to rtsp stream. So please clarify the time interval when the stream is available, or make it available 24/7 if possible.
 
Top