{"id":26404,"library":"smarttv-framework","title":"SmartTV Framework","description":"JavaScript framework for building smart TV applications. Version 0.6.30 is under active development and currently usable as a standalone library. Provides device abstraction, configuration for video players, VAST ad options, DRM (PlayReady), and app ID management. Differentiates by focusing on smart TV environments with built-in support for VAST ads and multiple DRM systems. Still early-stage with limited documentation and no stable release schedule.","status":"active","version":"0.6.30","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install smarttv-framework","lang":"bash","label":"npm"},{"cmd":"yarn add smarttv-framework","lang":"bash","label":"yarn"},{"cmd":"pnpm add smarttv-framework","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default import only; package is ESM-only","wrong":"const SmartTVFramework = require('smarttv-framework')","symbol":"SmartTVFramework","correct":"import SmartTVFramework from 'smarttv-framework'"},{"note":"Device is a property of default export, not a named export","wrong":"import { Device } from 'smarttv-framework'","symbol":"SmartTVFramework.Device","correct":"import SmartTVFramework from 'smarttv-framework';\nconst device = new SmartTVFramework.Device(config)"},{"note":"Package does not ship TypeScript definitions; use @types or declare module","wrong":"","symbol":"SmartTVFramework (TypeScript)","correct":"import SmartTVFramework from 'smarttv-framework';"}],"quickstart":{"code":"import SmartTVFramework from 'smarttv-framework';\n\nconst config = {\n  width: '100%',\n  height: '100%',\n  debug: true,\n  videoPlayerId: 'test-video',\n  vastOptions: {\n    media_type: 'video/mp4',\n    media_bitrate_min: 200,\n    media_bitrate_max: 1200,\n    ad_caption: 'Advertisement'\n  },\n  DRM: {\n    playReady: {\n      mimeType: 'application/vnd.ms-playready.initiator+xml',\n      DRMSystemID: '',\n      licenserUrl: ''\n    }\n  },\n  appId: ''\n};\n\nconst SmartTVDevice = new SmartTVFramework.Device(config);\n\nSmartTVDevice.init();","lang":"javascript","description":"Shows how to import the framework, configure device options (including VAST and DRM), and initialize a SmartTV device instance."},"warnings":[{"fix":"Always provide config with all mandatory fields (width, height, videoPlayerId).","message":"SmartTVFramework.Device constructor expects a config object; missing required fields may cause silent failures.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Use 'systemId' instead of 'DRMSystemID' if available, or check documentation.","message":"The config property 'DRM.playReady.DRMSystemID' is deprecated; use 'systemId' or similar.","severity":"deprecated","affected_versions":">=0.6.0"},{"fix":"Use import syntax and set type: 'module' in package.json or use .mjs extension.","message":"The package is ESM-only; using require() will throw an error.","severity":"gotcha","affected_versions":">=0.6.0"},{"fix":"Add declare module 'smarttv-framework' in .d.ts file.","message":"No TypeScript definitions provided; using with TypeScript requires manual declaration or ignore.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add \"type\": \"module\" to package.json or rename file to .mjs.","cause":"Using import syntax in a non-module script (e.g., .js without type: module).","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Use import SmartTVFramework from 'smarttv-framework' and then new SmartTVFramework.Device(config).","cause":"Trying to use require() instead of import, or destructuring the default export incorrectly.","error":"TypeError: SmartTVFramework.Device is not a constructor"},{"fix":"Ensure config object includes required properties like 'videoPlayerId' and 'width'/'height'.","cause":"SmartTVDevice.init() called before device properly constructed, or config missing mandatory fields.","error":"Cannot read properties of undefined (reading 'init')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}