Browse Source

Updated autocall feature to reflect API changes for contacts.

pull/48/head
Simon Eisenmann 11 years ago
parent
commit
4c1f2e6fc8
  1. 16
      doc/CHANNELING-API.txt
  2. 6
      src/app/spreed-webrtc-server/channeling.go
  3. 6
      static/js/directives/buddylist.js
  4. 2
      static/js/services/buddylist.js

16
doc/CHANNELING-API.txt

@ -605,22 +605,24 @@ Chat messages and status information @@ -605,22 +605,24 @@ Chat messages and status information
}
Request being called from audio mixer
Request an automatic callback, by sending a chat message with the AutoCall
document in Status.
{
"Type": "Chat",
"Chat": {
"Message": null,
"Message": "Call me back",
"Status": {
"type": "conference",
"id": "my-conference-room"
"AutoCall": {
"Type": "conference",
"Id": "my-conference-room"
}
}
}
This can be sent to any participant that has a "Status" containing the "isMixer"
flag with a "true" value. The peer will then try to establish a peer connection
to the caller which it needs to pick up to join an audio conference.
For example this can be sent to sessions which have "autoCalls" set in session
status. The peer will then try to establish a peer connection to the caller which
the client eeds to pick up automatically.
Data channel only messages

6
src/app/spreed-webrtc-server/channeling.go

@ -106,6 +106,7 @@ type DataChatStatus struct { @@ -106,6 +106,7 @@ type DataChatStatus struct {
SeenMids []string `json:",omitempty"`
FileInfo *DataFileInfo `json:",omitempty"`
ContactRequest *DataContactRequest `json:",omitempty"`
AutoCall *DataAutoCall `json:",omitempty"`
}
type DataFileInfo struct {
@ -123,6 +124,11 @@ type DataContactRequest struct { @@ -123,6 +124,11 @@ type DataContactRequest struct {
Token string `json:",omitempty"`
}
type DataAutoCall struct {
Id string
Type string
}
type DataIncoming struct {
Type string
Hello *DataHello

6
static/js/directives/buddylist.js

@ -59,8 +59,10 @@ define(['underscore', 'text!partials/buddylist.html'], function(_, template) { @@ -59,8 +59,10 @@ define(['underscore', 'text!partials/buddylist.html'], function(_, template) {
$scope.updateAutoAccept(id);
mediaStream.api.sendChat(id, null, {
type: "conference",
id: mediaStream.connector.roomid
AutoCall: {
Type: "conference",
Id: mediaStream.connector.roomid
}
})
};

2
static/js/services/buddylist.js

@ -464,7 +464,7 @@ define(['underscore', 'modernizr', 'avltree', 'text!partials/buddy.html', 'text! @@ -464,7 +464,7 @@ define(['underscore', 'modernizr', 'avltree', 'text!partials/buddy.html', 'text!
} else {
var scope = buddyData.get(id);
var template = buddyActions;
if (scope.status.isMixer) {
if (scope.status.autoCalls && _.indexOf(scope.status.autoCalls, "conference") !== -1) {
template = buddyActionsForAudioMixer;
}
//console.log("scope", scope, id);

Loading…
Cancel
Save