Firework for Developers
One-to-one Virtual ShoppingBusiness Portal
  • Welcome to Firework for Developers
  • Firework Interactive Video and One-to-many Digital Showroom
  • Web
    • Getting Started (Web)
      • Shopify
      • Magento
      • Wordpress (WooCommerce)
      • Salesforce Commerce Cloud
      • BigCommerce
    • Integration Guide for Web
      • Components
        • Hero Unit
        • Carousel / Grid
        • Storyblock (Web)
        • Player (Floating)
        • Storylink
      • Styling
      • Feed Attributes
      • Player
        • Configuration
          • Appearance
      • Video customization
        • Video Factory
        • CTA Button
        • Product cards
      • Events
        • Embed Feed and Storyblock Events
        • Video player events
        • Live stream events
        • Shopping events
      • Shopping Integration (V2)
        • Introduction
        • Shopping APIs
        • Product Hydration
        • Product Factory
        • Cart Sync
        • Tracking
          • Purchase
          • Add to cart
          • Remove from cart
          • Page viewed
        • Shopping Integration FAQ
        • Migrate from V1
      • Web SDK
      • Enhanced Picture-in-Picture
      • Privacy settings
        • Tracking settings
        • Cookies management
        • Content Security Policy
    • Telemetry console
    • Firework Service Domains
    • FAQ & Troubleshooting (Web)
  • Android SDK
    • Integration Guide for Android SDK
      • Getting Started (Android)
      • Video Feed (Android)
        • Video Feed Layouts (Android)
        • Channel Feed (Android)
        • Discover Feed (Android)
        • Playlist Feed (Android)
        • Dynamic Content Feed
        • Channel Hashtags Feed
        • Sku Feed
        • Single Content Feed
        • Configure Video Feed
      • Customization
        • CTA
      • Analytics (Android)
      • Shoppable Videos (Android)
        • Product Hydration
      • Live Stream Support (Android)
      • Video Player (Android)
      • StoryBlock (Android)
      • Share & Video Deep linking
      • Ad Support (Android)
      • Configure Video Advertisements Source (Android)
      • In-app Language Switches
      • Compose support(Android)
    • Sample App (Android)
    • FAQ & Troubleshooting (Android)
    • Changelog (Android)
  • iOS SDK
    • Integration Guide for iOS SDK
      • Getting Started (iOS)
      • ATT compliance (iOS)
      • Video Feed (iOS)
        • Discover Feed(iOS)
        • Channel Feed (iOS)
        • Playlist Feed (iOS)
        • Playlist Group Feed (iOS)
        • Dynamic Content (iOS)
        • Hashtag Playlist (iOS)
        • SKU Playlist (iOS)
        • Video Ads (iOS)
        • Video Feed Layouts (iOS)
      • Story Block (iOS)
      • Customization (iOS)
        • Video feed configurations (iOS)
        • Player configurations (iOS)
        • Shopping configurations (iOS)
          • Customize product card on videos using the custom view (iOS)
        • Customize click behaviors (iOS)
      • Shopping (iOS)
      • Live Stream Support (iOS)
      • Analytics (iOS)
      • Share & Deeplinking(iOS)
      • Ad Support (iOS)
    • Sample App (iOS)
    • FAQ & Troubleshooting (iOS)
    • Changelog (iOS)
  • React Native SDK
    • Integration Guide for React Native SDK V2
      • Getting Started (React Native)
      • ATT compliance React Native (iOS)
      • Video Feed (React Native)
      • Story Block (React Native)
      • Customization (React Native)
        • Video feed configurations (React Native)
        • Player configurations (React Native)
        • Shopping configurations (React Native)
          • Customize product card on videos using the custom view (React Native)
        • Customize click behaviors (React Native)
      • Shopping (React Native)
      • Live Stream Support (React Native)
      • Ad Support (React Native)
      • Analytics (React Native)
      • App-level Language Setting (React Native)
      • Share & Video Deeplinking (React Native)
      • Android Style (React Native)
      • Inject Android Image Loader (React Native)
      • Integrate SDKs in Hybrid React Native and native Apps
      • Reference (React Native)
      • Sample App (React Native)
      • FAQ & Troubleshooting (React Native)
      • Changelog (React Native)
  • Flutter SDK
    • Integration Guide for Flutter SDK V2
      • Getting Started (Flutter)
      • ATT compliance Flutter (iOS)
      • Video Feed (Flutter)
      • Story Block (Flutter)
      • Customization (Flutter)
        • Video feed configurations (Flutter)
        • Player configurations (Flutter)
        • Shopping configurations (Flutter)
          • Customize product card on videos using the custom view (Flutter)
        • Customize click behaviors (Flutter)
      • Live Stream Support (Flutter)
      • Shopping (Flutter)
      • Ad Support (Flutter)
      • Analytics (Flutter)
      • App-level Language Setting (Flutter)
      • Share & Video Deeplinking (Flutter)
      • Inject Android Image Loader (Flutter)
      • Android Style (Flutter)
      • Integrate SDKs in Hybrid Flutter and native Apps
      • Reference (Flutter)
      • Sample App (Flutter)
      • FAQ & Troubleshooting (Flutter)
      • Changelog (Flutter)
  • Help Articles
    • Importing Products to Firework
    • Adding products to a video
    • Displaying product videos on product pages using hashtag filtering(Web)
    • Syncing Carts
    • Encoded IDs
