diff options
Diffstat (limited to 'app/client/api/parser.js')
| -rw-r--r-- | app/client/api/parser.js | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/app/client/api/parser.js b/app/client/api/parser.js index e116767..d0e6aab 100644 --- a/app/client/api/parser.js +++ b/app/client/api/parser.js @@ -170,35 +170,36 @@ export const integrations = [ // return '<img class="video" type="vimeo" vid="'+media.token+'" src="'+media.thumbnail+'"><span class="playvid">▶</span>'; 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="https://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, - fetch: function (url, done) { - fetch('https://api.soundcloud.com/resolve.json?url=' - + url - + '&client_id=' - + '0673fbe6fc794a7750f680747e863b10') - .then(result => result.json()) - .then(result => { - console.log(result) - done({ - url: url, - type: "soundcloud", - token: result.id, - thumbnail: result.artwork_url || result.user.avatar_url, - title: result.user.username + " - " + result.title, - duration: result.duration, - width: 166, - height: 166, - }) - }) - }, - tag: function (media) { - 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: 'soundcloud', + // regex: /soundcloud.com\/[-a-zA-Z0-9]+\/[-a-zA-Z0-9]+\/?$/i, + // fetch: function (url, done) { + // fetch('https://api.soundcloud.com/resolve.json?url=' + // + url + // + '&client_id=' + // + '0673fbe6fc794a7750f680747e863b10') + // .then(result => result.json()) + // .then(result => { + // console.log(result) + // done({ + // url: url, + // type: "soundcloud", + // token: result.id, + // thumbnail: result.artwork_url || result.user.avatar_url, + // title: result.user.username + " - " + result.title, + // duration: result.duration, + // width: 166, + // height: 166, + // }) + // }) + // }, + // tag: function (media) { + // 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, |
