autoplay = $(e).data('autoplay'),
setup = $(e).data('setup'),
linkid = $(e).data('link-id'),
+ url = $(e).data('url'),
path,
poster,
html,
path = '../' + path;
}
}
-
- if (name !== '') {
+ if (url) {
+ path = url;
+ } else if (name !== '') {
poster = path + '.jpg';
}
// List all possible formats (only applicable for locally hosted videos)
if (name !== '') {
this.videoFormats.forEach(function (format) {
- html += '<source src="' + path + '.' + format + '">';
+ var p = path;
+ if (p.indexOf('.' + format) === -1) {
+ p += '.' + format;
+ }
+ html += '<source src="' + p + '">';
});
}