Add option to use Chrome's FileSystem API to cache videos explicitly
This commit is contained in:
parent
2aa86e2d56
commit
5e9816e693
4 changed files with 561 additions and 7 deletions
|
|
@ -1791,15 +1791,19 @@ pandora.getMediaURL = function(url) {
|
|||
return pandora.site.site.mediaprefix + url;
|
||||
};
|
||||
|
||||
pandora.getVideoURLName = function(id, resolution, part, track) {
|
||||
return id + '/' + resolution + 'p' + part + (track ? '.' + track : '') + '.' + pandora.user.videoFormat;
|
||||
};
|
||||
|
||||
pandora.getVideoURL = function(id, resolution, part, track) {
|
||||
var prefix = pandora.site.site.videoprefix
|
||||
.replace('{id}', id)
|
||||
.replace('{part}', part)
|
||||
.replace('{resolution}', resolution)
|
||||
.replace('{uid}', Ox.uid());
|
||||
return prefix + '/' + id + '/' + resolution + 'p' + part
|
||||
+ (track ? '.' + track : '')
|
||||
+ '.' + pandora.user.videoFormat;
|
||||
.replace('{id}', id)
|
||||
.replace('{part}', part)
|
||||
.replace('{resolution}', resolution)
|
||||
.replace('{uid}', Ox.uid()),
|
||||
local = pandora.fs && pandora.fs.getVideoURL(id, resolution, part, track);
|
||||
return local || prefix + '/'
|
||||
+ pandora.getVideoURLName(id, resolution, part, track);
|
||||
};
|
||||
|
||||
pandora.getVideoOptions = function(data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue