Implement chromecast support
Description
Adds a new modal which can be used to cast files with supported file formats to a chromecast. The modal can be opened from a context menu item on a selected torrent. Users can select the file to be casted and subtitles. After starting the cast, the cast can be paused/played and the progress can be viewed.
Chromecasting is only supported on some browsers and only from secure domains.
Supported subtitle formats:
- .vtt
- .srt
- subtitles embedded in .mkv video files
Screenshots

Types of changes
- [ ] Breaking change (changes that break backward compatibility of public API or CLI - semver MAJOR)
- [x] New feature (non-breaking change which adds functionality - semver MINOR)
- [ ] Bug fix (non-breaking change which fixes an issue - semver PATCH)
Codecov Report
Merging #186 (4e6c952) into master (227c48a) will increase coverage by
0.40%. The diff coverage is22.99%.
@@ Coverage Diff @@
## master #186 +/- ##
==========================================
+ Coverage 78.62% 79.02% +0.40%
==========================================
Files 57 56 -1
Lines 9211 9068 -143
Branches 910 925 +15
==========================================
- Hits 7242 7166 -76
+ Misses 1958 1890 -68
- Partials 11 12 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| server/routes/api/torrents.ts | 53.58% <18.30%> (-10.60%) |
:arrow_down: |
| server/routes/api/index.ts | 74.07% <37.77%> (+12.30%) |
:arrow_up: |
| server/util/fileUtil.ts | 50.54% <0.00%> (-31.27%) |
:arrow_down: |
| server/routes/api/feed-monitor.ts | 92.92% <0.00%> (-4.05%) |
:arrow_down: |
| ...er/services/rTorrent/util/torrentPropertiesUtil.ts | 79.56% <0.00%> (-2.16%) |
:arrow_down: |
| server/util/torrentPropertiesUtil.ts | 92.30% <0.00%> (-2.14%) |
:arrow_down: |
| ...erver/services/qBittorrent/clientRequestManager.ts | 64.42% <0.00%> (-1.52%) |
:arrow_down: |
| server/routes/api/client.ts | 95.12% <0.00%> (-1.13%) |
:arrow_down: |
| ...erver/services/qBittorrent/clientGatewayService.ts | 73.86% <0.00%> (-0.89%) |
:arrow_down: |
| ... and 22 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 227c48a...4d686bf. Read the comment docs.
CI has to pass. Additionally, use Node 15 and npm 7 to develop, so you can get a proper package-lock.json.
Please pull https://github.com/jesec/flood/tree/pr/186. I cleaned the changes up a bit.
Is there an ETA on this PR ?