Created
December 8, 2016 14:29
-
-
Save acomito/bd93b786fa92a5ce6b279e13a8217376 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
import React from 'react'; | |
import { OTSession, OTPublisher, OTStreams, OTSubscriber, createSession } from 'opentok-react'; | |
export class TokBoxChat extends React.Component { | |
constructor(props){ | |
super(props); | |
this.startSession = this.startSession.bind(this); | |
this.joinSession = this.joinSession.bind(this); | |
this.endSession = this.endSession.bind(this); | |
startSession(){ | |
Bert.alert('session created', 'success'); | |
} | |
joinSession(){ | |
Bert.alert('session joined', 'success'); | |
} | |
endSession(){ | |
Bert.alert('session ended', 'success'); | |
} | |
render() { | |
return ( | |
<div> | |
<button onClick={this.startSession}>start session</button> | |
<button onClick={this.endSession}>end session</button> | |
<button onClick={this.joinSession}>join session</button> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment