This repository has been archived by the owner on May 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
function getPlaybackStatus() { | ||
var playIcon = document.getElementById("play-icon").className; | ||
if (playIcon === "glyphicon glyphicon-play") { | ||
return mellowplayer.PlaybackStatus.PAUSED; | ||
} | ||
else { | ||
return mellowplayer.PlaybackStatus.PLAYING; | ||
} | ||
} | ||
|
||
function update() { | ||
return { | ||
"playbackStatus": getPlaybackStatus(), | ||
"canSeek": true, | ||
"canGoNext": true, | ||
"canGoPrevious": true, | ||
"canAddToFavorites": false, | ||
"volume": 1, | ||
"duration": current_song.totalTime, | ||
"position": toSeconds(document.getElementById("counter").innerText.split("/")[0].trim()), | ||
"songId": current_song.currentSongId, | ||
"songTitle": $('#currenttrack').text(), | ||
"artistName": $('#artist').text(), | ||
"albumTitle": $('#album').text(), | ||
"artUrl": 'https://colinduquesnoy.github.io/MellowPlayer/img/img_mellow-icon.svg', | ||
"isFavorite": false | ||
}; | ||
} | ||
|
||
function play() { | ||
clickPlay(); | ||
} | ||
|
||
function pause() { | ||
clickPlay(); | ||
} | ||
|
||
function goNext() { | ||
socket.send('MPD_API_SET_NEXT'); | ||
} | ||
|
||
function goPrevious() { | ||
socket.send('MPD_API_SET_PREV'); | ||
} | ||
|
||
function setVolume(volume) { | ||
|
||
} | ||
|
||
function addToFavorites() { | ||
|
||
} | ||
|
||
function removeFromFavorites() { | ||
|
||
} | ||
|
||
function seekToPosition(position) { | ||
socket.send("MPD_API_SET_SEEK,"+current_song.currentSongId+","+position); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
author=Colin Duquesnoy | ||
author_website=https://github.com/ColinDuquesnoy | ||
icon=logo.svg | ||
name=ympd | ||
supported_platforms=All | ||
url=http://localhost:8080 | ||
version=1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"accent": "#3684bd", | ||
"background": "#ffffff", | ||
"foreground": "#505050", | ||
"primary": "#3a3a3a", | ||
"primaryForeground": "#ffffff", | ||
"secondary": "#4a4a4a", | ||
"secondaryForeground": "#ffffff" | ||
} |