changed controls

This commit is contained in:
Luke Berndt
2021-02-22 21:50:40 -05:00
parent 314a4fb880
commit c59f5241a1
2 changed files with 30 additions and 39 deletions

View File

@@ -9,6 +9,8 @@
name="%REACT_APP_SITE_NAME%" name="%REACT_APP_SITE_NAME%"
content="Listen to live Police and Fire radio broadcasts. Archived for 30 days and searchable." content="Listen to live Police and Fire radio broadcasts. Archived for 30 days and searchable."
/> />
<!-- Below is an ugly hack! I needed a way to add a tag to insert Twitter Meta if needed-->
<!-- I SED the tag below out and replace it with an EJS tag to insert a block of meta -->
<meta name="temp" conent="replace"/> <meta name="temp" conent="replace"/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/apple-touch-icon.png" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/apple-touch-icon.png" />
<!-- <!--

View File

@@ -4,6 +4,14 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>OpenMHz</title> <title>OpenMHz</title>
<script src="https://unpkg.com/wavesurfer.js"></script> <script src="https://unpkg.com/wavesurfer.js"></script>
</head>
<body>
<div id="demo">
<div id="waveform">
<!-- Here be the waveform -->
</div>
<script> <script>
// Create an instance // Create an instance
let wavesurfer; let wavesurfer;
@@ -30,28 +38,9 @@
// Load audio from URL // Load audio from URL
wavesurfer.load(call_url); wavesurfer.load(call_url);
// toggle play button
document
.querySelector('[data-action="play"]')
.addEventListener("click", wavesurfer.playPause.bind(wavesurfer));
}); });
</script> </script>
</head>
<body>
<div id="demo">
<div id="waveform">
<!-- Here be the waveform -->
</div>
<div class="controls">
<button class="btn btn-primary" data-action="play">
<i class="glyphicon glyphicon-play"></i>
Play /
<i class="glyphicon glyphicon-pause"></i>
Pause
</button>
</div>
</div> </div>
</body> </body>
</html> </html>