npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dpdk-videomanager

v0.2.9

Published

A small DPDK video manager

Downloads

4

Readme

DPDK Video Manager

Functionalities

  • A simple video module for playing video's on desktop and mobile.
  • Now works for Desktop/Mobile (iOS 10 Inline support).

Setup

Install the videoManager:

npm install dpdk-videomanager

Import the videoManager somewhere in your code:

import videoManager from 'dpdk-videomanager/dist/videoManager.js';

Create an new instance of the videoManager and assign the videoKeys object to it:

const videoManager = new videoManager(videoKeys);

The videoKeys could be a preloader object containing blobs or just a static object. Example:

const staticBlobs = {
    videoKey: {
        blob: '/path/to/video/a-video.mp4'
    },
    otherVideoKey: {
        blob: '/path/to/video/b-video.mp4'
    }
};

Usage

Adding a video to the DOM:

videoManager.addVideoToDOM("videoKey", document.querySelector("#video-container"), (loop true/false));

Removing a video to the DOM:

videoManager.unloadVideo("videoKey");

Playing a video:

videoManager.play("videoKey", (playOnMobile true/false));

Pausing a video:

videoManager.pause("videoKey");

Muting a specific video:

videoManager.mute("videoKey");

Muting all video's including video's that are added later:

videoManager.muteAll();

Binding events:

videoManager.bindCompletedEvent("videoKey", function () {
    console.log("Video ended!");
});

videoManager.bindTimeUpdateEvent("videoKey", function (currentTime, duration) {
    console.log("Video time update! New Time: "+currentTime+", Total duration: "+duration);
});

Binding triggers:

videoManager.triggerVideoPercentage("videoKey", percentage, function () {
    console.log("Video is at percentage of play time");
});

videoManager.triggerVideoTime("videoKey", time, function () {
    console.log("Video time is at time");
});

Changelog

  • v0.2.9 | 2017-09-01: Making the year dynamic
  • v0.2.8 | 2017-09-01: Making the package github ready
  • v0.2.7 | 2017-04-10: Fixed the video unload function for IE11
  • v0.2.6 | 2017-04-05: Added the loop param for a video
  • v0.2.5 | 2017-02-22: Implementing ES6 flow
  • v0.2.4 | 2017-02-17: Updated the documentation
  • v0.2.3 | 2017-02-08: let/var bugfix and changed the video element from string to element
  • v0.2.2 | 2017-02-06: Fixed the gsap dependency issue
  • v0.2.1 | 2017-02-01: Updated the way of exporting the modules
  • v0.2.0 | 2017-01-10: Added support for preloader blobs or static videoKey object #standaloneversionready. Also added the new test package.
  • v0.1.4 | 2017-01-05: Updated the readme.
  • v0.1.3 | 2017-01-05: Added the 2 video triggers (time, percentage). Updated the readme. And added the new test package.
  • v0.1.2 | 2017-01-05: Bugfixes, Added extra playOnMobile option to play function, also added the pause function and code cleanup.
  • v0.1.1 | 2016-12-20: Changed readme that now includes a usage section also included a test application
  • v0.1.0 | 2016-12-19: Added support for events and working on mobile detection
  • v0.0.5 | 2016-12-19: Testing jenkins workflow
  • v0.0.4 | 2016-12-19: Testing jenkins workflow
  • v0.0.3 | 2016-12-19: Testing jenkins workflow
  • v0.0.2 | 2016-12-19: Testing jenkins workflow
  • v0.0.1 | 2016-12-16: First add to NPM manager