Merge branch '3.0' into videojs-hls
This commit is contained in:
commit
e99bfcd47b
6 changed files with 34 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ var mediaquery = require("cytube-mediaquery");
|
|||
var YouTube = require("cytube-mediaquery/lib/provider/youtube");
|
||||
var Vimeo = require("cytube-mediaquery/lib/provider/vimeo");
|
||||
var Vidme = require("cytube-mediaquery/lib/provider/vidme");
|
||||
var Streamable = require("cytube-mediaquery/lib/provider/streamable");
|
||||
|
||||
/*
|
||||
* Preference map of quality => youtube formats.
|
||||
|
|
@ -567,6 +568,24 @@ var Getters = {
|
|||
const media = new Media(video.id, video.title, video.duration,
|
||||
"vm", video.meta);
|
||||
process.nextTick(callback, false, media);
|
||||
}).catch(function (err) {
|
||||
callback(err.message || err, null);
|
||||
});
|
||||
},
|
||||
|
||||
/* streamable */
|
||||
sb: function (id, callback) {
|
||||
if (!/^[\w-]+$/.test(id)) {
|
||||
process.nextTick(callback, "Invalid streamable.com ID");
|
||||
return;
|
||||
}
|
||||
|
||||
Streamable.lookup(id).then(video => {
|
||||
const media = new Media(video.id, video.title, video.duration,
|
||||
"sb", video.meta);
|
||||
process.nextTick(callback, false, media);
|
||||
}).catch(function (err) {
|
||||
callback(err.message || err, null);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -244,6 +244,8 @@
|
|||
return "http://hitbox.tv/" + id;
|
||||
case "hl":
|
||||
return id;
|
||||
case "sb":
|
||||
return "https://streamable.com/" + id;
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue