Created
April 20, 2014 08:41
-
-
Save photofroggy/11108811 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Video Chat Server | |
Video calls should be associated with a particular channel. | |
They should also have a host. | |
Should users have privilege levels? | |
Data: | |
User | |
Connection | |
Stream(s?) | |
Privileges? | |
Call? | |
Channel | |
Call | |
Peer | |
User | |
Connection conn | |
String username | |
Bool authed | |
Call call | |
Peer[] peers | |
Channel | |
Call[] calls | |
String namespace | |
Call | |
String id/name | |
User host | |
User[] users | |
Log in? | |
How would we make this seamless for userscripts? | |
Would be inconvenient to require the user retrieve a token... | |
Maybe make an API method for retrieving oauth tokens... | |
Or maybe just use the dAmn tokens and use the existing API method | |
in a userscript? | |
{ | |
cmd: 'login', | |
username: username, | |
token: oauth_token? | |
} | |
{ | |
cmd: 'login', | |
status: 0 || 1 || ... 0 = ok | |
[error: description] | |
} | |
Need to be able to request the list of open calls in a channel. | |
{ | |
cmd: 'call.list', | |
channel: 'chat:devart' | |
} | |
Should return a call listing. | |
{ | |
cmd: 'call.list', | |
channel: 'chat:devart', | |
calls: [ | |
id1, | |
id2, | |
... | |
] | |
} | |
Create a call | |
{ | |
cmd: 'call.create', | |
channel: 'chat:devart', | |
id: 'name' | |
} | |
Call created | |
{ | |
cmd: 'call.open', | |
channel: 'chat:devart', | |
id: 'name', | |
host: 'username' | |
} | |
Join a call? | |
{ | |
cmd: 'call.join', | |
channel: 'chat:devart', | |
call: id | |
} | |
Indicate joined | |
{ | |
cmd: 'call.join', | |
channel: 'chat:devart', | |
call: id, | |
meta? | |
} | |
Leaving | |
Can only be in one call at a time. | |
{ cmd: 'call.leave' } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment