
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@codebayu/mux-data-expo-av
Advanced tools
This is a package for using Mux Data for video QoS monitoring with a expo-av player.
If you are using React Native CLI, check out this package
View the DemoApp/ directory to see a demo application that implements this library.
# npm
npm install @codebayu/mux-data-expo-av
# yarn
yarn add @codebayu/mux-data-expo-av
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`
<MuxVideo
source={{
uri: 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8',
}}
style={{ width: '100%', aspectRatio: 16 / 9 }}
resizeMode={ResizeMode.COVER}
isLooping
useNativeControls
muxOptions={{
application_name: app.name, // (required) the name of your application
application_version: app.version, // the version of your application (optional, but encouraged)
data: {
env_key: 'YOUR_ENVIRONMENT_KEY', // (required)
player_software_version: '5.0.2', // (optional, but encouraged) the version of expo-av that you are using
// Site Metadata
viewer_user_id: '12345', // ex: '12345'
experiment_name: 'player_test_A', // ex: 'player_test_A'
sub_property_id: 'cus-1', // ex: 'cus-1'
// Player Metadata
player_name: '', // ex: 'My Main Player'
player_version: '', // ex: '1.0.0'
player_init_time: 0, // ex: 1451606400000
// Video Metadata
video_id: '', // ex: 'abcd123'
video_title: '', // ex: 'My Great Video'
video_series: '', // ex: 'Weekly Great Videos'
video_duration: '', // in milliseconds, ex: 120000
video_stream_type: 'on-demand', // 'live' or 'on-demand'
video_cdn: '', // ex: 'Fastly', 'Akamai'
// Custom Metadata
custom_1: 'custom value 1',
},
}}
/>;
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Mux analytics plugin for expo-av
The npm package @codebayu/mux-data-expo-av receives a total of 9 weekly downloads. As such, @codebayu/mux-data-expo-av popularity was classified as not popular.
We found that @codebayu/mux-data-expo-av demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.