var display = document.getElementById("player" + index);
session.createStream({
name: streamName,
display: display
}).on(STREAM_STATUS.PLAYING, function(stream) {
document.getElementById(stream.id()).addEventListener('resize', function(event){
resizeVideo(event.target);
});
setStatus("#status" + index, stream.status());
onPlaying(index, stream);
}).on(STREAM_STATUS.STOPPED, function() {
setStatus("#status" + index, STREAM_STATUS.STOPPED);
onStopped(index);
}).on(STREAM_STATUS.FAILED, function() {
setStatus("#status" + index, STREAM_STATUS.FAILED);
onStopped(index);
}).play(); |