Skip to content

Commit

Permalink
pick c116b7e
Browse files Browse the repository at this point in the history
  • Loading branch information
yofreke committed Sep 19, 2016
1 parent c5f8e27 commit 6f05bfe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ if (process.env.NODE_ENV === 'production') {
}


// getUserMedia only works over https in Chrome 47+, so we redirect to https.
// Also notify user if running from file.
if (window.location.protocol === 'file:') {
alert('You seem to be running this example directly from a file. Note that these examples only work when served from a server or localhost due to canvas cross-domain restrictions.');
} else if (
window.location.hostname !== 'localhost' &&
window.location.protocol !== 'https:'
) {
window.location.protocol = 'https';
}


ReactDOM.render(
<Provider store={store}>
<MuiThemeProvider>
Expand Down

0 comments on commit 6f05bfe

Please sign in to comment.