Skip to content

Commit

Permalink
Added Stop button, issue #14
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Jun 10, 2018
1 parent b6a887f commit 9ffa3c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions htdocs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
<button id="btnPrev" type="button" class="btn btn-secondary" onclick="socket.send('MPD_API_SET_PREV');">
<span class="material-icons">skip_previous</span>
</button>
<button id="btnStop" type="button" class="btn btn-secondary" onclick="clickStop();">
<span class="material-icons">stop</span>
</button>
<button id="btnPlay" type="button" class="btn btn-secondary" onclick="clickPlay();">
<span class="material-icons">pause</span>
</button>
Expand Down
4 changes: 4 additions & 0 deletions htdocs/js/mpd.js
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,10 @@ function clickPlay() {
socket.send('MPD_API_SET_PAUSE');
}

function clickStop() {
socket.send('MPD_API_SET_STOP');
}

function setLocalStream(mpdhost,streamport) {
var mpdstream = 'http://';
if ( mpdhost == '127.0.0.1' || mpdhost == 'localhost')
Expand Down

0 comments on commit 9ffa3c1

Please sign in to comment.