npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-bambuser

v0.1.11

Published

React Native Bridge for Bambuser Player

Downloads

2,240

Readme

React Native Bambuser Player SDK

BambuserPlayerSDK lets you add a Bambuser Live Video Shopping (LVS) Player to your app.

Installation

To get started with the Bambuser integration in your React Native project, first, install the react-native-bambuser package as a dependency.

Ensure your project is set up on the Hy-Vee npm registry.

yarn

yarn add react-native-bambuser

npm

npm install react-native-bambuser

iOS Setup

Altering CocoaPods to use Frameworks

You must tell CocoaPods to use frameworks to be compatible with this SDK.

Open the file /ios/Podfile and add this line inside your targets (right before the use_react_native line in current react-native releases that calls the react native Podfile function to get the native modules config)

use_frameworks! :linkage => :static

Android Setup

Add the Bambuser SDK repository

Open the file /android/build.gradle and add the Bambuser repository

allprojects {
  repositories {
    // ... other repositories
    maven { url "https://repo.repsy.io/mvn/bambuser/default" } // <-- Add this line
  }
}

Linking the Library

Once the above steps have been completed, the React Native Bambuser library must be linked to your project and your application needs to be rebuilt.

React Native 0.60 and above (Auto Linking)

iOS

cd ios && pod install && cd ..
npx react-native run-ios

Android

npx react-native run-android

React Native 0.59 and below (Manual Linking)

iOS

Add the Pod to your project's /ios/Podfile

pod 'react-native-bambuser', :path => '../node_modules/react-native-bambuser'

Install the Pod

cd ios && pod install && cd ..

Rebuild the app

npx react-native run-ios

Android

Add the dependency to your project's /android/app/build.gradle

dependencies {
  // ...
  implementation project(':react-native-bambuser')
}

Rebuild the app

npx react-native run-android

Usage

Here's how you can use the Bambuser SDK in your React Native project

Play a show

import { playShow } from 'react-native-bambuser';

export default function App() {

  const handlePress = () => {
    playShow('vAtJH3xevpYTLnf1oHao');
  };

  return (
    <Pressable onPress={handlePress}>
        <Text>Open player</Text>
      </Pressable>
  );
}

Listen to events

For a full list of events that can be listened to, check the iOS events and Android events documentation.

import { useEffect } from 'react';
import { playShow, onOpenProduct } from 'react-native-bambuser';

export default function App() {

  const handlePress = () => {
    playShow('vAtJH3xevpYTLnf1oHao');
  };

  useEffect(() => {
    onOpenProduct((event) => {
      console.log('onOpenProduct', event);
    });
  }, []);

  return (
    <Pressable onPress={handlePress}>
      <Text>Open player</Text>
    </Pressable>
  );
}