Hello Marc.
We work on RTMP stream playback issue.
And yes, /push/sound_on does not mix the sound from file to stream.
So, in your case you should use
mixer function, by this way:
1. Make a call with /call/startup, "toStream": "stream88"
2. Play an MP4 file with /client2/examples/demo/streaming/player/player.js, set streamName to "vod://file.mp4". Modify script as
Code:
function onStarted(stream) {
$("#playBtn").text("Stop").off('click').click(function(){
$(this).prop('disabled', true);
stream.stop();
}).prop('disabled', false);
$("#fullScreenBtn").off('click').click(function(){
stream.fullScreen();
}).prop('disabled', false);
$("#volumeControl").slider("enable");
// stream.setVolume(currentVolumeValue);
stream.setVolume(0);
}
to not to hear the sound from file.
3. Find a stream with /stream/find_all, get the stream name, this must be sessionId-vod://file.mp4
4. Create a mixer
Code:
/mixer/startup
{
"uri": "mixer://mixer1",
"localStreamName": "mixer_stream",
"hasVideo": "false"
}
5, Add streams to mixer
Code:
/mixer/add
{
"uri": "mixer://mixer1",
"remoteStreamName": "stream88"
}
/mixer/add
{
"uri": "mixer://mixer1",
"remoteStreamName": "sessionId-vod://file.mp4"
}
6. Play mixer output stream mixer_stream in browser (don't forget to set the volume up to hear the sound)
You should set the parameter
Code:
mixer_video_enabled=false
in file flashphoner.properties to mix audio only.
So, you have to convert sound file to MP4 (AAC codec) for
VOD capture function to work.