diff options
Diffstat (limited to 'public/assets/javascripts/ui/lib/Parser.js')
| -rw-r--r-- | public/assets/javascripts/ui/lib/Parser.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/public/assets/javascripts/ui/lib/Parser.js b/public/assets/javascripts/ui/lib/Parser.js index d68f58b..87d52ef 100644 --- a/public/assets/javascripts/ui/lib/Parser.js +++ b/public/assets/javascripts/ui/lib/Parser.js @@ -115,7 +115,6 @@ var Parser = { return '<div class="video" style="width: ' + media.width + 'px; height: ' + media.height + 'px; overflow: hidden; position: relative;"><iframe frameborder="0" scrolling="no" seamless="seamless" webkitallowfullscreen="webkitAllowFullScreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen" id="okplayer" src="http://player.vimeo.com/video/' + media.token + '?api=1&title=0&byline=0&portrait=0&playbar=0&player_id=okplayer&loop=0&autoplay=0" width="' + media.width + '" height="' + media.height + '" style="position: absolute; top: 0px; left: 0px; width: ' + media.width + 'px; height: ' + media.height + 'px;"></iframe></div>' } }, - /* { type: 'soundcloud', regex: /soundcloud.com\/[-a-zA-Z0-9]+\/[-a-zA-Z0-9]+\/?$/i, @@ -127,24 +126,28 @@ var Parser = { + '&client_id=' + '0673fbe6fc794a7750f680747e863b10', success: function(result) { + // console.log(result) done({ url: url, type: "soundcloud", token: result.id, - thumbnail: "", - title: "", - width: 100, - height: 100, + thumbnail: result.artwork_url || result.user.avatar_url, + title: result.title, + description: result.user.username, + width: 166, + height: 166, }) } }); }, tag: function (media) { - return '<iframe width="400" height="166" scrolling="no" frameborder="no"' + + return '<iframe width="166" height="166" scrolling="no" frameborder="no"' + 'src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/' + media.token + '&color=ff6600&auto_play=false&show_artwork=true"></iframe>' } - }, { + }, + /* + { type: 'link', regex: /^http.+/i, fetch: function(url, done) { |
