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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user