Skip to content

Commit

Permalink
Fix skylinkjs 0.6.10 dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leticia Choo committed Mar 15, 2016
1 parent e297fc2 commit 7e469e6
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 75 deletions.
26 changes: 13 additions & 13 deletions source/js/components/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ define([
render: function() {
if(this.props.state.state !== Constants.AppState.IN_ROOM) {
return (
React.DOM.section( {id:"chat", className:"offline"})
React.DOM.section({id: "chat", className: "offline"})
);
}

Expand All @@ -74,33 +74,33 @@ define([

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)}})
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)}})
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.section({id: "chat"},
React.DOM.div(null,
React.DOM.div( {id:"messages", onClick:this.handleFocus},
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} )
),
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})
)
)
)
Expand Down
44 changes: 22 additions & 22 deletions source/js/components/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,79 +83,79 @@ define([
})[0];

res.push(
React.DOM.div( {className:"logo"}, "getaroom.io")
React.DOM.div({className: "logo"}, "getaroom.io")
);

if(this.props.state.state === Constants.AppState.FOYER) {
res.push(
React.DOM.button( {className:"joinRoom mainControl", onClick:this.handleStartRoom},
React.DOM.button({className: "joinRoom mainControl", onClick: this.handleStartRoom},
"Start a new call"
)
);

res.push(
React.DOM.div( {className:"description"},
React.DOM.div({className: "description"},
React.DOM.p(null,
"Start a FREE call",React.DOM.br(null ),"with up to ", Configs.maxUsers, " people"
),
"Start a FREE call", React.DOM.br(null), "with up to ", Configs.maxUsers, " people"
),
React.DOM.p(null,
"Just hit the \"Start a new call\" button below and share the link.",React.DOM.br(null ),React.DOM.br(null ),
"This app is a ", React.DOM.a( {href:"https://temasys.github.io", target:"_blank"}, "SkylinkJS"), " tech demo and you can fork the ", React.DOM.a( {href:"https://github.com/Temasys/getaroom", target:"_blank"}, "code on github"),"."
"Just hit the \"Start a new call\" button below and share the link.", React.DOM.br(null), React.DOM.br(null),
"This app is a ", React.DOM.a({href: "https://temasys.github.io", target: "_blank"}, "SkylinkJS"), " tech demo and you can fork the ", React.DOM.a({href: "https://github.com/Temasys/getaroom", target: "_blank"}, "code on github"), "."
)
)
);

res.push(
React.DOM.div( {className:"link"},
React.DOM.input( {type:"checkbox", id:"mcu", name:"mcu", onClick:this.handleMCUClick} ), " ", React.DOM.label( {for:"mcu"}, "Use Skylink Media Relay")
React.DOM.div({className: "link"},
React.DOM.input({type: "checkbox", id: "mcu", name: "mcu", onClick: this.handleMCUClick}), " ", React.DOM.label({for: "mcu"}, "Use Skylink Media Relay")
)
);
}
else if(this.props.state.state === Constants.AppState.IN_ROOM) {
res.push(
React.DOM.button( {className:"leaveRoom mainControl", onClick:this.handleLeaveRoom},
React.DOM.button({className: "leaveRoom mainControl", onClick: this.handleLeaveRoom},
"Leave this call"
)
);

res.push(
React.DOM.div( {className:"link"},
"Share this link to invite others into this call",React.DOM.br(null ),
React.DOM.input( {type:"text", value:location.toString(), onClick:this.handleLinkClick, readOnly:true} )
React.DOM.div({className: "link"},
"Share this link to invite others into this call", React.DOM.br(null),
React.DOM.input({type: "text", value: location.toString(), onClick: this.handleLinkClick, readOnly: true})
)
);

res.push(
React.DOM.div( {className:"status"}, "Status: ", this.props.state.room.status)
React.DOM.div({className: "status"}, "Status: ", this.props.state.room.status)
);

if(this.props.state.room.status === Constants.RoomState.CONNECTED && user.stream != null) {
res.push(
React.DOM.button( {id:"videoMute", onClick:this.handleVideoMute, className:user.videoMute ? '' : 'on', title:"Mute/Unmute Video"})
React.DOM.button({id: "videoMute", onClick: this.handleVideoMute, className: user.videoMute ? '' : 'on', title: "Mute/Unmute Video"})
);

res.push(
React.DOM.button( {id:"audioMute", onClick:this.handleAudioMute, className:user.audioMute ? '' : 'on', title:"Mute/Unmute Audio"})
React.DOM.button({id: "audioMute", onClick: this.handleAudioMute, className: user.audioMute ? '' : 'on', title: "Mute/Unmute Audio"})
);

res.push(
React.DOM.button( {id:"screenshare", onClick:this.handleScreenshare, className:user.screensharing ? 'on' : (this.props.state.room.screensharing || window.webrtcDetectedBrowser === 'opera' ? 'muted' : ''), title:"Share your screen"})
React.DOM.button({id: "screenshare", onClick: this.handleScreenshare, className: user.screensharing ? 'on' : (this.props.state.room.screensharing || window.webrtcDetectedBrowser === 'opera' ? 'muted' : ''), title: "Share your screen"})
);

res.push(
React.DOM.button( {id:"roomLock", onClick:this.handleRoomLock, className:this.props.state.room.isLocked ? '' : 'on', title:"Lock/Unlock Room"})
React.DOM.button({id: "roomLock", onClick: this.handleRoomLock, className: this.props.state.room.isLocked ? '' : 'on', title: "Lock/Unlock Room"})
);

}
}

return (
React.DOM.section( {id:"controls"},
React.DOM.section({id: "controls"},
React.DOM.nav(null,
React.DOM.button( {onClick:this.handleClose, className:this.props.state.state === Constants.AppState.IN_ROOM ? 'close' : ''}),
React.DOM.button(null),
React.DOM.button({onClick: this.handleClose, className: this.props.state.state === Constants.AppState.IN_ROOM ? 'close' : ''}),
React.DOM.button(null),
React.DOM.button(null)
),
),
React.DOM.div(null,
res
)
Expand Down
18 changes: 9 additions & 9 deletions source/js/components/userareas.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ define([
render: function() {
var showList =
this.props.state.room.status === Constants.RoomState.CONNECTED ?
UserAreaList( {users:this.props.state.users} ) :
React.DOM.div( {id:"noUser"})
UserAreaList({users: this.props.state.users}) :
React.DOM.div({id: "noUser"})

return (
React.DOM.section( {id:"userareas", className:this.props.state.room.screensharing ? 'screensharing' : 'split' + this.props.state.users.length},
React.DOM.section({id: "userareas", className: this.props.state.room.screensharing ? 'screensharing' : 'split' + this.props.state.users.length},
showList
)
)
Expand All @@ -29,8 +29,8 @@ define([
render: function() {
var userareas = this.props.users.map(function(user) {
return (
React.DOM.div( {key:user.id, className:'userarea' + (user.screensharing ? ' screensharing' : '')},
UserArea( {user:user} )
React.DOM.div({key: user.id, className: 'userarea' + (user.screensharing ? ' screensharing' : '')},
UserArea({user: user})
)
);
});
Expand Down Expand Up @@ -65,21 +65,21 @@ define([

if(this.props.user.stream === null && this.props.user.id === 0) {
res.push(
React.DOM.span( {className:"userInfo"},
React.DOM.span({className: "userInfo"},
"Share your camera and microphone to participate in the call"
)
);
}
else if(this.props.user.error) {
res.push(
React.DOM.span( {className:"userInfo"},
React.DOM.span({className: "userInfo"},
"Stream could not be established"
)
);
}
else if(this.props.user.stream === null) {
res.push(
React.DOM.span( {className:"userInfo"},
React.DOM.span({className: "userInfo"},
"Joining..."
)
);
Expand All @@ -102,7 +102,7 @@ define([

if(muted.length > 0) {
res.push(
React.DOM.span( {className:"userInfo"},
React.DOM.span({className: "userInfo"},
muted.join('/'), " muted"
)
);
Expand Down
17 changes: 5 additions & 12 deletions source/js/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,15 @@ require.config({
],

paths: {
socketio: '//cdn.temasys.com.sg/libraries/'
+ 'socket.io-client/1.0.6/socket.io',
//adapter: 'libs/adapter',
adapter: '//cdn.temasys.com.sg/adapterjs/0.11.x/' +
'adapter.screenshare',
//skylink: 'libs/skylink',
skylink: '//cdn.temasys.com.sg/skylink/skylinkjs/0.6.x/' +
'skylink.debug',
socketio: '//cdn.socket.io/socket.io-1.4.4',
adapter: '//cdn.temasys.com.sg/adapterjs/0.13.0/adapter.screenshare',
skylink: '//cdn.temasys.com.sg/skylink/skylinkjs/0.6.10/skylink.debug',
// facebook: '//connect.facebook.net/en_US/all',
// twitter: '//platform.twitter.com/widgets',
fastclick: '//cdnjs.cloudflare.com/' +
'ajax/libs/fastclick/0.6.11/fastclick.min',
fastclick: '//cdnjs.cloudflare.com/ajax/libs/fastclick/0.6.11/fastclick.min',
router: 'libs/director',
marked: 'libs/marked',
react: '//cdnjs.cloudflare.com/' +
'ajax/libs/react/0.10.0/react'
react: '//cdnjs.cloudflare.com/ajax/libs/react/0.10.0/react'
},

shim: {
Expand Down
14 changes: 7 additions & 7 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,17 +367,17 @@ define([
}

return (
React.DOM.div( {className:className},
React.DOM.div( {onClick:this.handleShowControls},
UserAreas( {state:this.state} )
),
Controls( {state:this.state} ),
Chat( {state:this.state} )
React.DOM.div({className: className},
React.DOM.div({onClick: this.handleShowControls},
UserAreas({state: this.state})
),
Controls({state: this.state}),
Chat({state: this.state})
)
)
}
});

React.renderComponent(App(null ),
React.renderComponent(App(null),
document.getElementById('app'));
});
17 changes: 5 additions & 12 deletions source/jsx/loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,15 @@ require.config({
],

paths: {
socketio: '//cdn.temasys.com.sg/libraries/'
+ 'socket.io-client/1.0.6/socket.io',
//adapter: 'libs/adapter',
adapter: '//cdn.temasys.com.sg/adapterjs/0.11.x/' +
'adapter.screenshare',
//skylink: 'libs/skylink',
skylink: '//cdn.temasys.com.sg/skylink/skylinkjs/0.6.x/' +
'skylink.debug',
socketio: '//cdn.socket.io/socket.io-1.4.4',
adapter: '//cdn.temasys.com.sg/adapterjs/0.13.0/adapter.screenshare',
skylink: '//cdn.temasys.com.sg/skylink/skylinkjs/0.6.10/skylink.debug',
// facebook: '//connect.facebook.net/en_US/all',
// twitter: '//platform.twitter.com/widgets',
fastclick: '//cdnjs.cloudflare.com/' +
'ajax/libs/fastclick/0.6.11/fastclick.min',
fastclick: '//cdnjs.cloudflare.com/ajax/libs/fastclick/0.6.11/fastclick.min',
router: 'libs/director',
marked: 'libs/marked',
react: '//cdnjs.cloudflare.com/' +
'ajax/libs/react/0.10.0/react'
react: '//cdnjs.cloudflare.com/ajax/libs/react/0.10.0/react'
},

shim: {
Expand Down

0 comments on commit 7e469e6

Please sign in to comment.