diff --git a/_working/create b/_working/create old mode 100644 new mode 100755 diff --git a/manage.py b/manage.py old mode 100644 new mode 100755 diff --git a/static/bin/sm/soundmanager2.swf b/static/bin/sm/soundmanager2.swf old mode 100644 new mode 100755 diff --git a/static/bin/sm/soundmanager2_debug.swf b/static/bin/sm/soundmanager2_debug.swf old mode 100644 new mode 100755 diff --git a/static/bin/sm/soundmanager2_flash9.swf b/static/bin/sm/soundmanager2_flash9.swf old mode 100644 new mode 100755 diff --git a/static/bin/sm/soundmanager2_flash9_debug.swf b/static/bin/sm/soundmanager2_flash9_debug.swf old mode 100644 new mode 100755 diff --git a/static/img/whats-on.png b/static/img/whats-on.png old mode 100644 new mode 100755 diff --git a/static/js/app/views/header.js b/static/js/app/views/header.js index 007b6ec..35fddfc 100644 --- a/static/js/app/views/header.js +++ b/static/js/app/views/header.js @@ -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 () { diff --git a/static/js/app/views/sidebar.js b/static/js/app/views/sidebar.js index ba6eea9..caa22dc 100644 --- a/static/js/app/views/sidebar.js +++ b/static/js/app/views/sidebar.js @@ -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; diff --git a/static/js/com.podnoms.player.js b/static/js/com.podnoms.player.js index ffd40db..8db73e3 100644 --- a/static/js/com.podnoms.player.js +++ b/static/js/com.podnoms.player.js @@ -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(); diff --git a/static/js/libs/sm/soundmanager2.js b/static/js/libs/sm/soundmanager2.js old mode 100644 new mode 100755 diff --git a/templates/views/SidebarView.html b/templates/views/SidebarView.html index 54d6ff9..9539072 100644 --- a/templates/views/SidebarView.html +++ b/templates/views/SidebarView.html @@ -19,22 +19,36 @@