import React from 'react'; import type { BBPlayerViewProps, BBPlayerViewMethods } from './BBPlayer.types'; /** * Animation type for collapse/expand transitions */ export type OutstreamAnimationType = 'timing' | 'spring' | 'layout' | 'none'; /** * Configuration for Outstream animations */ export interface OutstreamAnimationConfig { /** * Type of animation to use * - 'timing': Smooth linear animation (default) * - 'spring': Bouncy spring animation * - 'layout': Uses LayoutAnimation (simpler, may be smoother on some devices) * - 'none': Instant collapse/expand with no animation * @default 'timing' */ type?: OutstreamAnimationType; /** * Duration in milliseconds (for 'timing' and 'layout' types) * @default 300 */ duration?: number; /** * Spring damping (for 'spring' type only) * @default 15 */ damping?: number; /** * Spring stiffness (for 'spring' type only) * @default 100 */ stiffness?: number; } /** * Props for BBOutstreamView */ export interface BBOutstreamViewProps extends Omit { /** * Initial/expanded height of the player in pixels * @default 200 */ expandedHeight?: number; /** * Height when collapsed in pixels * @default 0 */ collapsedHeight?: number; /** * Animation configuration for collapse/expand */ animation?: OutstreamAnimationConfig; /** * Player options. `allowCollapseExpand` is automatically set to true. */ options?: Record; /** * Called when the player requests to collapse (after animation completes) */ onCollapsed?: () => void; /** * Called when the player requests to expand (after animation completes) */ onExpanded?: () => void; /** * Called when collapse/expand animation starts */ onAnimationStart?: (isCollapsing: boolean) => void; } /** * Methods available on BBOutstreamView ref */ export interface BBOutstreamViewMethods extends BBPlayerViewMethods { /** * Returns whether the player is currently collapsed */ isCollapsed: () => boolean; /** * Programmatically collapse the player with animation */ animateCollapse: () => void; /** * Programmatically expand the player with animation */ animateExpand: () => void; } /** * BBOutstreamView - Convenience wrapper for Outstream advertising * * This component wraps BBPlayerView with automatic collapse/expand animation * handling. It's designed for Outstream ad placements embedded in scrollable * content like articles or feeds. * * @example * ```tsx * * Article content... * * console.log('Player collapsed')} * onExpanded={() => console.log('Player expanded')} * /> * * More content... * * ``` */ declare const BBOutstreamView: React.ForwardRefExoticComponent>; export default BBOutstreamView; //# sourceMappingURL=BBOutstreamView.d.ts.map