problem with sound

Arsen G.

Member
Dear Support team,
when I'm testing WebRTC streaming on iOS 10.30.1 (iphone 5s) the video playback is OK, but no sound :(
my codec string in flashphoner.properties is -
codecs=opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,vp8,h264,flv,mpv

Maybe something wrong in configuration file?
 
Last edited:

Arsen G.

Member
Dear Max,
I tried the stream through you server and it was OK. I found the problem :)
I'm trying to get flashphoner player to play through command line like you described in my previous thread
and in this way where is no sound :(
Is there any way to enable sound automatically through command line??

Example:
Code:
https://wcs5-eu.flashphoner.com/client2/examples/demo/streaming/player/player.html?autoplay=true&streamName=rtsp://localhost:554/live.sdp
What is your testing stream URL?
Can you reproduce this with our default player:
https://wcs5-eu.flashphoner.com/demo2/player
 

Max

Administrator
Staff member
iOS Safari (Web Audio API) does not play sound by internal policy. Sound is locked by default.
To get sound, user shell immediately touch a button or UI element.
As you can see in the code, we do Flashphoner.playFirstSound() on 'Play' button click. And that's why it works when you click 'Play', but does not work when you do not click 'Play'.
Code:
if (Flashphoner.getMediaProviders()[0] == "WSPlayer") {
        Flashphoner.playFirstSound();
}
https://github.com/flashphoner/flas.../examples/demo/streaming/player/player.js#L85
 

Max

Administrator
Staff member
There are two technologies that can be used for iOS Safari playback
1) Websocket player (as a part of Player example) based on HTML5 Web Audio API
https://wcs5-eu.flashphoner.com/demo2/player
2) HLS player
https://wcs5-eu.flashphoner.com/demo2/hls-player

With HLS player you can play stream automatically on video start.
With Websocket player you can't do that and need a user click.

With HLS you can have a high latency, about 15-20 seconds.
If the latency fits your requirements, you can use HLS.

RTSP to HLS feature is available in latest versions of server.
You can also test with our demo-server:
https://wcs5-eu.flashphoner.com/demo2/hls-player
 

Arsen G.

Member
Dear Max,
as you told, HLS has high latency. In our case we need as small delay as possible, so HLS is not suitable for us.
Maybe it is possible to change websocket player configuration, so it will send "play sound" command automatically without waiting for any click?
What can you suggest?
 

Max

Administrator
Staff member
Maybe it is possible to change websocket player configuration, so it will send "play sound" command automatically without waiting for any click?
No. The 'Play sound' function must be executed strictly on UI action. This is a limitation of iOS Safari browser and you can't avoid this.
 
Top