Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- import './App.css';
- const IS_WEB_AUDIO_SUPPORTED = window.AudioContext || window.webkitAudioContext ? true : false;
- const audioCtx = IS_WEB_AUDIO_SUPPORTED ? window.AudioContext || window.webkitAudioContext : null;
- class App extends Component {
- render() {
- return (
- <div className="App">
- <header className="App-header">
- Is Web Audio Supported?
- <div>{IS_WEB_AUDIO_SUPPORTED ? "😊" : "😰"}</div>
- Is AudioContext available?
- <div>{audioCtx ? "😊" : "😰"}</div>
- </header>
- </div>
- );
- }
- }
- export default App;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement