Preview Plugin - Support video preview of files stored in a Nexus Storage
- Dominant language
- Scala
- Stars
- 301
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
## Description
For a KG entity to which is attached a video File. we should be able to preview the video in place without having to download the file locally. For now we would play that file as it is if the media type can be supported without any form of conversion.
Initially, we will enable the `Preview` plugin to handle a distribution with an `@type` `DataDownload` and an `encodingFormat` `video/mp4` to be previewed with a video player. To start with we can investigate if the React player used in the video plugin can be reused.
The plugin should be reading video data by asking Delta to provide the byte[] of the file stored.
Potential issue, with this strategy, if the video file is large, it might take a while for the client to first download it and before anything happens on screen. A message might help the user know that the video is being downloaded.
Errors should be shown int he following case:
- if the user doesn't have necessary ACLs to read that file (HTTP 403)
- if the file does not exist (HTTP 404)
## Example of distribution payload
```
{
"@type": "DataDownload",
"contentUrl": "https://bbp.epfl.ch/nexus/v1/files/bbp/aibs/a642de11-a168-4e11-bf06-a89475780682",
"digest": {
"algorithm": "SHA-256",
"value": "353bae9fce681cefa67b1dacdd2b51d31e2f43443e86c6f73f5239409b5d6266"
},
"encodingFormat": "video/mp4",
"name": "Simulation.mp4"
}
```
Contributor guide
Assessment
This issue has not been assessed yet.