diff --git a/Makefile.am b/Makefile.am index ae035de4..0be57c11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,6 +19,7 @@ lms_images_DATA = \ lms_approot_DATA = \ approot/artists.xml \ approot/artist.xml \ + approot/mediaplayer.xml \ approot/messages.xml \ approot/releases.xml \ approot/release.xml \ diff --git a/approot/mediaplayer.xml b/approot/mediaplayer.xml new file mode 100644 index 00000000..945a307a --- /dev/null +++ b/approot/mediaplayer.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${previous} ${play-pause} ${next} + ${next} ${cover} + ${current-time} ${total-time} ${shuffle} ${repeat} + ${}${artist-name}${} + ${}${release-name}${} + ${track-name} + + + diff --git a/approot/templates.xml b/approot/templates.xml index 5f93b41d..a6581c0f 100644 --- a/approot/templates.xml +++ b/approot/templates.xml @@ -5,6 +5,7 @@ ${navbar-top class="main-nav"} ${contents class="container"} + ${player} diff --git a/src/Makefile.am b/src/Makefile.am index 5bcbc8a6..58cd27d6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,6 +29,7 @@ lms_SOURCES = \ $(srcdir)/ui/Filters.cpp \ $(srcdir)/ui/HomeView.cpp \ $(srcdir)/ui/LmsApplication.cpp \ + $(srcdir)/ui/MediaPlayer.cpp \ $(srcdir)/ui/ReleasesView.cpp \ $(srcdir)/ui/ReleaseView.cpp \ $(srcdir)/ui/TracksView.cpp \ diff --git a/src/ui/LmsApplication.cpp b/src/ui/LmsApplication.cpp index 063e97be..b5582f34 100644 --- a/src/ui/LmsApplication.cpp +++ b/src/ui/LmsApplication.cpp @@ -31,7 +31,7 @@ #include "auth/LmsAuth.hpp" #include "Explore.hpp" #include "HomeView.hpp" - +#include "MediaPlayer.hpp" #include "LmsApplication.hpp" @@ -81,6 +81,7 @@ LmsApplication::LmsApplication(const Wt::WEnvironment& env, Wt::Dbo::SqlConnecti messageResourceBundle().use(appRoot() + "artist"); messageResourceBundle().use(appRoot() + "artists"); messageResourceBundle().use(appRoot() + "messages"); + messageResourceBundle().use(appRoot() + "mediaplayer"); messageResourceBundle().use(appRoot() + "templates"); messageResourceBundle().use(appRoot() + "release"); messageResourceBundle().use(appRoot() + "releases"); @@ -270,8 +271,8 @@ LmsApplication::handleAuthEvent(void) mainStack->addWidget(new Wt::WText("SETTINGS")); // MediaPlayer -// auto player = new AudioPlayer(AudioPlayer::ControlPlayqueue); -// main->bindWidget("player", player); + auto player = new MediaPlayer(); + main->bindWidget("player", player); internalPathChanged().connect(std::bind([=] {