Commit e2a5cc91 authored by Gautam Chitnis's avatar Gautam Chitnis

Feature (playlist button):Functionality for Random button in playlist section is added

This commit adds functionality for Random button in playlist section.
Button click toggles the Random play behaviour of VLC Interface regarding playlist.

Gautam C.
parent d0f27152
......@@ -83,7 +83,7 @@
<div>
<div class="playlistIcons">
<div class="row">
<button type="button" class="btn-circle col-xs"><i class="glyphicon glyphicon-random"></i></button>
<button type="button" class="btn-circle col-xs" id="randomButton"><i class="glyphicon glyphicon-random"></i></button>
<button type="button" class="btn-circle col-xs" id="repeatButton"><i class="glyphicon glyphicon-repeat"></i></button>
<button type="button" class="btn-circle col-xs" id="playButton"><i class="glyphicon glyphicon-play-circle"></i></button>
</div>
......
......@@ -17,6 +17,10 @@ Vue.component('playlist-buttons', {
{
notifyBus("play",playlistItems[0].src,playlistItems[0].id);
}
},
toggleRandom: function()
{
sendCommand(0,"command=pl_random");
}
},
created: function()
......@@ -29,5 +33,9 @@ Vue.component('playlist-buttons', {
bus.$on('startPlaylist', function() {
this.startPlaylist();
}.bind(this));
bus.$on('toggleRandom', function() {
this.toggleRandom();
}.bind(this));
}
});
\ No newline at end of file
......@@ -40,6 +40,9 @@ $(function() { // Handler for .ready() called.
$('#playButton').on('click',function (e){
notifyBus("startPlaylist");
});
$('#randomButton').on('click',function (e){
notifyBus("toggleRandom");
});
$('#mobilePlaylistNavButton').on('click',function (e){
notifyBus("openPlaylist");
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment