Can we delete room and unpublish all videos publishing under this room from server

Hi

I am working on a licode video conference application i would like to end
conference through a service requests.
I was thinking that if i will delete a room automatically streamed video’s
got unpublished but it will not able to delete room when there is any user,
while if there is no user same service will able to delete the room easily.

my code is following please suggest.

app.post(’/deleteRooms/’, function (req, res) {
var confId = req.body.confId;
console.log("CONFID = "+confId);
N.API.getRooms(function (roomlist) {
var rooms = JSON.parse(roomlist);
var numRooms = rooms.length;
console.log("Total Room = "+rooms.length);// check and see if one of these
rooms is 'myRoom’
for(var i in rooms){
console.log('Room ', i, ‘:’, rooms[i].name);
if(numRooms>0 && (rooms[i].name === ‘conf-’+confId)){
N.API.deleteRoom(rooms[i]._id, function(result) {
console.log('Result: ', result);
result = 1;
numRooms–;
res.send(numRooms);
});
}else{
res.send(rooms[i].name);
}
}
});
});

Thanks
Atul

Hi,

when you call NuveAPI deleteRoom method, nuve asks erizoController to
delete that room and erizoController removes all the connections
(publishers and subscribers) in the room. If there is no users connected in
the room, it doesn’t exist in erizoController so it will only be removed in
nuve.

BR2015-01-13 13:15 GMT+01:00 atul tiwari atulmca.13@gmail.com:

Hi

I am working on a licode video conference application i would like to end
conference through a service requests.
I was thinking that if i will delete a room automatically streamed video’s
got unpublished but it will not able to delete room when there is any user,
while if there is no user same service will able to delete the room
easily.

my code is following please suggest.

app.post(’/deleteRooms/’, function (req, res) {
var confId = req.body.confId;
console.log("CONFID = "+confId);
N.API.getRooms(function (roomlist) {
var rooms = JSON.parse(roomlist);
var numRooms = rooms.length;
console.log("Total Room = "+rooms.length);// check and see if one of these
rooms is 'myRoom’
for(var i in rooms){
console.log('Room ', i, ‘:’, rooms[i].name);
if(numRooms>0 && (rooms[i].name === ‘conf-’+confId)){
N.API.deleteRoom(rooms[i]._id, function(result) {
console.log('Result: ', result);
result = 1;
numRooms–;
res.send(numRooms);
});
}else{
res.send(rooms[i].name);
}
}
});
});

Thanks
Atul


You received this message because you are subscribed to the Google Groups
"lynckia" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lynckia+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.