diff --git a/web/app/assets/javascripts/jquery.listenbroadcast.js b/web/app/assets/javascripts/jquery.listenbroadcast.js index c7a19f0ac..126044286 100644 --- a/web/app/assets/javascripts/jquery.listenbroadcast.js +++ b/web/app/assets/javascripts/jquery.listenbroadcast.js @@ -2,6 +2,19 @@ "use strict"; + /** + * when session ends + * - in chrome: + * onsuspend + * onpause + * onended + * - in firefox + * onstalled + * onplaying + * onsuspend + * onpause + * onended + */ context.JK = context.JK || {}; // the purpose of this code is to simply the interaction between user and server @@ -20,7 +33,18 @@ var $audio = null; var audioDomElement = null; var musicSessionId = null; - var isPlaying = false; // tracks if the stream is actually playing + + var isPlaying = false; + + var PlayStateNone = 'none'; + var PlayStateInitializing = 'initializing'; // user clicked play--nothing has happened yet + var PlayStateBuffering = 'buffering'; // user clicked play--the stream is being read, buffer is being built + var PlayStatePlaying = 'playing'; // we are playing + var PlayStateStalled = 'stalled'; // we were playing, but the stream is stalled + var PlayStateEnded = 'ended'; // we were playing, but the stream ended + var PlayStateFailed = 'failed'; // we could not start the stream. + + var playState = PlayStateNone; // tracks if the stream is actually playing function play(e) { if(e) { diff --git a/web/app/assets/stylesheets/custom.css.scss b/web/app/assets/stylesheets/custom.css.scss index 464faf4a9..01df24ec6 100644 --- a/web/app/assets/stylesheets/custom.css.scss +++ b/web/app/assets/stylesheets/custom.css.scss @@ -1,4 +1,5 @@ @import "bootstrap"; +@import "client/common"; /* mixins, variables, etc. */ diff --git a/web/config/application.rb b/web/config/application.rb index fc39c1fef..3fef36bfe 100644 --- a/web/config/application.rb +++ b/web/config/application.rb @@ -210,6 +210,6 @@ if defined?(Bundler) config.send_join_session_email_notifications = true - config.use_promos_on_homepage = true + config.use_promos_on_homepage = false end end