JSPM

decoding-info

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

Testing audio and video codec support in a browser with or without a key system

Package Exports

    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 (decoding-info) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Decoding Info

    NPM version NPM Downloads install size

    This npm package allows you to determine the resolution of a supported video codec using the MediaCapabilities API.

    Installation

    npm install --save-dev decoding-info

    Usage

    import { getVideoCodecSupportedResolution } from 'decoding-info';
    
    const configuration = {
        video: {
            codec: 'video/mp4; codecs="hvc1.1.6.L123.B0"',
            width: 1920,
            height: 1080,
            framerate: 25,
            bitrate: 1000000,
        },
    };
    
    getVideoCodecSupportedResolution(configuration).then((result) => {
        console.log(result);
        // {
        //     "error": null,
        //     "attempts": 103,
        //     "supported": {
        //         "value": true,
        //         "minHeight": 16,
        //         "minWidth": 16,
        //         "maxWidth": 8192,
        //         "maxHeight": 8192
        //     },
        //     "smooth": {
        //         "value": true,
        //         "minHeight": 16,
        //         "minWidth": 16,
        //         "maxWidth": 8192,
        //         "maxHeight": 8192
        //     },
        //     "powerEfficient": {
        //         "value": true,
        //         "minHeight": 16,
        //         "minWidth": 16,
        //         "maxWidth": 8192,
        //         "maxHeight": 8192
        //     }
        // }
    });

    License

    MIT