
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@adobe/react-native-acpmedia
Advanced tools
Adobe Experience Platform support for React Native apps.
@adobe/react-native-acpmedia
is a wrapper around the iOS, tvOS and Android AEP Media SDK to allow for integration with React Native applications. Functionality to enable Adobe Media Analytics is provided entirely through JavaScript documented below.
You need to install the SDK with npm and configure the native Android/iOS project in your react native project. Before installing the Media extension it is recommended to begin by installing the Core extension and the Analytics extension.
Note: If you are new to React Native we suggest you follow the React Native Getting Started page before continuing.
First create a React Native project:
react-native init MyReactApp
Note: Follow React Native tvos support to create app with tvos target.
Install and link the @adobe/react-native-acpmedia
package:
cd MyReactApp
npm install @adobe/react-native-acpmedia
CLI autolink feature links the module while building the app.
react-native link @adobe/react-native-acpmedia
Note For iOS
using cocoapods
, run:
cd ios/ && pod install
This project contains jest unit tests which are contained in the __tests__
directory, to run the tests locally:
make run-tests-locally
import {ACPMedia} from '@adobe/react-native-acpmedia';
ACPMedia.extensionVersion().then(version => console.log("AdobeExperienceSDK: ACPMedia version: " + version));
Note: It is recommended to initialize the SDK via native code inside your AppDelegate and MainApplication in iOS and Android respectively.
#import <RCTACPMedia/ACPMedia.h>
[ACPMedia registerExtension];
import com.adobe.marketing.mobile.Media;
Media.registerExtension();
ACPMedia.createTracker().then(tracker =>
this.setState({currentTracker: tracker})
);
var config = new Object();
config[ACPMediaConstants.ACPMediaKeyConfigChannel] = "customer-channel";
config[ACPMediaConstants.ACPMediaKeyConfigDownloadedContent] = true;
ACPMedia.createTrackerWithConfig(config).then(tracker =>
this.setState({currentTracker: tracker})
);
let mediaObject = ACPMedia.createMediaObject("media-name", "media-id", 60, ACPMediaConstants.ACPMediaStreamTypeVod, ACPMediaType.Video);
let adBreakObject = ACPMedia.createAdBreakObject("adbreak-name", 1, 0);
let adObject = ACPMedia.createAdObject("media-name", "ad-id", 1, 30);
let chapterObject = ACPMedia.createChapterObject('chapter-name', 2, 30, 1);
let qoeObject = ACPMedia.createQoEObject(1000000, 2, 25, 10);
let stateObject = ACPMedia.createStateObject(ACPMediaConstants.ACPMediaPlayerStateFullScreen);
let mediaObject = ACPMedia.createMediaObject("media-name", "media-id", 60, ACPMediaConstants.ACPMediaStreamTypeVod, ACPMediaType.Video);
var mediaMetadata = new Object();
mediaMetadata[ACPMediaConstants.ACPVideoMetadataKeyShow] = "Sample Show";
mediaMetadata[ACPMediaConstants.ACPVideoMetadataKeySeason] = "Sample Season";
// Custom metadata keys
mediaMetadata["isUserLoggedIn"] = "false";
mediaMetadata["tvStation"] = "Sample TV station";
tracker.trackSessionStart(mediaObject, mediaMetadata);
tracker.trackPlay();
tracker.trackPause();
tracker.trackComplete();
tracker.trackSessionEnd();
tracker.trackError("errorId");
Tracking AdBreaks
let adBreakObject = ACPMedia.createAdBreakObject("adbreakName", 1, 0);
tracker.trackEvent(ACPMediaEvent.EventAdBreakStart, adBreakObject, null);
tracker.trackEvent(ACPMediaEvent.EventAdBreakComplete, null, null);
Tracking ads
let adObject = ACPMedia.createAdObject("adName", "adId", 1.0, 20.0);
var adMetadata = new Object();
adMetadata[ACPMediaConstants.ACPAdMetadataKeyAdvertiser] = "SampleAdvertiser";
tracker.trackEvent(ACPMediaEvent.EventAdStart, adObject, adMetadata);
tracker.trackEvent(ACPMediaEvent.EventAdSkip, null, null);
tracker.trackEvent(ACPMediaEvent.EventAdComplete, null, null);
Tracking chapters
let chapterObject = ACPMedia.createChapterObject("chapterName", 1.0, 30.0, 1.0);
var chapterMetadata = new Object();
chapterMetadata["segmentType"] = "Sample segment type";
tracker.trackEvent(ACPMediaEvent.EventChapterStart, chapterObject, chapterMetadata);
tracker.trackEvent(ACPMediaEvent.EventChapterSkip, null, null);
tracker.trackEvent(ACPMediaEvent.EventChapterComplete, null, null);
Tracking Player States
let stateObject = ACPMedia.createStateObject(ACPMediaConstants.ACPMediaPlayerStateFullScreen);
tracker.trackEvent(ACPMediaEvent.EventStateStart, stateObject, null);
let stateObject = ACPMedia.createStateObject(ACPMediaConstants.ACPMediaPlayerStateFullScreen);
tracker.trackEvent(ACPMediaEvent.EventStateEnd, stateObject, null);
Tracking Playback events
tracker.trackEvent(ACPMediaEvent.EventBufferStart, null, null);
tracker.trackEvent(ACPMediaEvent.EventBufferComplete, null, null);
tracker.trackEvent(ACPMediaEvent.EventSeekStart, null, null);
tracker.trackEvent(ACPMediaEvent.EventSeekComplete, null, null);
Tracking bitrate changes
// If the new bitrate value is available provide it to the tracker.
let qoeObject = ACPMedia.createQoEObject(2000000, 4, 23, 11);
tracker.updateQoEObject(qoeObject);
tracker.trackEvent(ACPMediaEvent.EventBitrateChange, null, null);
tracker.updateCurrentPlayhead(1);
let qoeObject = ACPMedia.createQoEObject(1000000, 2, 25, 10);
tracker.updateQoEObject(qoeObject);
This defines the type of a media that is currently tracked.
import {ACPMediaType} from '@adobe/react-native-acpmedia';
ACPMediaType.Video
ACPMediaType.Audio
This defines the stream type of the content that is currently tracked.
import {ACPMediaConstants} from '@adobe/react-native-acpmedia';
ACPMediaConstants.ACPMediaStreamTypeVod
ACPMediaConstants.ACPMediaStreamTypeLive
ACPMediaConstants.ACPMediaConstantsACPMediaStreamTypeLinear
ACPMediaConstants.ACPMediaStreamTypePodcast
ACPMediaConstants.ACPMediaStreamTypeAudiobook
ACPMediaConstants.ACPMediaStreamTypeAod
This defines the standard metadata keys for video streams.
import {ACPMediaConstants} from '@adobe/react-native-acpmedia';
ACPMediaConstants.ACPVideoMetadataKeyShow
ACPMediaConstants.ACPVideoMetadataKeySeason
ACPMediaConstants.ACPVideoMetadataKeyEpisode
ACPMediaConstants.ACPVideoMetadataKeyAssetId
ACPMediaConstants.ACPVideoMetadataKeyGenre
ACPMediaConstants.ACPVideoMetadataKeyFirstAirDate
ACPMediaConstants.ACPVideoMetadataKeyFirstDigitalDate
ACPMediaConstants.ACPVideoMetadataKeyRating
ACPMediaConstants.ACPVideoMetadataKeyOriginator
ACPMediaConstants.ACPVideoMetadataKeyNetwork
ACPMediaConstants.ACPVideoMetadataKeyShowType
ACPMediaConstants.ACPVideoMetadataKeyAdLoad
ACPMediaConstants.ACPVideoMetadataKeyMvpd
ACPMediaConstants.ACPVideoMetadataKeyAuthorized
ACPMediaConstants.ACPVideoMetadataKeyDayPart
ACPMediaConstants.ACPVideoMetadataKeyFeed
ACPMediaConstants.ACPVideoMetadataKeyStreamFormat
This defines the standard metadata keys for audio streams.
import {ACPMediaConstants} from '@adobe/react-native-acpmedia';
ACPMediaConstants.ACPAudioMetadataKeyArtist
ACPMediaConstants.ACPAudioMetadataKeyAlbum
ACPMediaConstants.ACPAudioMetadataKeyLabel
ACPMediaConstants.ACPAudioMetadataKeyAuthor
ACPMediaConstants.ACPAudioMetadataKeyStation
ACPMediaConstants.ACPAudioMetadataKeyPublisher
This defines the standard metadata keys for ads.
import {ACPMediaConstants} from '@adobe/react-native-acpmedia';
ACPMediaConstants.ACPAdMetadataKeyAdvertiser
ACPMediaConstants.ACPAdMetadataKeyCampaignId
ACPMediaConstants.ACPAdMetadataKeyCreativeId
ACPMediaConstants.ACPAdMetadataKeyPlacementId
ACPMediaConstants.ACPAdMetadataKeySiteId
ACPMediaConstants.ACPAdMetadataKeyCreativeUrl
import {ACPMediaConstants} from '@adobe/react-native-acpmedia';
ACPMediaConstants.ACPMediaPlayerStateFullScreen
ACPMediaConstants.ACPMediaPlayerStatePictureInPicture
ACPMediaConstants.ACPMediaPlayerStateClosedCaption
ACPMediaConstants.ACPMediaPlayerStateInFocus
ACPMediaConstants.ACPMediaPlayerStateMute
This defines the type of a tracking event.
import {ACPMediaEvent} from '@adobe/react-native-acpmedia';
ACPMediaEvent.EventAdBreakStart
ACPMediaEvent.EventAdBreakComplete
ACPMediaEvent.EventAdStart
ACPMediaEvent.EventAdComplete
ACPMediaEvent.EventAdSkip
ACPMediaEvent.EventChapterStart
ACPMediaEvent.EventChapterComplete
ACPMediaEvent.EventChapterSkip
ACPMediaEvent.EventSeekStart
ACPMediaEvent.EventSeekComplete
ACPMediaEvent.EventBufferStart
ACPMediaEvent.EventBufferComplete
ACPMediaEvent.EventBitrateChange
Constant to denote that the current tracking session is resuming a previously closed session. This information must be provided when starting a tracking session.
import {ACPMediaConstants} from '@adobe/react-native-acpmedia';
ACPMediaConstants.ACPMediaKeyMediaResumed
See CONTRIBUTING
See LICENSE
FAQs
Adobe Experience Platform support for React Native apps.
We found that @adobe/react-native-acpmedia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 21 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.