Skip to content

Instantly share code, notes, and snippets.

@randika
Last active May 28, 2016 03:14
Show Gist options
  • Save randika/0dac56481142f7eb3c155ed69abdb43c to your computer and use it in GitHub Desktop.
Save randika/0dac56481142f7eb3c155ed69abdb43c to your computer and use it in GitHub Desktop.
// Host App
var serviceEndpoint = "http://path/to/endpoint"; // Or this could be array => settings = { domain: "", assignmentId: "" }
<div id="player"></div>
...
<AssignmentPlayer
configServiceEndpoint = {this.serviceEndpoint}
/>
//React component
var AssignmentPlayer = React.createClass({
propTypes: {
configServiceEndpoint: React.PropTypes.string,
},
...
buildPlayer: function() {
new AssignmentPlayer({
configServiceEndpoint: this.props.configServiceEndpoint,
});
},
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment