From ce1707eb800cd62e64c6d006a0246559bdc61943 Mon Sep 17 00:00:00 2001 From: tilt12345678 Date: Mon, 11 Nov 2024 03:15:12 +0100 Subject: [PATCH] apply patch to mediaelement-plugins playlist --- Makefile | 7 +++++-- patches/mediaelement-plugins/01-playlist.js.diff | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 patches/mediaelement-plugins/01-playlist.js.diff diff --git a/Makefile b/Makefile index 4a0425b..036139d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ -.PHONY: all src css +.PHONY: all depend css src -all: css src +all: depend css src + +depend: + patch -d mediaelement-plugins -p1 < patches/mediaelement-plugins/01-playlist.js.diff css: css/build.sh diff --git a/patches/mediaelement-plugins/01-playlist.js.diff b/patches/mediaelement-plugins/01-playlist.js.diff new file mode 100644 index 0000000..e0aeb61 --- /dev/null +++ b/patches/mediaelement-plugins/01-playlist.js.diff @@ -0,0 +1,13 @@ +diff --git a/src/playlist/playlist.js b/src/playlist/playlist.js +index 82112fb..fcf4ade 100644 +--- a/src/playlist/playlist.js ++++ b/src/playlist/playlist.js +@@ -81,7 +81,7 @@ Object.assign(MediaElementPlayer.prototype, { + + player.endedCallback = () => { + if (player.currentPlaylistItem < player.listItems.length) { +- player.setSrc(player.playlist[++player.currentPlaylistItem]); ++ player.setSrc(player.playlist[++player.currentPlaylistItem].src); + player.load(); + setTimeout(() => { + player.play();