embed-plugin-media

5.0.4 • Public • Published

embed-plugin-highlight

A plugin that can be used to embed video, audio or image those are supported by the browser.

Installation

npm i -S embed-js embed-plugin-media

CDN

https://unpkg.com/embed-plugin-media

Usage

Embeds video, audio or image those are supported by the browser.

import EmbedJS from 'embed-js'
import media from 'embed-plugin-media'
 
const x = new EmbedJS({
  input: document.getElementById('element'),
  plugins: [
  media({
    regex: /regex/gi, // in case you want to define a custom regex
    template(args) {
      // optional template
    },
    onLoad(element) {} // in case you want to do something when the component has loaded on the client.
   })
 ]
})

You can use video.js or plyr by applying it in the onLoad() method.

License

MIT @ Ritesh Kumar

Readme

Keywords

none

Package Sidebar

Install

npm i embed-plugin-media

Weekly Downloads

136

Version

5.0.4

License

MIT

Unpacked Size

55.4 kB

Total Files

9

Last publish

Collaborators

  • ritz078