@@ -1567,6 +1567,14 @@ function setupLayoutPanel() {
document.getElementById('filelist').innerHTML = newHtml;
}
+function tglMoveMetadata() {
+ VUEPLAYERCORE.altLayout.moveMeta = !VUEPLAYERCORE.altLayout.moveMeta;
+}
+
+function tglBookCtrls() {
+ VUEPLAYERCORE.altLayout.audioBookCtrls = !VUEPLAYERCORE.altLayout.audioBookCtrls;
+}
+
function flipPlayer() {
document.getElementById('content').style.flexDirection = 'column-reverse'
}
diff --git a/webapp/alpha/spa.css b/webapp/alpha/spa.css
index ec89866..47ffac1 100644
--- a/webapp/alpha/spa.css
+++ b/webapp/alpha/spa.css
@@ -664,7 +664,7 @@ body {
.header-tab{
z-index: 1000;
- display: flow-root;
+ display: flex;
}
.grow {
@@ -921,6 +921,27 @@ svg {
select {
background-color: #2d333b !important;
-color: #FFF;
-cursor: pointer;
+ color: #FFF;
+ cursor: pointer;
+}
+
+.custom-card-img img {
+ max-height: 140px;
+}
+
+.card-mod {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+}
+
+.card-mod .card-content {
+ padding: 6px !important;
+}
+
+.card-meta {
+ padding-left: 12px;
+}
+
+.flex-end {
+ justify-content: flex-end;
}
\ No newline at end of file
diff --git a/webapp/alpha/vp.js b/webapp/alpha/vp.js
index 88d283a..d8d4b98 100644
--- a/webapp/alpha/vp.js
+++ b/webapp/alpha/vp.js
@@ -1,6 +1,11 @@
const VUEPLAYERCORE = (() => {
const mstreamModule = {};
+ mstreamModule.altLayout = {
+ 'moveMeta': false,
+ 'audioBookCtrls': false
+ };
+
const replayGainPreGainSettings = [
-15.0,
-10.0,
@@ -42,9 +47,30 @@ const VUEPLAYERCORE = (() => {
data: {
playlist: MSTREAMPLAYER.playlist,
playlists: mstreamModule.playlists,
- showClear: showClearLink
+ showClear: showClearLink,
+ altLayout: mstreamModule.altLayout,
+ meta: MSTREAMPLAYER.playerStats.metadata
+ },
+ computed: {
+ albumArtPath: function () {
+ if (!this.meta['album-art']) {
+ return 'assets/img/default.png';
+ }
+ return MSTREAMAPI.currentServer.host + `album-art/${this.meta['album-art']}?token=${MSTREAMPLAYER.getCurrentSong().authToken}`;
+ }
},
methods: {
+ goToArtist: function() {
+ const el = document.createElement('DIV');
+ el.setAttribute('data-artist', this.meta.artist);
+ getArtistz(el);
+ },
+ goToAlbum: function() {
+ const el = document.createElement('DIV');
+ el.setAttribute('data-album', this.meta.album);
+ el.setAttribute('data-year', this.meta.year);
+ getAlbumsOnClick(el);
+ },
checkMove: function (event) {
document.getElementById("pop").style.visibility = "hidden";
MSTREAMPLAYER.resetPositionCache();
@@ -256,6 +282,7 @@ const VUEPLAYERCORE = (() => {
meta: MSTREAMPLAYER.playerStats.metadata,
lastVol: 100,
replayGainToggle: false,
+ altLayout: mstreamModule.altLayout
},
created: function () {
if (typeof(Storage) !== "undefined") {
@@ -270,6 +297,10 @@ const VUEPLAYERCORE = (() => {
}
},
computed: {
+ playbackRate: function() {
+ const rate = Number(this.playerStats.playbackRate);
+ return rate.toFixed(2) + 'x'
+ },
currentTime: function() {
if (!this.playerStats.duration) { return ''; }
@@ -350,6 +381,12 @@ const VUEPLAYERCORE = (() => {
el.setAttribute('data-year', this.meta.year);
getAlbumsOnClick(el);
},
+ goForward: function(seconds) {
+ MSTREAMPLAYER.goForwardSeek(seconds);
+ },
+ goBack: function(seconds) {
+ MSTREAMPLAYER.goBackSeek(seconds);
+ },
fadeOverlay: function () {
VIZ.toggleDom();
},
diff --git a/webapp/index.html b/webapp/index.html
index b744f9c..f531df5 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -249,10 +249,10 @@
Jukebox