JSPM

nas-logger

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q8117F
  • License MIT

Logger utility

Package Exports

  • nas-logger
  • nas-logger/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nas-logger) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Building

npm run build OR tsc build

Module is not published to npm yet, however, you can use it by installing it from local path after build

npm install path-to-this-directory

Usage example

import { DashTech, Player } from 'nas-player';

player = new Player();
player.init(
    new DashTech(),
    video_element,
    "https://dash.akamaized.net/dash264/TestCases/1a/sony/SNE_DASH_SD_CASE1A_REVISED.mpd",
    true,
    false,
    { "X-Custom-Header": "test" },
    {
        "com.widevine.alpha": {
            "serverURL": "<license URL if needed>",
            "httpRequestHeaders": { "X-Custom-Header": "test" }
        }
    },
    (e: any) => {
        console.error('DRM License Error: ' + e.message);
    }
);

When switching streams remember to destroy the player by using destroy() method on player object and recreate the player.