diff options
Diffstat (limited to 'public/assets/javascripts/ui/reader/MediaPlayer.js')
| -rw-r--r-- | public/assets/javascripts/ui/reader/MediaPlayer.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/public/assets/javascripts/ui/reader/MediaPlayer.js b/public/assets/javascripts/ui/reader/MediaPlayer.js index 42e7596..8424d9c 100644 --- a/public/assets/javascripts/ui/reader/MediaPlayer.js +++ b/public/assets/javascripts/ui/reader/MediaPlayer.js @@ -49,6 +49,9 @@ var MediaPlayer = FormView.extend({ return false } } + else if (media.type == "text") { + return false + } this.bind(scenery) this.$el.addClass("active") @@ -58,8 +61,9 @@ var MediaPlayer = FormView.extend({ switch (media.type) { case "image": - this.$(".image").show() this.$(".video").hide() + this.$(".audio").hide() + this.$(".image").show() // this.$widthDimension.html( Number(media.widthDimension) || "" ) // this.$heightDimension.html( Number(media.heightDimension) || "" ) @@ -70,13 +74,22 @@ var MediaPlayer = FormView.extend({ case "youtube": case "vimeo": case "video": - this.$(".video").show() this.$(".image").hide() + this.$(".audio").hide() + this.$(".video").show() this.$playButton.toggleClass("paused", ! this.scenery.paused()) this.$muteButton.toggleClass("muted", this.scenery.muted()) break + + case "soundcloud": + this.$(".image").hide() + this.$(".video").hide() + this.$(".audio").show() + + this.$playButton.toggleClass("paused", ! this.scenery.paused()) + break } return true }, |
