mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-22 09:38:18 +00:00
Changed layout of sidebar content.
This commit is contained in:
0
_working/create
Normal file → Executable file
0
_working/create
Normal file → Executable file
0
static/bin/sm/soundmanager2.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_debug.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_debug.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_flash9.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_flash9.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_flash9_debug.swf
Normal file → Executable file
0
static/bin/sm/soundmanager2_flash9_debug.swf
Normal file → Executable file
0
static/img/whats-on.png
Normal file → Executable file
0
static/img/whats-on.png
Normal file → Executable file
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -30,6 +30,7 @@ window.HeaderView = Backbone.View.extend({
|
||||
return this;
|
||||
},
|
||||
playLive:function () {
|
||||
var ref = this;
|
||||
dssSoundHandler.playLive();
|
||||
_eventAggregator.trigger("track_playing")
|
||||
var button = $(this.el).find('#header-play-pause-button');
|
||||
@@ -37,7 +38,8 @@ window.HeaderView = Backbone.View.extend({
|
||||
$.getJSON(
|
||||
'ajax/live_now_playing/',
|
||||
function (data) {
|
||||
_eventAggregator.trigger("track_changed", data);
|
||||
alert(data.title);
|
||||
$(ref.el).find('#live-now-playing').text(data.title);
|
||||
});
|
||||
},
|
||||
togglePlayState:function () {
|
||||
|
||||
@@ -12,6 +12,11 @@ window.SidebarView = Backbone.View.extend({
|
||||
_eventAggregator.bind("track_changed", this.trackChanged);
|
||||
_eventAggregator.bind("track_playing", this.trackPlaying);
|
||||
_eventAggregator.bind("track_paused", this.trackPaused);
|
||||
$.getJSON(
|
||||
'ajax/live_now_playing/',
|
||||
function (data) {
|
||||
$("#live-now-playing", this.el).text(data.title);
|
||||
});
|
||||
},
|
||||
render: function(){
|
||||
$(this.el).html(this.template());
|
||||
@@ -35,7 +40,7 @@ window.SidebarView = Backbone.View.extend({
|
||||
$(this.el).find('#header-play-button-icon').addClass('icon-play');
|
||||
},
|
||||
playLive:function () {
|
||||
dssSoundHandler.playLive();
|
||||
com.podnoms.player.playLive();
|
||||
_eventAggregator.trigger("track_playing")
|
||||
var button = $(this.el).find('#sidebar-play-pause-button-small');
|
||||
var el = this.el;
|
||||
|
||||
@@ -148,6 +148,24 @@ com.podnoms.player = {
|
||||
}
|
||||
});
|
||||
},
|
||||
playLive:function () {
|
||||
var ref = this;
|
||||
this._destroyCurrent(function () {
|
||||
ref.currentSound = soundManager.createSound({
|
||||
id:'com.podnoms.player-live',
|
||||
url:com.podnoms.settings.liveStreamRoot,
|
||||
volume:50,
|
||||
stream:true,
|
||||
useMovieStar:true
|
||||
});
|
||||
if (ref.currentSound) {
|
||||
ref.currentSound.play();
|
||||
}
|
||||
else {
|
||||
com.podnoms.utils.showError('Oooopsies', 'Error playing sound..');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
play:function () {
|
||||
this.currentSound.play();
|
||||
|
||||
0
static/js/libs/sm/soundmanager2.js
Normal file → Executable file
0
static/js/libs/sm/soundmanager2.js
Normal file → Executable file
@@ -19,19 +19,33 @@
|
||||
<div class="row" id="side-player-area">
|
||||
<div id="whats-on">
|
||||
<h3>Now playing
|
||||
</button>
|
||||
</h3>
|
||||
</div>
|
||||
<div>
|
||||
<h5>DSS Radio
|
||||
<button id="sidebar-listen-live" class="btn btn-mini btn-primary push-right btn-inverse"
|
||||
data-toggle="button" type="button">
|
||||
Listen Live
|
||||
</button>
|
||||
</h3>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="side-player">
|
||||
<span class="content">
|
||||
<div>
|
||||
<span id="live-now-playing"></span>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div class="side-player">
|
||||
<span class="content">
|
||||
<div>
|
||||
You: <a href="#" id="now-playing">Nothing currently on</a>
|
||||
</div>
|
||||
<span class="content">
|
||||
<div>
|
||||
Live: <span id="live-now-playing"></span>
|
||||
<a href="#" id="now-playing">Nothing currently on</a>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user