Picture in Picture
The LiSA Player is a web-based video streaming application designed to be seamlessly embedded in native apps via a WebView. To ensure a smooth user experience, we provide a set of UI transition messages that allow the host app to manage fullscreen and floating modes effectively.
Managing UI Transitions: Fullscreen & Floating Mode
The player’s transition between fullscreen and floating mode is managed via UI transition messages, allowing the host app to control and stay in sync with the player’s state.
Float Mode Initiation
The initial request to enter float mode can be triggered by several messages, including:
UI Transition Messages
requestFloatingMode
The player is about to switch to floating mode, and the UI adapts accordingly.
floating
The player has fully entered floating mode with adjusted controls.
requestFullscreenMode
The player is about to return to fullscreen mode, and the UI begins transitioning back.
fullscreen
The player is now in fullscreen mode with standard controls.
These messages ensure that the host app and LiSA Player can respond to player state changes, providing a seamless and optimized integration.
Example Message Flow
To enhance readability and simplify implementation, the messages are streamlined to include only the essential properties required for this message flow.
Enter Floating Mode
LiSA Player sends the Product Click message to the Host App:
Host App receives the message.
Host App opens the Product Detail Page based on the
productReference
.Host App sends the UI Transition Message to the Player to request floating mode:
Host App transitions the WebView component into floating state.
Host App sends the UI Transition Message to the Player to confirm to the Player that floating mode is entered:
Exit Floating Mode
LiSA Player sends the UI Transition message to the Host App to request fullscreen transition:
Host App transitions the WebView component into floating state.
Host App sends the UI Transition Message to the Player to confirm to the Player that fullscreen mode is entered:
Native Picture-in-Picture (PiP) Is No Longer Recommended
Utilizing native Picture-in-Picture (PiP) is no longer recommended due to various limitations. Instead, we offer a WebView-based floating mode to ensure better compatibility and control across platforms.
Limitations of Native PiP
Limited to a Single Video
Our player supports co-streaming, allowing multiple simultaneous video feeds.
Native PiP is restricted to one active video at a time.
Inconsistent Platform Support
Native PiP is not available on all platforms, leading to inconsistencies.
Some mobile OS versions and devices may lack PiP support altogether.
Better UI Control with WebView-Based Floating Mode
Our floating mode keeps the UI consistent across all devices and platforms.
Advanced theming options allow for an even more seamless integration into our customers apps and storefronts.
Native PiP may interfere with in-app navigation, whereas WebView-based floating mode ensures a seamless experience.
By relying on WebView-based floating mode, the host app maintains full control over the player's UI and transitions, ensuring a consistent and predictable experience.
Last updated