VideoFeed component provides videoFeedConfiguration prop for configuring Video Feed. The current configurable are backgroundColor, cornerRadius, and enableAutoplay etc. Please refer to VideoFeedConfiguration for more details.
VideoFeed component provides videoPlayerConfiguration prop for configuring Video Player. The current configurable properties are playerStyle, videoCompleteAction, and ctaButtonStyle etc. Please refer to VideoPlayerConfiguration for more details.
VideoFeed component provides onVideoFeedLoadFinished prop for setting video feed loading result callback.
<VideoFeedstyle={{ height:200 }}source="discover"onVideoFeedLoadFinished={(error) => {/** * if error is undefined, it means that video feed loaded successfully. * Otherwise, it means that video feed failed to load. */console.log('onVideoFeedLoadFinished error', error); }}/>
To enable PiP outside the iOS app, you also need to add Background Modes capability via Signing & Capabilities in your iOS project settings. More information about this can be found here: Apple Documentation
The callback is triggered when users click the CTA button on the video in the video player. We start the floating player in the following sample codes. The event type is CustomCTAClickEvent.
FireworkSDK.getInstance().onCustomCTAClick=async (event) => {constresult=awaitFireworkSDK.getInstance().navigator.startFloatingPlayer();if (!result) {/* when the result is false, the current fullscreen player may not * enable the floating player. In that case, we could call the * following method to close the fullscreen player. */awaitFireworkSDK.getInstance().navigator.popNativeContainer(); }// Navigate to the RN webview page of the host app.navigation.navigate('LinkContent', { url:event.url });}