Powered by GitBook
On this page
  • Standard vs enhanced Picture-in-Picture
  • Enhanced Picture in Picture mode requirements
  • Can we disable the PiP player on certain pages?
  • Why is my website reloading when closing the enhanced PiP player?

Was this helpful?

  1. Web
  2. Integration Guide for Web

Enhanced Picture-in-Picture

PreviousWeb SDKNextPrivacy settings

Last updated 2 months ago

Was this helpful?

Standard vs enhanced Picture-in-Picture

Firework player supports two different Picture-in-Picture (PiP) modes: standard and enhanced.

By default, the player uses the standard PiP mode. The player can turn into a floating player and allow you to browse the web page while keeping the playback in the corner. However, when you navigate away to a different page, the video playback may be interrupted depending on the setting of the targeted page.

You can enable enhanced Picture-in-Picture (PiP) by setting the player attribute pip="true" or asking the partner success team to update the channel config. When enhanced PiP is enabled, and you navigate to other pages on the same domain, the unmuted playback will be carried over seamlessly.

For enhanced PiP to work, some prerequisites are explained in the next section.

Enhanced Picture in Picture mode requirements

Firework’s enhanced Picture-in-Picture feature renders the original page in an iframe and places the player on top. Therefore, the HTTP header with directive is needed to render the page in the iframe on the same origin. This can be achieved either by CSP HTTP header or HTML meta tag.

HTTP header value:

  • content-security-policy: frame-ancestors 'self'

  • x-frame-options: SAMEORIGIN

HTML meta header tags:

  • <meta http-equiv="Content-Security-Policy" content="frame-ancestors 'self'">

  • <meta http-equiv="X-Frame-Options" content="SAMEORIGIN">

Please note, x-frame-options is obsolete and should be only used in case you want to support older browsers.

If CSP blocks the website from rendering in the iframe we fall back to the standard PiP mode.

Can we disable the PiP player on certain pages?

When in standard PiP mode, you can remove the Firework script tag from the pages where you do not want the player to load.

Why is my website reloading when closing the enhanced PiP player?

The enhanced PiP mode renders the original page in an iframe so the actual player can break through the page boundary. When the user closes the PiP player, we remove the iframe and reload the actual page to where the user was in the iframe. If this user experience is not ideal for your use case, we recommend using the standard PiP mode.

When in enhanced PiP mode, you can use the close() method described in the to close the PiP player.

Content-Security-Policy
frame-ancestors
Web SDK section