plugins: add AlloCine support

with-route-provider
Vivien Didelot 12 years ago
parent dbb2bcb8f9
commit 15e267a9ee
  1. 21
      js/plugins.js

@ -191,6 +191,25 @@ plugins.factory('userPlugins', function() {
}); });
dailymotionPlugin.name = 'Dailymotion video'; dailymotionPlugin.name = 'Dailymotion video';
/*
* AlloCine Embedded Player
*/
var allocinePlugin = new Plugin(function(message) {
var rVideokast = /allocine.fr\/videokast\/video-(\d+)/;
var rCmedia = /allocine.fr\/.*cmedia=(\d+)/;
var match = message.match(rVideokast) || message.match(rCmedia);
if (match) {
var id = match[1];
var embedurl = 'http://www.allocine.fr/_video/iblogvision.aspx?cmedia=' + id;
return '<iframe frameborder="0" width="480" height="270" src="' + embedurl + '"></iframe>';
}
return null;
});
allocinePlugin.name = 'AlloCine video';
/* /*
* Image Preview * Image Preview
*/ */
@ -262,6 +281,6 @@ plugins.factory('userPlugins', function() {
googlemapPlugin.name = 'Google Map'; googlemapPlugin.name = 'Google Map';
return { return {
plugins: [youtubePlugin, dailymotionPlugin, imagePlugin, spotifyPlugin, cloudmusicPlugin, googlemapPlugin] plugins: [youtubePlugin, dailymotionPlugin, allocinePlugin, imagePlugin, spotifyPlugin, cloudmusicPlugin, googlemapPlugin]
} }
}); });

Loading…
Cancel
Save