๐ŸŽฌ Video Player SDK - Browser Usage Example

๐Ÿ“‹ How to Use This SDK

Step 1: Install the package

npm install ads-reels-player

Step 2: Create an HTML file (like this one)

Step 3: Include the SDK and use it

<!-- Include the SDK --> <script src="./node_modules/ads-reels-player/dist/index.umd.js"></script> <!-- OR use CDN --> <script src="https://unpkg.com/ads-reels-player@latest/dist/index.umd.js"></script> <script> // Create and use the player const player = new VideoPlayerSDK({ key: 'demo-1', position: 'bottom-right', width: '320px', height: '480px' }); player.init(); </script>

๐Ÿงช Live Demo

๐Ÿ“‹ Available Video Keys

๐ŸŽฏ Usage Examples

Basic Usage

const player = new VideoPlayerSDK({ key: 'demo-1' }); player.init();

Multiple Videos

const player = new VideoPlayerSDK({ keys: ['demo-1', 'demo-2', 'demo-3'], showNavigation: true, position: 'center' }); player.init();

Custom Video

const player = new VideoPlayerSDK({ videoData: { video: 'https://example.com/video.mp4', title: 'My Video Title', video_routing_link: 'https://example.com/action', button_text: 'Click Here' } }); player.init();

With Callbacks

const player = new VideoPlayerSDK({ key: 'demo-1', onClose: () => console.log('Player closed'), onNavigate: (url) => window.open(url, '_blank'), onVideoChange: (videoData, index) => console.log(`Playing: ${videoData.title}`) }); player.init();