From c8805468826bb90ec484f29349fb6d14b8c7adb1 Mon Sep 17 00:00:00 2001 From: Jordan Callicoat Date: Wed, 12 Apr 2017 13:24:10 +0000 Subject: [PATCH] Add streamable.com video plugin --- js/plugins.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/js/plugins.js b/js/plugins.js index c138d31..dc02775 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -539,8 +539,25 @@ plugins.factory('userPlugins', function() { } }); + /* + * Streamable Embedded Player + */ + var streamablePlugin = new UrlPlugin('Streamable video', function(url) { + var regexp = /^https?:\/\/streamable\.com\/s?\/?(.+)/, + match = url.match(regexp); + if (match) { + var id = match[1], embedurl = 'https://streamable.com/s/' + id; + var element = angular.element('') + .attr('src', embedurl) + .attr('width', '480') + .attr('height', '270') + .attr('frameborder', '0'); + return element.prop('outerHTML'); + } + }); + return { - plugins: [youtubePlugin, dailymotionPlugin, allocinePlugin, imagePlugin, videoPlugin, audioPlugin, spotifyPlugin, cloudmusicPlugin, googlemapPlugin, asciinemaPlugin, yrPlugin, gistPlugin, pastebinPlugin, giphyPlugin, tweetPlugin, vinePlugin] + plugins: [youtubePlugin, dailymotionPlugin, allocinePlugin, imagePlugin, videoPlugin, audioPlugin, spotifyPlugin, cloudmusicPlugin, googlemapPlugin, asciinemaPlugin, yrPlugin, gistPlugin, pastebinPlugin, giphyPlugin, tweetPlugin, vinePlugin, streamablePlugin] };