expose methods to window

This commit is contained in:
srgooglo 2022-05-13 09:53:39 +02:00
parent 52062b1897
commit 7c39556ae1

View File

@ -31,6 +31,11 @@ export default class StreamViewer extends React.Component {
videoPlayerRef = React.createRef()
componentDidMount = async () => {
window.StreamViewer = {
updateQuality: this.updateQuality,
switchProtocol: this.switchProtocol,
}
const query = new URLSearchParams(window.location.search)
const requestedUsername = query.get("key")