Stream video with GridStoreAdapter (implements byte-range requests) (#2437)
* Stream video with GridStoreAdapter * fixing nits. Removing test(Range not accepted as header) * nit * Changed names. Added function to check if stream-requirements is fulfilled.
This commit is contained in:
committed by
Florent Vilmart
parent
122c3fd1a3
commit
e690b73bb5
@@ -66,6 +66,15 @@ export class GridStoreAdapter extends FilesAdapter {
|
||||
getFileLocation(config, filename) {
|
||||
return (config.mount + '/files/' + config.applicationId + '/' + encodeURIComponent(filename));
|
||||
}
|
||||
|
||||
getFileStream(filename: string) {
|
||||
return this._connect().then(database => {
|
||||
return GridStore.exist(database, filename).then(() => {
|
||||
let gridStore = new GridStore(database, filename, 'r');
|
||||
return gridStore.open();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default GridStoreAdapter;
|
||||
|
||||
Reference in New Issue
Block a user