Skip to main content

How to Use These Prompts

This section contains prompts designed for LLM-assisted SDK integration. Each prompt can be copied and pasted into an AI coding assistant (Claude, ChatGPT, Copilot, etc.) along with your existing code.

Choose Your Approach​

Use integrated-prompt.md when:

  • Starting SDK integration from scratch
  • You want the LLM to generate all files at once
  • Your project doesn't have any Flower SDK code yet

Fill in the parameters at the top, paste your existing component code, and the LLM generates the complete integration.

Use individual step prompts when:

  • Adding Flower SDK to an existing React Native app incrementally
  • You want to review each change before moving to the next
  • A specific step failed and you need to retry just that part
  • You're debugging an issue in a specific integration phase

Step Overview​

StepFileWhat It DoesWhen to Use Alone
Step 1step-1-project-setup.mdConfigure the registry, install the package, apply the Android/iOS native settings, initialize the SDKInstall or build failures, SDK init problems
Step 2step-2-ad-ui-and-player.mdMount the <Video> with a nativeID and wire the two-phase handoverPlayer not found, overlay not visible
Step 3step-3-ad-integration.mdSubscribe to ad events and request ads by content typeAd not showing, events not firing, wrong ad config
Step 4step-4-cleanup.mdRelease sessions and remove subscriptions on unmountMemory leaks, overlay outliving the player

Steps are incremental — each step assumes the previous step is complete. Step 3's input should be the output of Step 2.

Parameters to Fill In​

Before using any prompt, replace the {{...}} placeholders:

ParameterValuesDescription
AD_TYPElinear-tv | vod | interstitialType of ad content
PLAYER_TYPEreact-native-video | bitmovinWhich player library owns the view
SDK_VERSIONe.g. 1.0.2Version of @anypoint/flower-sdk-react-native to install

Choosing AD_TYPE​

AD_TYPEDescriptionFunctionWho starts the break
linear-tvLive channel / FAST, with the stream URL rewritten to a local proxychangeChannelUrl()The SDK, scheduled by the cue in the stream
vodVideo-on-demand with pre/mid/post-roll. The content URL is never rewritten.requestVodAd()Your app, via play()
interstitialStandalone inline break on the SDK's own ad playerrequestAd()Your app, via play()

Choosing PLAYER_TYPE​

react-native-video (Default)​

Needs no extra package beyond react-native-video itself, and no playerType argument — it is the default. Best for: almost every app.

bitmovin​

Drives a bitmovin-player-react-native player instead. Requires a Bitmovin licence, an extra Gradle repository, a Podfile flag, and Expo modules wired up on both platforms — Gradle autolinking on Android, the Podfile and app delegate on iOS. Best for: apps that already ship the Bitmovin player.

Tips​

  • Always provide your existing code along with the prompt. The LLM modifies your code rather than generating from scratch.
  • Don't hardcode URLs — use your config objects. The prompts guide this.
  • The nativeID is the whole addressing model. If the LLM tries to use a ref to identify the player, re-run with that section highlighted.
  • Test incrementally — if using step-by-step, verify each step builds before moving on.