Add new requirements to readme

This commit is contained in:
mrjvs
2024-01-09 00:59:15 +01:00
parent 24364a1bcb
commit 5574ee3713

View File

@@ -2,41 +2,28 @@
movie-web extension, allows providers to work without proxy movie-web extension, allows providers to work without proxy
## How this will likely work on the app ## Components
**On mp4 streaming:** 1. Messaging
1. movie-web application will send the following to the extension: - `makeRequest` message. Make requests that ignore CORS and can set forbidden headers. Replies with request results.
- full specific URL for streaming URL - `prepareStream` message. For a list of domains, set required or preferred headers.
- preferred headers for the streaming URL - `clearStream` message. Clear any streaming header rules that were set.
2. extension will set rules for the specific URL: - `hello` message. Gives details on the extension, like the version. If not allowed, simply respond with an error describing it.
- CORS headers, allow cross origin
- Set preferred headers sent by app
**On HLS streaming:** 2. Popout
1. movie-web application will send the following to the extension: - The popout should have a simple interface for trusting or untrusting the current site. Only trusted sites should be able to communicate with the extension.
- hostname for the streaming CDN
- preferred headers for the streaming CDN
2. extension will set rules for the CDN hostname:
- CORS headers, allow cross origin
- Set preferred headers sent by app
**On scraping request:** 3. Storage
1. movie-web application will send the following to the extension: - The extension will need to store active rules for setting headers. And which sites (origins) are trusted.
- url it will attempt to scrape
- list of headers it's planning on reading
- list of headers it should add
2. extension will set rules for the list of URLS:
- CORS headers, allow cross origin
- set readable headers in CORS
- set the headers for sending the request
3. extension will reply with the rule ID
4. movie-web will execute the request
5. movie-web will tell the extension to remove the rule with the rule ID
## How will this work for other domains? ## How will the client work
- The popup will allow adding/removing the current tab domain to allowed domains list 1. When creating providers, first send a hello message to identify if there is an extension installed at all and if its correct version.
- The extension will not listen to any calls from disallowed domains 2. If no extension (or not suitable) fallback on standard providers.
- movie-web.app is default in the list of allowed domains 3. Else, make new provider controls, target set to BROWSER_EXTENSION, with custom fetcher that uses the extension to send requests instead.
4. If any message to the extension fail. Fallback to standard providers again.
5. When a stream will be played, first communicate to extension through a `clearStream` followed by `prepareStream`
# Plasmo
## Getting Started ## Getting Started