From 4642c685faf3ed45a423d8cc483b7e2f48d36427 Mon Sep 17 00:00:00 2001 From: Scott Alfter Date: Mon, 18 Oct 2021 23:08:58 -0700 Subject: [PATCH] switch over to MediaElement.js so we can add skip-30-second buttons --- .gitmodules | 3 + .vscode/launch.json | 10 +++ Dockerfile | 1 + README.md | 2 + index.php | 141 ++++++++++++++++++++++--------------------- mediaelement-plugins | 1 + mejs-controls.svg | 68 +++++++++++++++++++++ 7 files changed, 156 insertions(+), 70 deletions(-) create mode 100644 .vscode/launch.json create mode 160000 mediaelement-plugins create mode 100644 mejs-controls.svg diff --git a/.gitmodules b/.gitmodules index d9e573a..7d332dc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "getid3"] path = getid3 url = https://github.com/JamesHeinrich/getID3 +[submodule "mediaelement-plugins"] + path = mediaelement-plugins + url = https://github.com/mediaelement/mediaelement-plugins diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8cc5230 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,10 @@ +{ + "configurations": [ + { + "name": "Listen for Xdebug", + "type": "php", + "request": "launch", + "port": 9000 + } + ] +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index c206d80..d374b57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,5 @@ ENV CHANNELS "${CHANNELS:-1}" ENV BITRATE "${BITRATE:-32}" RUN (cd /var/www/html && curl -L https://github.com/JamesHeinrich/getID3/archive/refs/tags/v1.9.21.tar.gz | tar xzf - && mv getID3-* getid3) RUN (cd /var/www/html && curl -L https://github.com/mediaelement/mediaelement/archive/refs/tags/5.0.1.tar.gz | tar xzf - && mv mediaelement-* mediaelement) +RUN (cd /var/www/html && curl -L https://github.com/mediaelement/mediaelement-plugins/archive/refs/tags/2.6.1.tar.gz | tar xzf - && mv mediaelement-plugins-* mediaelement-plugins) VOLUME /var/www/html/ diff --git a/README.md b/README.md index 208845c..c0ead02 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ StreamShifter Capture streaming audio from your favorite sources to build a custom podcast stream. I used this for a number of years on a bog-standard Linux/Nginx/PHP-FPM server, and have recently containerized it for use with Docker. It'll record live audio captured from a URL, transcoding it into a common format along the way. You can listen to the most recent stream as it records with HTTP live streaming, or you can listen later to the podcast. +StreamShifter actually uses MediaElement.js now...it wasn't previously. Buttons to skip forward and back 30 seconds have been added to the player, which are convenient for skipping past commercials. + Standalone Instructions ----------------------- diff --git a/index.php b/index.php index 186c32b..c5cfca5 100644 --- a/index.php +++ b/index.php @@ -1,78 +1,79 @@ - + + -Live Audio and Podcasts - - - - - - + + + -

Live Audio and Podcasts

- +
+
+ +
+ +
+ + + + + + + diff --git a/mediaelement-plugins b/mediaelement-plugins new file mode 160000 index 0000000..9651e3f --- /dev/null +++ b/mediaelement-plugins @@ -0,0 +1 @@ +Subproject commit 9651e3f626e85f552d36d45ce2a0f26304c1f9c7 diff --git a/mejs-controls.svg b/mejs-controls.svg new file mode 100644 index 0000000..db1938e --- /dev/null +++ b/mejs-controls.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +