Implementing a basic Player screen

The following is the simplest working component one can create using the Bitmovin Player React Native library:

import React, {useEffect, useCallback} from 'react';
import {View, Platform, StyleSheet} from 'react-native';
import {
} from 'bitmovin-player-react-native';

export default function PlayerSample() {
  const player = usePlayer({
    // The only required parameter is the license key but it can be omitted from code upon correct
    // Info.plist/AndroidManifest.xml configuration.
    // Head to `Configuring your License` for more information.
    licenseKey: '<ENTER-YOUR-LICENSE-KEY>',

  useEffect(() => {
    // iOS audio session category must be set to `playback` first, otherwise playback
    // will have no audio when the device is silenced.
    // Usually it's desireable to set the audio's category only once during your app's main component
    // initialization. This way you can guarantee that your app's audio category is properly
    // configured throughout the whole lifecycle of the application.
    AudioSession.setCategory('playback').catch(error => {
      // Handle any native errors that might occur while setting the audio's category.
      console.log("Failed to set app's audio category to `playback`:\n", error);

        Platform.OS === 'ios'
          ? ''
          : '',
      type: Platform.OS === 'ios' ? SourceType.HLS : SourceType.DASH,
      title: 'Art of Motion',
  }, [player]);

  // onReady is called when the player has downloaded initial
  // video and audio and is ready to start playback.
  const onReady = useCallback(
    event => {
      // Start playback;

  return (
    <View style={styles.flex1}>
      <PlayerView style={styles.flex1} player={player} onReady={onReady} />

const styles = StyleSheet.create({
  flex1: {
    flex: 1,

You can find a complete working example in our GitHub repository's example/ folder.

If receive an error highlighting an incorrect PackageName, please visit the bitmovin dashboard/player licence section, and ensure your app's package name is permitted. For example if your app was called "myVideoApp", the required package (default name) would be com.myVideoApp .