@spmeesseman/extjs-pkg-plyr

ExtJS Package Wrapper for plyr

Usage no npm install needed!

<script type="module">
  import spmeessemanExtjsPkgPlyr from 'https://cdn.skypack.dev/@spmeesseman/extjs-pkg-plyr';
</script>

README

ExtJs Package Wrapper for plyr

perry-johnson app-type app-lang app-publisher authors

Description

This package provides an ExtJS package wrapper for the plyr html5 media player by Sam Potts, available on npmjs.org. The plyr package is used as a dependency and this package will include its distribution files into ExtJs client builds.

Install

To install this package, run the following command:

npm install @perryjohnson/extjs-pkg-plyr

Usage

To include the package in an ExtJS application build, be sure to add the package name to the list of required packages in the app.json file:

"requires": [
     "plyr",
    ...
]

For an open tooling build, also add the node_modules path to the workspace.json packages path array:

 "packages": {
    "dir": "...${package.dir}/node_modules/@perryjohnson/extjs-pkg-plyr"
}

Simply include the control into any class file:

require: [ 'Ext.ux.Plyr' ],
items: [
{
    xtype: 'plyr',
    audioCtlListTags: 'download',
    currentTime: 0,
    url: 'https://www.mydomain.com/audio/blank.mp4',
    plyrLoaded: function()         // Optional callback
    {
        Utils.log('Loaded!!!');
    },
    plyrLog: function(msg, level)  // Optional callback
    {
        Utils.log(msg, level);
    }
}]