Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the stop button #279

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mopidy_musicbox_webclient/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ <h4>Streams</h4>
<div class="footerControls" style="padding-left: 10px;">
<div style="float: left;">
<a href="#" onclick="controls.doPrevious(); return false"><span id="btprev" title="Previous"><i class="fa fa-fast-backward"></i></span></a>
<a href="#" onclick="controls.doPlay(); return false"><span id="btplayNowPlaying" title="Play"><i class="fa fa-play"></i></span></a>
<a href="#" onclick="controls.doPlay(); return false"><span id="btplayNowPlaying" title="Play"><i class="fa fa-play"></i></span></a
<a href="#" onclick="controls.doStop(); return false"><span id="btstop" title="Stop"><i class="fa fa-stop"></i></span></a>
<a href="#" onclick="controls.doNext(); return false"><span id="btnext" title="Next"><i class="fa fa-fast-forward"></i></span></a>
</div>
<div style="float: right; margin-right: 10px;">
Expand Down
7 changes: 6 additions & 1 deletion mopidy_musicbox_webclient/static/js/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,12 @@
}
controls.setPlayState(!play)
},


doStop: function () {
toast('Stopping current track...')
mopidy.playback.stop()
Comment on lines +531 to +532

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation on this line doesn't match the indentation in other functions on either side of this function.

},

doPrevious: function () {
toast('Playing previous track...')
mopidy.playback.previous()
Expand Down