plugins: add AlloCine support
This commit is contained in:
parent
dbb2bcb8f9
commit
15e267a9ee
1 changed files with 20 additions and 1 deletions
|
@ -191,6 +191,25 @@ plugins.factory('userPlugins', function() {
|
|||
});
|
||||
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
|
||||
*/
|
||||
|
@ -262,6 +281,6 @@ plugins.factory('userPlugins', function() {
|
|||
googlemapPlugin.name = 'Google Map';
|
||||
|
||||
return {
|
||||
plugins: [youtubePlugin, dailymotionPlugin, imagePlugin, spotifyPlugin, cloudmusicPlugin, googlemapPlugin]
|
||||
plugins: [youtubePlugin, dailymotionPlugin, allocinePlugin, imagePlugin, spotifyPlugin, cloudmusicPlugin, googlemapPlugin]
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue