-
Notifications
You must be signed in to change notification settings - Fork 22
/
index.html
52 lines (49 loc) · 1.66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<p>Nothing will appear below because this page uses an invalid account ID by default.</p>
<p>Open the console and use <code>window.customApp.setState({})</code> to try changing props.</p>
<div id="fixture"></div>
<script src="node_modules/react/umd/react.development.js"></script>
<script src="node_modules/react-dom/umd/react-dom.development.js"></script>
<script src="node_modules/create-react-class/create-react-class.js"></script>
<script src="dist/brightcove-react-player-loader.js"></script>
<script>
(function() {
var fixture = document.getElementById('fixture');
var React = window.React;
var ReactDOM = window.ReactDOM;
var MyCustomApp = window.createReactClass({
getInitialState: function() {
return {
// Put your account ID, player ID, or other settings here...
accountId: 1,
videoId: 2
};
},
render: function() {
return React.createElement(window.BrightcoveReactPlayerLoader, {
accountId: this.state.accountId,
videoId: this.state.videoId,
onSuccess: function(player) {
if (console) {
console.log('successfully created player', player);
}
},
onFailure: function(err) {
if (console) {
console.log('failed to create player', err);
}
},
key: this.state
});
}
});
window.customApp = ReactDOM.render(React.createElement(MyCustomApp), fixture);
})();
</script>
</body>
</html>