adding imgur gifv support to the videoPlugin
This commit is contained in:
parent
8a7a173cb7
commit
b5594d5754
1 changed files with 7 additions and 2 deletions
|
@ -302,10 +302,14 @@ plugins.factory('userPlugins', function() {
|
||||||
* mp4 video Preview
|
* mp4 video Preview
|
||||||
*/
|
*/
|
||||||
var videoPlugin = new UrlPlugin('video', function(url) {
|
var videoPlugin = new UrlPlugin('video', function(url) {
|
||||||
if (url.match(/\.(mp4|webm|ogv)\b/i)) {
|
if (url.match(/\.(mp4|webm|ogv|gifv)\b/i)) {
|
||||||
|
if (url.match(/^http:\/\/(i\.)?imgur\.com\//i)) {
|
||||||
|
// remove protocol specification to load over https if used by g-b
|
||||||
|
url = url.replace(/\.(gifv)\b/i, ".webm");
|
||||||
|
}
|
||||||
return function() {
|
return function() {
|
||||||
var element = this.getElement();
|
var element = this.getElement();
|
||||||
var velement = angular.element('<video></video>')
|
var velement = angular.element('<video autoplay loop muted></video>')
|
||||||
.addClass('embed')
|
.addClass('embed')
|
||||||
.attr('width', '560')
|
.attr('width', '560')
|
||||||
.append(angular.element('<source></source>')
|
.append(angular.element('<source></source>')
|
||||||
|
@ -315,6 +319,7 @@ plugins.factory('userPlugins', function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cloud Music Embedded Players
|
* Cloud Music Embedded Players
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue