Merge pull request #286 from nextcloud/fix-url-when-creating-a-room

Update the URL when creating a room
This commit is contained in:
Ivan Sein 2017-04-11 10:46:10 +02:00 коммит произвёл GitHub
Родитель 493b5a0631 00bcc849a5
Коммит 78ff2f0e5b
1 изменённых файлов: 9 добавлений и 12 удалений

Просмотреть файл

@ -22,39 +22,36 @@
showCamera: function() {
$('.videoView').removeClass('hidden');
},
_createRoomSuccessHandle: function(data) {
OC.Util.History.pushState({
token: data.token
}, OC.generateUrl('/call/' + data.token));
this.join(data.token);
},
createOneToOneVideoCall: function(recipientUserId) {
var self = this;
console.log(recipientUserId);
$.ajax({
url: OC.generateUrl('/apps/spreed/api/oneToOne'),
type: 'PUT',
data: 'targetUserName='+recipientUserId,
success: function(data) {
self.join(data.token);
}
success: _.bind(this._createRoomSuccessHandle, this)
});
},
createGroupVideoCall: function(groupId) {
var self = this;
console.log(groupId);
$.ajax({
url: OC.generateUrl('/apps/spreed/api/group'),
type: 'PUT',
data: 'targetGroupName='+groupId,
success: function(data) {
self.join(data.token);
}
success: _.bind(this._createRoomSuccessHandle, this)
});
},
createPublicVideoCall: function() {
var self = this;
console.log("Creating a new public room.");
$.ajax({
url: OC.generateUrl('/apps/spreed/api/public'),
type: 'PUT',
success: function(data) {
self.join(data.token);
}
success: _.bind(this._createRoomSuccessHandle, this)
});
},
join: function(token) {