Registry / web-framework / smarttv-framework

smarttv-framework

JSON →
library0.6.30jsnpmunverified

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.

npm install smarttv-framework
INSTALL
IMPORT
SIG · SMARTTV-FRAMEWORK
S
smarttv-framework
web-frameworkjavascriptv0.6.30
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SmartTVFramework
import SmartTVFramework from 'smarttv-framework'
const SmartTVFramework = require('smarttv-framework')
Default import only; package is ESM-only
SmartTVFramework.Device
import SmartTVFramework from 'smarttv-framework'; const device = new SmartTVFramework.Device(config)
import { Device } from 'smarttv-framework'
Device is a property of default export, not a named export
SmartTVFramework (TypeScript)
import SmartTVFramework from 'smarttv-framework';
Package does not ship TypeScript definitions; use @types or declare module

Shows how to import the framework, configure device options (including VAST and DRM), and initialize a SmartTV device instance.

import SmartTVFramework from 'smarttv-framework'; const config = { width: '100%', height: '100%', debug: true, videoPlayerId: 'test-video', vastOptions: { media_type: 'video/mp4', media_bitrate_min: 200, media_bitrate_max: 1200, ad_caption: 'Advertisement' }, DRM: { playReady: { mimeType: 'application/vnd.ms-playready.initiator+xml', DRMSystemID: '', licenserUrl: '' } }, appId: '' }; const SmartTVDevice = new SmartTVFramework.Device(config); SmartTVDevice.init();
Debug
Known issues
breakingSmartTVFramework.Device constructor expects a config object; missing required fields may cause silent failures.
fix
Always provide config with all mandatory fields (width, height, videoPlayerId).
affects: >=0.0.0
deprecatedThe config property 'DRM.playReady.DRMSystemID' is deprecated; use 'systemId' or similar.
fix
Use 'systemId' instead of 'DRMSystemID' if available, or check documentation.
affects: >=0.6.0
gotchaThe package is ESM-only; using require() will throw an error.
fix
Use import syntax and set type: 'module' in package.json or use .mjs extension.
affects: >=0.6.0
gotchaNo TypeScript definitions provided; using with TypeScript requires manual declaration or ignore.
fix
Add declare module 'smarttv-framework' in .d.ts file.
affects: >=0.0.0
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
Using import syntax in a non-module script (e.g., .js without type: module).
fix
Add "type": "module" to package.json or rename file to .mjs.
TypeError: SmartTVFramework.Device is not a constructor
Trying to use require() instead of import, or destructuring the default export incorrectly.
fix
Use import SmartTVFramework from 'smarttv-framework' and then new SmartTVFramework.Device(config).
Cannot read properties of undefined (reading 'init')
SmartTVDevice.init() called before device properly constructed, or config missing mandatory fields.
fix
Ensure config object includes required properties like 'videoPlayerId' and 'width'/'height'.
Upgrade
Version history
0.6.30latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
smarttv-framework — npm install smarttv-framework · libregistry