Gathering detailed insights and metrics for react-native-zapp-bridge
Gathering detailed insights and metrics for react-native-zapp-bridge
Gathering detailed insights and metrics for react-native-zapp-bridge
Gathering detailed insights and metrics for react-native-zapp-bridge
A React Native package that include bridging from React Native to Applicaster Zapp Platform native framework.
npm install react-native-zapp-bridge
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
160 Commits
1 Forks
28 Watchers
9 Branches
20 Contributors
Updated on Jun 13, 2023
Latest Version
2.7.4
Package Id
react-native-zapp-bridge@2.7.4
Unpacked Size
20.30 kB
Size
7.55 kB
File Count
17
NPM Version
5.5.1
Node Version
8.9.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
2
21
A React Native package that includes bridging from React Native to Applicaster Zapp Platform native framework.
Commit messages are strictly enforced in this pattern:
type(scope?): subject
body?
footer?
Types can be one of the following: [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test][type-enum]
Deployment is automated by Semantic Release. When PRs are merged to master
Semantic Release will analyse the commit log, increment version, tag a release and publish directly to public NPM.
React-Native-Zapp-Bridge is a util package that enable you to:
Analytics - use sendAnalyticEvent
to send an analytics event throw Zapp Morpheus (Zapp Analytics Manager).
Video Player - use APVideoPlayer
to add a video player to your React-Native screen, this will add the chosen pluggable player on the Zapp Platform.
Zapp login - methods for logging in users and checking their login status
Data source plugin - This class helps you to interact with the DS plugin. Use DataSourceService
to make http request from DS plugin (DS plugin returns Atom model as result).
Zapp player - methods for playing videos fullscreen
reminders - An API for adding, removing & checking status of program reminders.
navigation - An API for navigating within Zapp apps.
withZapp - A React Native HoC for parsing plugin properties making them consistent across platforms.
Zapp Plugin - An API for getting information about plugin
$ npm install --save applicaster/react-native-zapp-bridge
1import { sendAnalyticEvent } from 'react-native-zapp-bridge';
1sendAnalyticEvent(`Your Screen Name`, { 2 param: value, 3 }) 4 .then(console.log) 5 .catch(console.warn); 6}
1import { APVideoPlayer } from 'react-native-zapp-bridge';
1 const streamUrl = `your_stream_url` 2 const style = { 3 backgroundColor: '#ffffff' 4 } 5 const maxWidth = 200; 6 const src = { 7 type: Platform.OS === 'android' ? 'vod' : 'url', 8 object: { 9 id: `your_item_id`, 10 name: `your_item_title`, 11 thumbnail_url: `your_item_image_url` 12 stream_url: streamUrl, 13 }, 14 player_configuration: { 15 inline_player_should_auto_mute: true, 16 }, 17 }; 18 19 // Example 20 const onChange = event => { 21 event.persist(); 22 23 if (event.nativeEvent.eventName === 'onVideoEnd') { 24 this.playNextVideo() 25 } 26 }; 27 28 /* 29 List of events you can receive from onChange 30 31 onVideoEnd 32 playerRemoved 33 34 */ 35 36 37 return <APVideoPlayer {...{ src, maxwidth, style }} onChange={onChange}/>;
The onchange callback occurs when a native event of the video has been changed, it returns an object with the event information.
Support events
Native Event | Description |
---|---|
onVideoEnd | The ended event occurs when the video has reached the end. |
playerRemoved | The playerRemoved occurs when the player is unmounted. |
1import { ZappPipesService } from 'react-native-zapp-bridge';
1ZappPipesService.getDataSourceData(`Url To Load From DS Plugin`) 2 .then(content) 3 .catch(error); 4}
1import { NativeModules } from 'react-native';
1NativeModules.ZappLogin.isUserLoggedIn();
Returns:
Promise - resolves:
{ isUserLoggedIn: bool }
1NativeModules.ZappLogin.login(additionalParams);
parameters:
additionalParams: Object
- can be empty. This parameter is being delieved as the additionalParams to the native login method. So any values in this object will be available to the receiver login plugin.
Returns:
Promise - resolves:
{ isUserLoggedIn: bool }
1NativeModules.ZappLogin.getUserToken();
Returns:
Promise - resolves:
{ token: string }
Unlike the login check - this can be used to check if user is authorized to play some content or check entitlements beyond just the login itself.
1NativeModules.ZappLogin.isUserAuthorized(additionalParams);
parameters:
additionalParams: Object
- can be empty. This parameter is being delieved as the additionalParams to the native authorization check method. So any values in this object will be available to the receiver login plugin.
Returns:
Promise - resolves:
{ authorized: bool }
1import { NativeModules } from 'react-native';
1NativeModules.ZappPlayer.playFullScreen(type, playable, configuration);
parameters:
type: String
playable: Object
configuration: Object
- can be empty
Supported values for configuration
keys:
configuration['custom_configuration']
- This value is being delivered to the player plug as the player configuration dictionary.Returns:
Promise - resolves:
true
1import { reminders } from 'react-native-zapp-bridge';
reminders.addReminder({
id: PROGRAM_ID_STR,
channel_id: CHANNEL_ID_STR,
starts_at: '2016-12-20T14:00:00+00:00',
ends_at: '2016-12-20T15:00:00+00:00',
name: PROGRAM_NAME_STR
}).then(PROGRAM_ID_STR => {
// success
});
reminders.removeReminder(PROGRAM_ID_STR).then(PROGRAM_ID_STR => {
// success
});
reminders.hasReminder(PROGRAM_ID_STR).then(RESULT_BOOL => {
// success
});
reminders.checkReminders(PROGRAM_ID_STR_ARR).then(RESULT_OBJ => {
// success
// result object should look like:
// { PROGRAM_ID: REMINDER_SET_BOOL, ... }
});
1import { navigation } from 'react-native-zapp-bridge';
closeModalScreen
extraParams available in iOS only
* bool in this scope represents 0
or 1
;
** `push` present push close animation, any other string uses modal animation.
1navigation.closeModalScreen(extraParams);
openInternalURL
props.extra_props
...navigation.openInternalURL(urlscheme, params);
1import { withZapp } from 'react-native-zapp-bridge';
1// in the entry point to the plugin import the root of your app 2import App from './src/App'; 3 4// Augment your app with Zapp for consistent props to be passed cross platform 5const AppWithZapp = withZapp(App); 6 7const RNRoot = props => <AppWithZapp {...props} />; 8 9// Module name 10AppRegistry.registerComponent('RNRoot', () => RNRoot);
1import { NativeModules } from 'react-native'; 2const { ZappPlugin } = NativeModules;
ZappPlugin.getConfiguration(PLUGIN_IDENTIFIER).then(PLUGIN_CONFIGURATION => {
// success
});
No vulnerabilities found.
Reason
all changesets reviewed
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
116 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More