{"id":15011,"library":"unified-video-framework","title":"Unified Video Framework","description":"Unified Video Framework, currently at version 1.4.570, is a cross-platform video player SDK developed by Flicknexs. It aims to provide a single, unified API for building OTT, FAST, VOD, and Live Streaming applications across various platforms, thereby eliminating the need to maintain separate players for different environments. While it supports Web (all modern browsers), its native implementations for iOS, Android (including React Native), Smart TVs (Samsung Tizen, LG webOS), and streaming devices (Roku, Android TV, Apple TV) are noted as \"On Progress.\" This indicates active development and ongoing feature completion for these platforms. The framework differentiates itself by targeting comprehensive streaming use cases and offering a centralized solution for video platforms, supported by Flicknexs's broader white-label OTT infrastructure.","status":"active","version":"1.4.570","language":"javascript","source_language":"en","source_url":"https://github.com/flicknexs/unified-video-framework","tags":["javascript","video","player","streaming","cross-platform","react","react-native","enact","smart-tv","typescript"],"install":[{"cmd":"npm install unified-video-framework","lang":"bash","label":"npm"},{"cmd":"yarn add unified-video-framework","lang":"bash","label":"yarn"},{"cmd":"pnpm add unified-video-framework","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The library primarily uses ES Modules. CommonJS `require` syntax is generally incorrect for modern usage, especially in TypeScript or bundler environments. The main player class/constructor is expected to be a named export.","wrong":"const UnifiedVideoPlayer = require('unified-video-framework');","symbol":"UnifiedVideoPlayer","correct":"import { UnifiedVideoPlayer } from 'unified-video-framework';"},{"note":"Imports for TypeScript types should use `import type` to ensure they are stripped from the JavaScript output, preventing runtime errors or unnecessary bundle size in environments that don't support type imports natively.","symbol":"PlayerConfig","correct":"import type { PlayerConfig } from 'unified-video-framework';"},{"note":"Assuming a `VideoSource` type or interface exists for defining video content. It's often co-imported with the player for configuration.","symbol":"VideoSource","correct":"import { UnifiedVideoPlayer, type VideoSource } from 'unified-video-framework';"}],"quickstart":{"code":"import { UnifiedVideoPlayer } from 'unified-video-framework';\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  const playerElement = document.getElementById('unified-player');\n  if (!playerElement) {\n    console.error('Player element #unified-player not found in DOM.');\n    return;\n  }\n\n  // Example configuration, adjust as per actual API documentation\n  const config = {\n    container: playerElement,\n    source: {\n      url: 'https://cdn.example.com/your-video.mp4',\n      type: 'video/mp4' // Or 'application/x-mpegURL' for HLS, 'application/dash+xml' for DASH\n    },\n    autoplay: true,\n    controls: true,\n    // An API key might be required for certain features or backend services\n    // apiKey: process.env.UNIFIED_PLAYER_API_KEY ?? '' \n  };\n\n  try {\n    const player = new UnifiedVideoPlayer(config);\n    player.on('play', () => console.log('Video started playing.'));\n    player.on('ended', () => console.log('Video ended.'));\n    console.log('Unified Video Player initialized successfully.');\n  } catch (error) {\n    console.error('Failed to initialize Unified Video Player:', error);\n  }\n});","lang":"typescript","description":"This quickstart demonstrates how to initialize the `UnifiedVideoPlayer` in a web environment, attach it to a DOM element, configure a video source, and listen for basic playback events."},"warnings":[{"fix":"Always refer to the latest official documentation or release notes for platform-specific capabilities and limitations. Thoroughly test features on 'on progress' platforms before relying on them in production.","message":"Key platforms like iOS/Android (Native/React Native), Smart TVs (Tizen, webOS), and Streaming Devices (Roku, Apple TV, Android TV) are explicitly listed as 'On Progress' in the README. This implies that the SDK's functionality, stability, and feature completeness on these platforms may not be fully mature or may change significantly.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pin to specific patch versions (`~1.x.x` or `1.x.x`) rather than major (`^1.x.x`) if strict API stability is required during rapid development phases. Automate testing across target platforms to catch regressions early.","message":"Due to the 'On Progress' status for several core platforms, minor version updates may introduce breaking changes or require significant refactoring for platform-specific integrations as the API evolves and stabilizes. Always review release notes carefully.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Consult the official Flicknexs documentation and examples for each target platform. Plan for potential platform-specific adaptations beyond the core unified player API, particularly for advanced features or complex integrations.","message":"The framework's core value proposition is a 'unified API' across platforms. However, platform-specific integrations (e.g., DRM, advertising, native UI overlays) may still require platform-specific code or configurations that diverge from the unified API, especially for 'On Progress' platforms.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure the target HTML element is rendered before the player initialization script runs. Verify the ID matches exactly, e.g., `<div id=\"unified-player\"></div>`.","cause":"The HTML element specified as the player container (`config.container`) does not exist in the DOM when the player is initialized, or its ID is incorrect.","error":"Player element not found: #unified-player"},{"fix":"Verify the video URL is accessible and the content type (`video/mp4`, `application/x-mpegURL`, `application/dash+xml`) matches the actual media format. Test with commonly supported formats first. Ensure any required DRM or adaptive streaming configurations are correctly applied.","cause":"The provided video `source.url` points to a file with an unsupported format or codec for the current browser/platform, or the `source.type` is incorrect.","error":"Error: Unsupported video format or codec."},{"fix":"Ensure you are using the correct version of `@types/unified-video-framework` (if a separate types package exists) or that the `unified-video-framework` package is up-to-date. Refer to the official documentation for the correct event subscription API (e.g., `player.addEventListener('play', ...)` or `player.on('play', ...)`).","cause":"The `UnifiedVideoPlayer` instance's event listener methods are not recognized, often due to an outdated type definition, incorrect import, or a change in the API for event handling.","error":"TypeScript Error: Property 'on' does not exist on type 'UnifiedVideoPlayer'."}],"ecosystem":"npm"}