thisbounty / webrtc-frontend Goto Github PK
View Code? Open in Web Editor NEWFrontend for WebRTC
Frontend for WebRTC
On Desktop App, incoming calls show a button in the "Status" column. Need to bind this button to two actions:
Call /calls/connect/:id to update call status across desktop app
Connect to tokbox session with voice only. See work on #2 for opentok connect implementation. Can possibly share javascript functions.
After clicking call, change button to "Hangup"
On click, disconnect from opentok session, and call api endpoint for /call/disconnect/:id
Improve redirect when user is not logged in.
Right now popup shows from datatables.js. User needs to clear.
Perhaps it could be fixed by changing:
to $(window).load() {
}
On index.html, use CSS media queries to hide dashboard. Instead show web app.
login.html is good, no changes needed.
Create a simple interface. Logo, and one button for "Call"
Possible button design, unless you have better:
Need to handle Server Side Events.
When a desktop user clicks the "Incoming" button, the /calls/connect/:id endpoint is requested. This endpoint will send a server side event out to all desktop users. See:
This server side event needs to be handled, so that "Status" column in the "Calls" table is updated.
Datatables.js provides an api for updating rows. You may need that. If not, drop down to jquery.
On index.html, redirect to login.html if no local storage exists for loopback auth token
https://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage
Local storage set here. I believe method is localStorage.getItem() to read token:
https://github.com/thisbounty/WebRTC-Frontend/blob/master/assets/pages/scripts/login.js#L51
Store user.id in local storage. Helps with authenticated call.
Need resume discussion
As discussed, for mequake
Need to use OpenTok API to create a voice call
https://tokbox.com/developer/sdks/js/
Use GET /calls/new api endpoint to get tokbox authentication token.
https://tokbox.com/developer/guides/connect-session/js/#connecting
Only need audio, no video:
https://tokbox.com/developer/guides/audio-video/js/#voice
https://tokbox.com/developer/tutorials/web/basic-video-chat/step-4/
Full stream instructions, and once again, friendly reminder, no video is required:
https://tokbox.com/developer/guides/publish-stream/js/index.html#create_publisher
Remove unused items from Callers table
Remove Searchers table
You can hide with CSS if it's easier.
Need signup form on frontend, for signing up new users.
Loopback api can create new users with a POST to /users . Try with below fields, if there is an error, we'll look into api.
{
"username": "[email protected]",
"email": "[email protected]",
"firstName": "Admin",
"lastName": "User"
}
Also need to send email.
http://stackoverflow.com/questions/24553164/strongloop-loopback-send-email#35353152
Need a mail server. AWS SES is clunky and cumbersome. Let's look at mailgun:
http://www.mailgun.com/
Extra Issue for MeQuake, completed
Need to show different status for "Connected"
If the user clicked the "Incoming" button, the "Connected" status should be a button too. Clicking it will hangup the call.
If the user does not click the "Incoming" button, and the status changes due to a server side event, status should be plain text "Connected"
Please also apply classes to the buttons, so they are styled the same as the login button, but with different colors.
Incoming - Green
Connected button - Red
Connected text - Black
Disconnected - Grey
Please add check for token validity to authorization.
Right now just checks if local storage token exists, then redirects to login.
Try making a request to calls/table. If 500 error occurs, please redirect.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.