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.

Prompts by Case​

Each case prompt is self-contained: it covers one content type with one player, states how the SDK behaves in that case, and ends with what to verify on Android and iOS. Pick the row that matches your app.

Your casePrompt
Live channel or FAST stream, react-native-video (incl. channel pre-roll, several channels on one screen)Linear TV / FAST with react-native-video
Live channel or FAST stream, Bitmovin playerLinear TV / FAST with the Bitmovin Player
VOD with pre/mid/post-roll, react-native-videoVOD with react-native-video
VOD with pre/mid/post-roll, Bitmovin playerVOD with the Bitmovin Player
VOD app that supports PIP, ads not shown in PIP mode (default, setIgnoreAdBreakInPIPMode(true))VOD — PIP Without Ads (Default)
VOD ads must keep playing in PIP mode (setIgnoreAdBreakInPIPMode(false))VOD Ads That Keep Playing in PIP Mode
Existing VOD integration that pauses/resumes the content around breaks (1.0.x)Migrate a VOD Integration to SDK-Managed Content
Standalone break at a point your app chooses, incl. full-screen interstitialsInline / Interstitial Ads
Any of the above, in an app that supports PIP (default mode)PIP Mode Support

The PIP prompt is applied on top of a working integration from one of the other rows.

Full Integration Prompts​

The integrated and step-by-step prompts below cover all content types in one prompt that branches on AD_TYPE and PLAYER_TYPE. Use them when your app combines several content types, or when you prefer to work through the integration step by step.

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.4Version 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.