diff --git a/frontend/Dockerfile b/frontend/Dockerfile index e5b8aea..09b56b2 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -21,4 +21,5 @@ RUN cp -a /tmp/node_modules /app WORKDIR /app COPY server /app COPY --from=build /app/build /app/public +RUN sed 's//<%- TWITTER_META%>/g' /app/public/index.html > /app/index.ejs CMD ["node", "index.js"] \ No newline at end of file diff --git a/frontend/public/card.js b/frontend/public/card.js deleted file mode 100644 index 8f06a9c..0000000 --- a/frontend/public/card.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -// Create an instance -let wavesurfer; - -// Init & load audio file -document.addEventListener('DOMContentLoaded', function() { - // Init - wavesurfer = WaveSurfer.create({ - container: document.querySelector('#waveform'), - waveColor: '#A8DBA8', - progressColor: '#3B8686', - backend: 'MediaElement', - mediaControls: false - }); - - wavesurfer.once('ready', function() { - console.log('Using wavesurfer.js ' + WaveSurfer.VERSION); - }); - - wavesurfer.on('error', function(e) { - console.warn(e); - }); - - // Load audio from URL - wavesurfer.load('https://s3.us-west-1.wasabisys.com/openmhz-west/media/dcfd-1039-1613917169.m4a'); - - // toggle play button - document - .querySelector('[data-action="play"]') - .addEventListener('click', wavesurfer.playPause.bind(wavesurfer)); - - -}); \ No newline at end of file diff --git a/frontend/public/index.html b/frontend/public/index.html index 47ae8c7..3cefde5 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -9,6 +9,7 @@ name="%REACT_APP_SITE_NAME%" content="Listen to live Police and Fire radio broadcasts. Archived for 30 days and searchable." /> + - + wavesurfer.on("error", function (e) { + console.warn(e); + }); -