mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 15:03:26 +00:00
spelling/grammar
This commit is contained in:
@@ -12,11 +12,11 @@ All streams have the same common parameters:
|
||||
- `Stream.headers`: Either undefined or a key value object of headers you must set to use the stream.
|
||||
- `Stream.preferredHeaders`: Either undefined or a key value object of headers you may want to set if you want optimal playback - but not required.
|
||||
|
||||
Now let's delve deeper into how to actually watch these streams!
|
||||
Now let's delve deeper into how to watch these streams!
|
||||
|
||||
## Streams with type `hls`
|
||||
|
||||
HLS streams can be tough to watch, it's not a normal file you can just use.
|
||||
HLS streams can be tough to watch. They're not normal files you can just use.
|
||||
These streams have an extra property `Stream.playlist` which contains the m3u8 playlist.
|
||||
|
||||
Here is a code sample of how to use HLS streams in web context using hls.js
|
||||
@@ -39,17 +39,17 @@ Here is a code sample of how to use HLS streams in web context using hls.js
|
||||
|
||||
## Streams with type `file`
|
||||
|
||||
File streams are quite easy to use, it just returns a new property: `Stream.qualities`.
|
||||
This property is a map of quality and a stream file. So if you want to get 1080p quality you do `stream["1080"]` to get your stream file. It will return undefined if there is no quality like that.
|
||||
File streams are quite easy to use, they just return a new property: `Stream.qualities`.
|
||||
This property is a map of quality and a stream file. So if you want to get 1080p quality you do `stream["1080"]` to get your stream file. It will return undefined if that quality is absent.
|
||||
|
||||
The possibly qualities are: `unknown`, `360`, `480`, `720`, `1080`, `4k`.
|
||||
File based streams are garuanteed to always have one quality.
|
||||
File based streams are always guaranteed to have one quality.
|
||||
|
||||
Once you get a streamfile, you have the following parameters:
|
||||
- `StreamFile.type`: Right now it can only be `mp4`.
|
||||
- `StreamFile.url`: The URL linking to the video file.
|
||||
|
||||
Here is a code sample of how to watch a file based stream the video in a browser:
|
||||
Here is a code sample of how to watch a file based stream in a browser:
|
||||
|
||||
```html
|
||||
<video id="video"></video>
|
||||
@@ -66,9 +66,9 @@ Here is a code sample of how to watch a file based stream the video in a browser
|
||||
## Streams with headers
|
||||
|
||||
Streams have both a `Stream.headers` and a `Stream.preferredHeaders`.
|
||||
The difference between the two is that `Stream.headers` **must** be set in other for the stream to work. While the other one is optional, and can only enhance the quality or performance.
|
||||
The difference between the two is that `Stream.headers` **must** be set in order for the stream to work. While the other is optional, and enhances the quality or performance.
|
||||
|
||||
If your target is set to `BROWSER`. There will never be required headers, as it's not possible to do.
|
||||
If your target is set to `BROWSER`, headers will never be required, as it's not possible to do.
|
||||
|
||||
## Using captions/subtitles
|
||||
|
||||
@@ -77,7 +77,7 @@ All streams have a list of captions at `Stream.captions`. The structure looks li
|
||||
type Caption = {
|
||||
type: CaptionType; // Language type, either "srt" or "vtt"
|
||||
id: string; // Unique per stream
|
||||
url: string; // The url pointing to the subtitle file
|
||||
url: string; // The URL pointing to the subtitle file
|
||||
hasCorsRestrictions: boolean; // If true, you will need to proxy it if you're running in a browser
|
||||
language: string; // Language code of the caption
|
||||
};
|
||||
|
Reference in New Issue
Block a user