Please review the Conference example
source code.
When participant joins the room and publishes a stream,
onMediaPublished() function is called by STREAM_STATUS.PUBLISHING handler
Code:
...
}).on(STREAM_STATUS.PUBLISHING, function (stream) {
setStatus("#localStatus", stream.status());
onMediaPublished(stream);
})
...
In onMediaPublished() function, handler function for "Stop" button
is defined. The handler function calls stream.stop() on button click
Code:
...
$("#localStopBtn").text("Stop").off('click').click(function(){
$(this).prop('disabled', true);
stream.stop();
}).prop('disabled', false);
...
Then
onMediaStopped() function is called by STREAM_STATUS.UNPUBLISHED handler
Code:
...
}).on(STREAM_STATUS.UNPUBLISHED, function(stream) {
setStatus("#localStatus", stream.status());
onMediaStopped(room);
});
...
You should place Flashphoner.releaseLocalMedia() call to onMediaStopped function as
we've done while testing
Code:
function onMediaStopped(room) {
//// Add releaseLocalMedia here
// var display = document.getElementById("localDisplay");
// Flashphoner.releaseLocalMedia(display);
$("#localStopBtn").text("Publish").off('click').click(function(){
$(this).prop('disabled', true);
publishLocalMedia(room);
}).prop('disabled', (connection.getRooms().length == 0));
$("#localAudioToggle").prop("disabled", true);
$("#localVideoToggle").prop("disabled", true);
}
room.leave()
function call also stops local stream publishing, so STREAM_STATUS.UNPUBLISHED will be received and onMediaStopped will be called.
1. A room will only be destroyed when all the participants will leave it. So, if conference maker leaves last, this will close a conference
2. If you enable sream recording in applicaltion code by addind
record: true option
here
Code:
room.publish({
display: display,
constraints: constraints,
record: true,
receiveVideo: false,
receiveAudio: false
all the published streams in conference will be recorded each to its own file. To make one recording with all the participant streams you should use
stream mixer (note this requires a lot of CPU resources for video mixing) and record mixer output streams.
3. If you can actually hear the person, this means the stream publishing is not stopped. Please check if this can be reproduced in Conference example out-of-the-box (unchanged). If yes, please provide us SSH access to your server, we will check inplace. If no, please provade us your source code with minimal changes to reproduce the issue, we will review it.
-