New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

videoplaybackquality

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videoplaybackquality

A ponyfill/polyfill for VideoPlaybackQuality.

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

VideoPlaybackQuality-polyfill

A polyfill/ponyfill for HTMLVideoElement.prototype.getVideoPlaybackQuality().

HTMLVideoElement.prototype.getVideoPlaybackQuality() return a VideoPlaybackQuality object.

example

Install

Install with npm:

npm install videoplaybackquality

Usage

Polyfill

require("videoplaybackquality/polyfill");
// usage
var video = document.getElementById("js-video");
console.log(video.getVideoPlaybackQuality());

Use as a module(Ponyfill)

const getVideoPlaybackQuality = require("videoplaybackquality").getVideoPlaybackQuality;
// usage
var video = document.getElementById("js-video");
getVideoPlaybackQuality(video);
/*
{
        'droppedVideoFrames': 0,
        'totalVideoFrames': 0,
        'corruptedVideoFrames': 0,
        'creationTime': 0,
        'totalFrameDelay': 0
}
*

Example

See example/

Limitation

WebKit can not get complete VideoPlaybackQuality.

This polyfill return following data:

{
        'droppedVideoFrames': webKitVideo.webkitDroppedFrameCount,
        'totalVideoFrames': webKitVideo.webkitDecodedFrameCount,
        // Not provided by this polyfill:
        'corruptedVideoFrames': 0,
        'creationTime': NaN,
        'totalFrameDelay': 0
}

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request :D

Author

License

MIT © azu

Keywords

video

FAQs

Package last updated on 14 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts