Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
khloke committed Jul 11, 2015
2 parents a3194f6 + fec3f0f commit e9b3d1b
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion js/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,28 @@ var MixcloudModule = {
}
};

var Mp4UploadModule = {
canHandleUrl: function(url) {
var validPatterns = [
"^(https|http)://(www\.)?mp4upload.com/([a-zA-Z0-9]+)$"
];
return urlMatchesOneOfPatterns(url, validPatterns);
},
getMediaType: function() {
return 'video';
},
getPluginPath: function(url, callback) {
var id = url.split("/")[3];
// get embedded data
$.ajax({ url: 'http://www.mp4upload.com/embed-' + id + ".html", success: function(data) {
var found = data.match("'file': '(.+?)'");
if (found) {
callback(found[1]);
}
}});
}
};

var MyCloudPlayersModule = {
canHandleUrl: function(url) {
var validPatterns = [
Expand Down Expand Up @@ -640,5 +662,6 @@ var allModules = [
LyndaModule,
UrgantShowModule,
KinoLiveModule,
VesselLabModule
VesselLabModule,
Mp4UploadModule
];

0 comments on commit e9b3d1b

Please sign in to comment.