diff options
| author | “Ryder <“r@okfoc.us”> | 2016-04-11 19:43:50 -0400 |
|---|---|---|
| committer | “Ryder <“r@okfoc.us”> | 2016-04-11 19:43:50 -0400 |
| commit | 389f6443e5cee43075406c5dfe1ab3c112cf7209 (patch) | |
| tree | c90c82944d84f26f59639a5fd8055ca16ed44c73 /public/assets/js | |
| parent | 7a9d185c86840abbc8788ef21eb296b6f612f839 (diff) | |
audio
Diffstat (limited to 'public/assets/js')
| -rw-r--r-- | public/assets/js/lib/ProjectView.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/public/assets/js/lib/ProjectView.js b/public/assets/js/lib/ProjectView.js index a0e0055..c269d38 100644 --- a/public/assets/js/lib/ProjectView.js +++ b/public/assets/js/lib/ProjectView.js @@ -17,6 +17,7 @@ var ProjectView = View.extend({ this.images = this.$images.toArray().map(function(img){ return $(img).data("uri") }) + if (is_mobile) { this.$iframes.remove() this.$videos.remove() @@ -76,6 +77,7 @@ var ProjectView = View.extend({ }, show: function(){ + var audio = this.$("audio") app.header.updatePageNumber( this.page_number ) app.header.updateSlideNumber( 0 ) app.header.updateSlideCount( this.slide_count ) @@ -86,7 +88,9 @@ var ProjectView = View.extend({ app.router.pushState("/") } else { + audio.get(0).play(); app.router.pushState("/project/" + this.project_id) + } this.$images.each(function(){ @@ -120,6 +124,7 @@ var ProjectView = View.extend({ }, hide: function(){ + addClassForPeriod( this.el, "hiding", app.navigation_delay, function(){ this.reset() }.bind(this) ) @@ -140,12 +145,14 @@ var ProjectView = View.extend({ if (is_mobile) return; e.stopPropagation() app.nav.previous() + audio.pause(); }, next: function(e){ if (is_mobile) return; e.stopPropagation() app.nav.next() + audio.pause(); }, }) |
