Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion webtools/src/Webtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import TableCell from "@material-ui/core/TableCell";
import TableRow from "@material-ui/core/TableRow";

import DashPlayer from "./DashPlayer";
import { audioContext } from "./Video";

const STAT_URL = "/stat";
const NGINX_INFO_URL = "/nginxInfo";
Expand Down Expand Up @@ -95,6 +96,7 @@ export default class Webtools extends React.Component {
selectedStream: null,
serverInfo: null,
statRetryTimer: 1,
windowClicked: false,
};
}

Expand Down Expand Up @@ -204,7 +206,17 @@ export default class Webtools extends React.Component {
render() {
const { selectedStream, serverInfo, streamNames } = this.state;
return (
<div className="WebtoolsContainer">
<div className="WebtoolsContainer">

{
// to resume audiocontext if the browser stops it
window.addEventListener('click', () => {
if(!this.state.windowClicked){
audioContext.resume();
console.log('clicked');
this.setState({windowClicked: true})
}})
}
<div className="StreamSelectionSidebar">
<img
alt="Earshot Logo"
Expand Down