diff options
| author | Kawandeep Virdee | 2013-11-10 11:47:46 -0500 |
|---|---|---|
| committer | Kawandeep Virdee | 2013-11-10 11:47:46 -0500 |
| commit | 4376526f8bc7e72e3d7cc958a97ade1104dc88d6 (patch) | |
| tree | fc017e7c8c2520c688664365637f70e07ca202a8 | |
| parent | c9a1791ffb8784156b52a19245761aabb62851f9 (diff) | |
| download | clip-play-4376526f8bc7e72e3d7cc958a97ade1104dc88d6.tar.bz2 | |
added image proxy
| -rw-r--r-- | assets/css/application.css | 3 | ||||
| -rw-r--r-- | assets/js/views/sample.js | 14 |
2 files changed, 14 insertions, 3 deletions
diff --git a/assets/css/application.css b/assets/css/application.css index 215daca..df74acb 100644 --- a/assets/css/application.css +++ b/assets/css/application.css @@ -19,6 +19,7 @@ header { #samples { margin: 3em 0; + z-index:1; } @@ -115,6 +116,7 @@ header { /* . Buttons . */ .button { + z-index:1; border-width: 1px; border-style: solid; cursor: pointer; @@ -212,4 +214,5 @@ header { } .sample-media{ + z-index: -1; } diff --git a/assets/js/views/sample.js b/assets/js/views/sample.js index 210975e..aa07acd 100644 --- a/assets/js/views/sample.js +++ b/assets/js/views/sample.js @@ -13,7 +13,7 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({ initialize: function(options){ this.collection = options.collection; - + this.listenTo(this.model, 'change:key', this.key_bind); this.key_bind(); }, @@ -38,7 +38,15 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({ var player = new OP.Player(iframe[0]); that.model.set('player', player); that.model.set('iframe', iframe); - that.model.set('thumbnail', data.thumbnail_url); + var thumb = data.thumbnail_url; + var new_height= 48; + var img_resize = "http://i.embed.ly/1/display/resize?" + img_resize+="url="; + img_resize+=encodeURIComponent(thumb); + img_resize+="&grow=true&key=e2dcb7bae5a443bfbb5f726daf05549f&height=" + img_resize+=new_height; + + that.model.set('thumbnail', img_resize); window.BOKASHAKA = that.model; player.getDuration(function(value) { @@ -88,7 +96,7 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({ remove_sample: function(){ this.collection.remove(this.model); - + var $iframe_video = $('#video-sample-' + this.model.cid); $iframe_video.fadeOut(400, function() { $iframe_video.remove(); |
