Skip to content

Commit

Permalink
fix expo plugin export
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofMoch committed Jun 26, 2024
1 parent 419505c commit 194125a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 39 deletions.
1 change: 1 addition & 0 deletions app.plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./lib/expo-plugins/withRNVideo');
42 changes: 22 additions & 20 deletions docs/pages/other/expo.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
# Expo

## Expo plugin
From version `6.3.1`, we have added support for expo plugin. You can configure `react-native-video` properties in `app.config.js` file.
From version `6.3.1`, we have added support for expo plugin. You can configure `react-native-video` properties in `app.json` (or `app.config.json` or `app.config.js`) file.
It's useful when you are using `expo` managed workflow (expo prebuild) as it will automatically configure `react-native-video` properties in native part of the expo project.

```javascript
// Use this import path - import from other place then lib folder will not work
import withVideo from 'react-native-video/lib/expo-plugins/withRNVideo';

const config = {
// your app config
// app.json
{
{
"name": "my app",
"plugins": [
[
"react-native-video",
{
// ...
"enableNotificationControls": true,
"androidExtensions": {
"useExoplayerRtsp": false,
"useExoplayerSmoothStreaming": false,
"useExoplayerHls": false,
"useExoplayerDash": false,
}
// ...
}
]
]
}
}

module.exports = withRNVideo(config, {
// You can setup your react-native-video properties here
enableNotificationControls: true,
enableBackgroundAudio: true,
enableCacheExtension: true,
enableADSExtension: true,
androidExtensions: {
useExoplayerRtsp: true,
useExoplayerSmoothStreaming: true,
useExoplayerDash: true,
useExoplayerHls: true,
},
});
```

## Expo Plugin Properties
Expand Down
19 changes: 0 additions & 19 deletions examples/basic/app.config.js

This file was deleted.

0 comments on commit 194125a

Please sign in to comment.