Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/codebayu/mux-data-expo-av

Mux analytics plugin for expo-av
https://github.com/codebayu/mux-data-expo-av

Last synced: 3 months ago
JSON representation

Mux analytics plugin for expo-av

Awesome Lists containing this project

README

        

# Mux Data Integration with expo-av

This is a package for using [Mux Data](https://mux.com/data/) for video QoS monitoring with a expo-av player.

If you are using React Native CLI, check out [this package](https://github.com/muxinc/mux-stats-sdk-react-native-video)

View the DemoApp/ directory to see a demo application that implements this library.

## Installation

```bash
# npm
npm install @codebayu/mux-data-expo-av

# yarn
yarn add @codebayu/mux-data-expo-av
```

## Usage

```tsx
import app from './package.json'; // this is your application's package.json
import { ResizeMode, Video } from 'expo-av'; // import Video from expo-av like you normally would
import { Platform } from 'react-native';
import muxExpoAv from '@codebayu/mux-data-expo-av';

// wrap the `Video` component with Mux functionality
const MuxVideo = muxExpoAv(Video);

// Pass the same props to `MuxVideo` that you would pass to the
// `Video` element. All of these props will be passed through to your underlying expo-av component
// Include a new prop for `muxOptions`
;
```

## License

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the [LICENSE](LICENSE) file for details.