Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4.0 #12

Closed
wants to merge 80 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
5d506cd
Firefox MCU Windows issue (testing)
Jul 15, 2015
3996003
Merge branch 'development' of https://github.com/Temasys/getaroom int…
Jul 15, 2015
d8b715d
test adapterjs without page refresh
Jul 16, 2015
d7772b2
Updating version
Jul 28, 2015
88907d0
Modiied GAR room limit to 10. Also added layout support for up to 20 …
Nov 2, 2015
14d445c
Merge branch 'master' into development
Jan 19, 2016
547ddfa
Merge pull request #9 from sherwinsim/20-viewers
Jan 19, 2016
3d7b1c8
Fixes for routing hash for IE 8+. Note that IE 7 < is not supported.
Jan 19, 2016
8eaa240
Removed "m" for room names to join with MCU. Appended queries instead…
Jan 19, 2016
d2b9823
Fixes for lock room causing issues sometimes.
Jan 19, 2016
bbe3406
Added textbox for updating username.
Jan 19, 2016
32313f4
Revert of commit d2b9823.
Jan 20, 2016
7259c62
Upgraded skylinkjs to 0.6.7, socket.io-client to 1.3.7 and adapterjs …
Jan 20, 2016
583872a
Updating dependency of skylinkjs to use latest 0.6.x.
Jan 20, 2016
fc14336
Cleaned and updated codes with documentation.
Jan 20, 2016
d17c255
Fixes for opera screensharing button appearing when not support.
Jan 20, 2016
2f2d6ba
Fixes to prevent users from pressing screensharing button multiple ti…
Jan 20, 2016
3c9d0c1
Fixes to prevent other users from screensharing when one user is scre…
Jan 20, 2016
c1b7718
Update to media access chat messaging.
Jan 20, 2016
d5a5c97
Fixes to update prevent screensharing status after peer with screensh…
Jan 20, 2016
b690df4
Temp fix to prevent Users from sharing screen at initial stage when o…
Jan 20, 2016
cfb040a
Disable screensharing for now.
Jan 21, 2016
de669ba
Recording changes in-progress.
Jan 21, 2016
43915d3
Handle leave room while initialization.
Jan 21, 2016
862e810
Prevent screensharing for now.
Jan 21, 2016
0006412
Fixes for safari display name empty space.
Jan 21, 2016
3811d52
Fixes and cleanup to codes for reaction.
Jan 21, 2016
0a6a05b
Fixes for username textbox auto adding name if set to empty.
Jan 21, 2016
d3860d5
Screensharing stability (in-progress).
Jan 21, 2016
180de5c
Possibly fixing screensharing takeover.
Jan 21, 2016
c5ccf04
Remove unwanted console log.
Jan 22, 2016
39018d3
Possibly fixing screensharing takeover 2.
Jan 22, 2016
9145f55
Fixes for screensharing takeover.
Jan 22, 2016
09f3a59
Merge branch 'development' into beta-recording
Jan 22, 2016
2bfc265
Changes to match up to recording MCU dev server.
Jan 22, 2016
b36da5f
Added warning if users are more than 4 in screensharing mode.
Jan 22, 2016
89a3756
Merge branch 'development' into beta-recording
Jan 22, 2016
f969944
MCU screensharing fixes.
Jan 22, 2016
db919d1
Merge branch 'development' into beta-recording
Jan 22, 2016
74806b7
Fixes for MCU firefox connection and correct keys.
Jan 22, 2016
8823412
Fixes to prevent duplicate triggers of "ON" and "OFF" recordingStates.
Jan 22, 2016
951c23a
Fixes for recording to be allowed only after 5 secs with IDs and disa…
Jan 22, 2016
1811eb8
Enable screensharing for beta-recording.
Jan 22, 2016
508f55c
Use http:// recording mcu server if recording=1 flag is true.
Jan 22, 2016
7504ef3
Fixes for "roomLock" event.
Jan 25, 2016
3da66cd
Accodomate https: to MCU dev ec2 server.
Jan 26, 2016
4c5fe16
Increase timeout to 10s.
Jan 28, 2016
b14736b
Allow one peer recording.
Jan 28, 2016
f13114e
Fixes to allow one peer recording. Logic error.
Jan 28, 2016
012b1ad
Fixes for no audio or video joining not reflecting the status correct…
Feb 4, 2016
000478c
Remove recording=1 query flag and point recording MCU url to prod.
Feb 4, 2016
80bbb77
Updating signaling to point to staging-signaling.
Feb 10, 2016
4060839
Fixes to ensure that skylinkjs debug version isRecording flag is set …
Feb 15, 2016
2ebbb7b
Fix to prevent the event RECORDING_STATE.STOP from trigger. Irrelevan…
Feb 15, 2016
377d8b3
Updates to allow recordingIds and remove prevention for starting reco…
Feb 18, 2016
8527db5
Disable isRecording state flag.
Feb 18, 2016
5a86c43
Fixes for incorrect recording states displayed for UI button.
Feb 19, 2016
551a1a2
Switch to roomServer usage.
Mar 3, 2016
2ac38c3
Let local env use prod api.
Mar 3, 2016
36bd980
Switching dev.getaroom.io to use prod api due to MCU issues pointed out
Mar 3, 2016
be053f9
Switched to point to staging signaling for now.
Mar 3, 2016
f8f34a0
Fix for wrong signaling url.
Mar 3, 2016
d29d4a4
Revert back to use staging api and sig for dev.getaroom.io.
Mar 3, 2016
b89f51a
Add flags to debug version of skylink.js to point to staging-signalin…
Mar 4, 2016
2a1df3b
Fix do not set bandwidth bitrate for skylink.
Mar 18, 2016
fd98c9c
Update skylink recording changes to 0.6.11 (pre-release) code-base.
Mar 18, 2016
e7657af
Fix dependencies version used by 0.6.11 (pre-release) version.
Mar 18, 2016
7ff294b
Remove debugging version of skylink.js.
Mar 21, 2016
e066585
Remove references to "recording" changes.
Mar 21, 2016
c0e39ce
Update header logo padding-top.
Mar 21, 2016
582eb78
Merge branch 'master' into 0.4.0-release
Mar 21, 2016
ce099ee
Update README.md with more information
Mar 21, 2016
d9741cd
Update README.md with connection limit.
Mar 21, 2016
c95635d
Update README.md
Mar 21, 2016
124c72e
Update README.md with certificates information.
Mar 21, 2016
9a8c194
Update README.md
Mar 21, 2016
30bd015
Update README.md certificates information.
Mar 21, 2016
18a4c2a
Update README.md
Mar 21, 2016
5b6a42e
Update README.md
Mar 21, 2016
f213538
Update README.md
Mar 21, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ module.exports = function (grunt) {
port: 8085,
open: 'https://localhost:8085',
protocol: 'https',
key: grunt.file.read('server.key').toString(),
cert: grunt.file.read('server.crt').toString(),
ca: grunt.file.read('ca.crt').toString()
//key: grunt.file.read('server.key').toString(),
//cert: grunt.file.read('server.crt').toString(),
//ca: grunt.file.read('ca.crt').toString()
}
},
production: {
Expand Down
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ getaroom.io
> Pretty nifty cross device and cross browser WebRTC audio/video conferencing demo of [SkylinkJS](http://github.com/Temasys/SkylinkJS) using [React](http://facebook.github.io/react/).
> Try it out at http://getaroom.io

For more other advanced features of SkylinkJS like the file transfers or the privileged key feature, [see the SkylinkJS demos list](https://github.com/Temasys/SkylinkJS/tree/master/demo).

Browser support
----
Currently, the demo only support up to 10 peers. You may modify the demo to fit to your own limit, but the actual connection limits depends on the user's network connection and computer available memory.

See SkylinkJS support https://github.com/Temasys/SkylinkJS/#supported-browsers


Setup
----
Expand All @@ -16,6 +24,39 @@ You'll need node, npm and grunt installed. Clone the repo and run `npm install`

Replace the API keys and hostnames in the `configs.jsx` file with your own. You can [sign up for your own API key here](https://developer.temasys.com.sg).

Note that it's important to reference the correct `socket.io-client` and `adapterjs` dependencies version based on the version of SkylinkJS you are using.

Files and Folders
----

You do not need to modify the `.js` files in `/js` folder nor modify from the `styles/app.css` file, since they are auto-generated everytime you do `grunt dev`.

- `assets/`: Contains the logo.
- `img/`: Contains the icon images.
- `js/`: The output auto-generated javascript `.js` files after `grunt dev` is invoked.
- `jsx/`: The source files where you do modifications to the demo scripts (JS). Files are in JSX (React).
- `jsx/components/`: The folder that stores the UI components.
- `jsx/components/chat.jsx`: This file contains the chat layout.
- `jsx/components/controls.jsx`: This file contains the user controls layout.
- `jsx/components/userareas.jsx`: This file contains the user video view layout.
- `jsx/configs.jsx`: This file contains the configuration keys. It's advisable to use your own.
- `jsx/constants.jsx`: This file contains the constants configuration used by other `jsx` files.
- `jsx/loader.jsx`: This file contains the dependencies url to load.
- `jsx/main.jsx`: This file contains handling the SkylinkJS logic.
- `jsx/utils.jsx`: This file contains utility functions used by some other `jsx` files.
- `styles/`: The source files where you do modifications to the demo UI styling (CSS). Files are in Stylus.
- `styles/app.css`: The output auto-generated stylesheet `.css` file after `grunt dev` is invoked.
- `styles/app.styl`: This file contains the demo styling.
- `index.html`: This file is the main HTML template. Modify with your own Google Analytics if required.

Note that the self-signed certificate files `ca.crt`, `server.crt` and `server.key` are for your `localhost` domain. You might have to replace with your own certificates if you are hosting this demo on your page.


Need help or want something changed?
----

You can raise tickets on [our support portal](http://support.temasys.com.sg) or on [our Github Page](https://developer.temasys.com.sg/support).


License
----
Expand Down
19 changes: 19 additions & 0 deletions source/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@
ga('create', 'UA-53665926-1', 'auto');
ga('send', 'pageview');

</script>
<script>
if (!(window.history && window.history.pushState)) {
window.historyNotSupported = true;
}

/**
* Gets the query string information
*/
window.getQuery = function (variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent(pair[1]);
}
}
};
</script>
<img src="/img/camera.svg" style="visibility: hidden; width: 1px; height: 1px;" />
<img src="/img/lock.svg" style="visibility: hidden; width: 1px; height: 1px;" />
Expand Down
217 changes: 116 additions & 101 deletions source/js/components/chat.js
Original file line number Diff line number Diff line change
@@ -1,112 +1,127 @@
/** @jsx React.DOM */

define([
'react',
'utils',
'constants',
'configs',
'skylink',
'marked'
'react',
'utils',
'constants',
'configs',
'skylink',
'marked'

], function (
React,
Utils,
Constants,
Configs,
Skylink,
Marked

React,
Utils,
Constants,
Configs,
Skylink,
Marked
) {

var Chat = React.createClass({displayName: 'Chat',
marked: Marked,
handleFocus: function(e) {
if(e.target.tagName === 'A') {
return;
}
Dispatcher.toggleControls(false);
Dispatcher.toggleChat();
},
handleSendMessage: function(e) {
if(!e.keyCode || e.keyCode === 13) {
var user = this.props.state.users.filter(function (user) {
return user.id === 0;
})[0];

if(user.name) {
Dispatcher.sendMessage(e.currentTarget.value);
}
else {
Dispatcher.setName(e.currentTarget.value);
}

e.currentTarget.value = '';
Dispatcher.toggleControls(false);
}
},
componentDidUpdate: function() {
var cont = document.getElementById('messages');
if(cont) {
cont.scrollTop = cont.scrollHeight;
}
},
render: function() {
if(this.props.state.state !== Constants.AppState.IN_ROOM) {
return (
React.DOM.section({id: "chat", className: "offline"})
);
}

var res = [];
var messages = this.props.state.room.messages || [];
var user = this.props.state.users.filter(function (user) {
return user.id === 0;
})[0];

for(var i = 0; i < messages.length; i++) {
var message = messages[i];

var className = 'message';
if(message.user === 0) {
className = className + ' you';
}
if(message.type === Constants.MessageType.ACTION) {
className = className + ' action';
}

if(message.img) {
res.push(
React.DOM.div({key: message.date, className: className},
React.DOM.img({src: message.img}),
React.DOM.span({className: "name"}, message.name),
React.DOM.span({className: "body", dangerouslySetInnerHTML: {__html: this.marked(message.content)}})
)
);
}
else {
res.push(
React.DOM.div({key: message.date, className: className},
React.DOM.span({className: "name"}, message.name),
React.DOM.span({className: "body", dangerouslySetInnerHTML: {__html: this.marked(message.content)}})
)
);
}
}

return (
React.DOM.section({id: "chat"},
var Chat = React.createClass({displayName: 'Chat',
marked: Marked,

/**
* Handles when the chatbox is in focus
*/
handleFocus: function(e) {
if(e.target.tagName === 'A') {
return;
}
Dispatcher.toggleControls(false);
Dispatcher.toggleChat();
},

/**
* Handles sending chat message
*/
handleSendMessage: function(e) {
if(!e.keyCode || e.keyCode === 13) {
var user = this.props.state.users.filter(function (user) {
return user.id === 0;
})[0];

Dispatcher.sendMessage(e.currentTarget.value);
//Dispatcher.setName(e.currentTarget.value);

e.currentTarget.value = '';
Dispatcher.toggleControls(false);
}
},

/**
* Handles when Chat updates
*/
componentDidUpdate: function() {
var cont = document.getElementById('messages');
if(cont) {
cont.scrollTop = cont.scrollHeight;
}
},

/**
* Handles rendering of the Chat
*/
render: function() {
if(this.props.state.state !== Constants.AppState.IN_ROOM) {
return (React.DOM.section({id: "chat", className: "offline"}));
}

var res = [];
var messages = this.props.state.room.messages || [];
var user = this.props.state.users.filter(function (user) {
return user.id === 0;
})[0];

for(var i = 0; i < messages.length; i++) {
var message = messages[i];

var className = 'message';

if(message.user === 0) {
className = className + ' you';
}

if(message.type === Constants.MessageType.ACTION) {
className = className + ' action';
}

// If adding image
if(message.img) {
res.push(
React.DOM.div({key: message.date, className: className},
React.DOM.img({src: message.img}),
React.DOM.span({className: "name"}, message.name),
React.DOM.span({className: "body", dangerouslySetInnerHTML: {__html: this.marked(message.content)}})
)
);
// Else
} else {
res.push(
React.DOM.div({key: message.date, className: className},
React.DOM.span({className: "name"}, message.name),
React.DOM.span({className: "body", dangerouslySetInnerHTML: {__html: this.marked(message.content)}})
)
);
}
}

return (
React.DOM.section({id: "chat"},
React.DOM.div(null,
React.DOM.div({id: "messages", onClick: this.handleFocus},
React.DOM.div(null,
React.DOM.div({id: "messages", onClick: this.handleFocus},
React.DOM.div(null,
res
)
),
React.DOM.div({id: "input", className: this.props.state.room.status !== Constants.RoomState.CONNECTED ? 'disabled' : ''},
React.DOM.input({id: "messageInput", type: "text", placeholder: user.name ? 'Chat message' : 'What‘s your name?', autoComplete: "off", onKeyDown: this.handleSendMessage})
)
res
)
),
React.DOM.div({id: "input", className: this.props.state.room.status !== Constants.RoomState.CONNECTED ? 'disabled' : ''},
React.DOM.input({id: "messageInput", type: "text", placeholder: "Chat message", autoComplete: "off", onKeyDown: this.handleSendMessage})
)
)
}
});
)
)
)
}
});

return Chat;
return Chat;
});
Loading