feat: move require (local files) to source.uri (#3535)

* feat!: move require source to `uri`

* pass other source properties

* chore: update basic example

* chore: restore backward compatibility

* docs: update source via require

* fix types

* make docs build workflow pretty

* improve docs
This commit is contained in:
Krzysztof Moch
2024-03-13 08:23:11 +01:00
committed by GitHub
parent eaa72c6665
commit 41ac781412
6 changed files with 34 additions and 11 deletions

View File

@@ -622,12 +622,21 @@ The docs for this prop are incomplete and will be updated as each option is inve
Example:
Pass directly the asset to play (deprecated)
```javascript
const sintel = require('./sintel.mp4');
source = {sintel};
source={ sintel };
```
Or by using an uri (starting from 6.0.0-beta.6)
```javascript
const sintel = require('./sintel.mp4');
source={{ uri: sintel }}
```
#### URI string
A number of URI schemes are supported by passing an object with a `uri` attribute.