2.0.0 • Published 22 days ago

@join-stories/react-native-widgets v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
22 days ago

@join-stories/react-native-widgets

Join Stories SDK implementation for React-Native

Add the package to your npm dependencies

npm install @join-stories/react-native-widgets

Documentation

A complete documentation is available at : https://docs.join-stories.com/docs/react-native-initial-sdk-setup

Example with a standalone player

...
import { Text, TouchableOpacity } from 'react-native';
import { JoinStories } from "join-stories-sdk-react-native";

const Component = () => {
    const startStandAlonePlayer = () => {
        JoinStories.startStandAlonePlayer({
        alias: "widget-test-sdk",
        requestTimeoutInterval: 15,
        playerBackgroundColor: "#00000030",
        playerStandaloneAnimationOrigin: "default",
        playerVerticalAnchor: "center",
        playerShowShareButton: false,
        playerHorizontalMargins: 10,
        playerCornerRadius: 30,
        playerProgressBarDefaultColor: "#FFFFFF",
        playerProgressBarFillColor: "#026EDA",
        playerProgressBarThickness: 4,
        playerProgressBarRadius: 8,
        });
    };

    return (<TouchableOpacity onPress={startStandAlonePlayer} style={styles.button}>
        <Text>StandaloneView</Text>
    </TouchableOpacity>)
}

Example with a thumb view

...
import { View } from 'react-native';
import { JoinStoriesView } from "join-stories-sdk-react-native";

const Thumb() => {
  return (
    <View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
      <JoinStoriesView
        alias="widget-test-sdk" // "demo-bulles",
        requestTimeoutInterval={15}
        fontName="HelveticaNeue-Bold"
        labelColor="#808080"
        thumbViewSpacing={32}
        withLabel
        loaderInnerViewWidth={2}
        loaderInnerViewColor={["#000000"]}
        loaderColors={["#FF0000", "#0000FF"]}
        loaderWidth={3}
        storyViewedIndicatorColor="#808080"
        storyViewedIndicatorAlpha={0.8}
        // thumbViewOverlayColor // UIColor(hex8: 0x4C4C4CBB)
        playerBackgroundColor="#00000030"
        playerVerticalAnchor="center"
        playerShowShareButton={false}
        playerHorizontalMargins={10}
        playerCornerRadius={30}
        playerProgressBarDefaultColor="#FFFFFF"
        playerProgressBarFillColor="#026EDA"
        playerProgressBarThickness={4}
        playerProgressBarRadius={8}
        containerDimension={150}
        style={styles.joinStoriesView}
      />
    </View>
  );
}

Running the example Expo project

At the moment, you will need to use npm@9.5.0

To install the project dependencies, you will need to:

brew install cocoapods
npm install
cd example
npm install

To run the project, you will need to:

npm run:ios

or

npm run:android
2.0.0

22 days ago

1.7.0

6 months ago

1.6.3

6 months ago

1.6.2

7 months ago

1.6.1

7 months ago

1.6.0

7 months ago

1.5.3

7 months ago

1.5.2

7 months ago

1.5.1

7 months ago

1.5.0

7 months ago

1.4.2

7 months ago

1.4.1

7 months ago

1.4.0

7 months ago

1.3.0

8 months ago

1.2.0

9 months ago

1.1.2

9 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.0

10 months ago