From 5bce553ba731879ca902b70b2c2cf69ac5aa4dc7 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Wed, 8 Dec 2021 16:25:35 +0700 Subject: [PATCH] better animated artwork control --- resources/cider-ui-tests/index.js | 24 -------------- .../views/components/animatedartwork-view.ejs | 32 +++++++++++++++++-- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/resources/cider-ui-tests/index.js b/resources/cider-ui-tests/index.js index fe84a702..ca49c82a 100644 --- a/resources/cider-ui-tests/index.js +++ b/resources/cider-ui-tests/index.js @@ -289,30 +289,6 @@ const app = new Vue({ } return hash; }, - playAnimatedArtwork(url) { - if (Hls.isSupported()) { - var video = document.querySelector(`[vid="${app.hashCode(url)}"] > video`) - console.log('supported'); - var hls = new Hls(); - // bind them together - if (video) { - hls.attachMedia(video); - hls.on(Hls.Events.MEDIA_ATTACHED, function () { - console.log('video and hls.js are now bound together !'); - hls.loadSource(url); - hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) { - video.play(); - return ""; - }); - }); - } else { - console.log("hso"); - return ""; - } - } else { - return ""; - } - }, getArtistPalette(artist) { if (artist["attributes"]["artwork"]) { return { diff --git a/resources/cider-ui-tests/views/components/animatedartwork-view.ejs b/resources/cider-ui-tests/views/components/animatedartwork-view.ejs index c2900932..17c5c2f2 100644 --- a/resources/cider-ui-tests/views/components/animatedartwork-view.ejs +++ b/resources/cider-ui-tests/views/components/animatedartwork-view.ejs @@ -1,7 +1,7 @@ @@ -9,13 +9,39 @@ \ No newline at end of file