Skip to main content

Troubleshooting

Installation Issues

"Module not found"

  1. Verify the package is installed: npm ls @bluebillywig/react-native-bb-player
  2. iOS: cd ios && pod install
  3. Rebuild the app completely (not just a JS reload)

iOS Build Fails

cd ios && pod deintegrate && pod install

Then clean build folder in Xcode (Cmd+Shift+K).

Android Build Fails

cd android && ./gradlew clean

Ensure JDK 17+ is installed.

"Cannot use BB Player with Expo Go"

This SDK requires native code. Use a development build:

npx expo run:ios
# or
npx expo run:android

Player Issues

Black Screen

  • Verify the JSON URL is correct and accessible (try opening it in a browser)
  • Check internet connectivity
  • Add error handling:
<BBPlayerView
jsonUrl="https://demo.bbvms.com/p/default/c/4701337.json"
onDidFailWithError={(error) => console.error('Player error:', error)}
onDidSetupWithJsonUrl={(url) => console.log('Setup complete:', url)}
/>

Player Not Responding to Methods

Ensure the player is ready before calling methods:

const [isReady, setIsReady] = useState(false);

<BBPlayerView
ref={playerRef}
onDidTriggerCanPlay={() => setIsReady(true)}
/>

// Only call methods when ready
if (isReady) {
playerRef.current?.play();
}

Audio Continues After Leaving Screen

Always destroy the player on unmount:

useEffect(() => {
return () => { playerRef.current?.destroy(); };
}, []);

Safe Area Handling

React Native's built-in SafeAreaView is inconsistent across platforms. Use react-native-safe-area-context:

npm install react-native-safe-area-context
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';

// Wrap your app
<SafeAreaProvider>
<App />
</SafeAreaProvider>

// In screens
<SafeAreaView style={{ flex: 1 }}>
<BBPlayerView jsonUrl="..." style={{ flex: 1 }} />
</SafeAreaView>

For more control:

import { useSafeAreaInsets } from 'react-native-safe-area-context';

function PlayerScreen() {
const insets = useSafeAreaInsets();
return (
<View style={{ flex: 1, paddingTop: insets.top, paddingBottom: insets.bottom }}>
<BBPlayerView jsonUrl="..." style={{ flex: 1 }} />
</View>
);
}

Overriding Native SDK Versions

Current Versions

  • iOS: ~>8.40 (Blue Billywig Native Player Kit)
  • Android: 8.42.+ (Blue Billywig Native Player SDK)

Override iOS (Podfile)

pod 'BlueBillywigNativePlayerKit-iOS', '8.42.0'

Override Android (app/build.gradle)

configurations.all {
resolutionStrategy {
force 'com.bluebillywig.bbnativeplayersdk:bbnativeplayersdk:8.42.0'
}
}