1.0.11 • Published 2 years ago

filepond-plugin-media-preview v1.0.11

Weekly downloads
1,348
License
MIT
Repository
github
Last release
2 years ago

Media Preview plugin for FilePond

License: MIT npm version

The Media Preview plugin will kick in automatically when the uploaded file is of type video or audio and render a preview player inside the file item.

Quick Start

Install using npm:

npm install filepond-plugin-media-preview

Then import in your project:

import * as FilePond from 'filepond';
import FilePondPluginMediaPreview from 'filepond-plugin-media-preview';

Register the plugin:

FilePond.registerPlugin(FilePondPluginMediaPreview);

Create a new FilePond instance as normal.

const pond = FilePond.create({
    name: 'filepond'
});

// Add it to the DOM
document.body.appendChild(pond.element);

The preview will become active when uploading an video or audio file.

Configuration

Both the video and audio preview can be enabled or disabled. Use the following options:

const pond = FilePond.create({
    name: 'filepond',
    allowVideoPreview: true,    // default true
    allowAudioPreview: true     // default true
});

Default styles

Be sure to include this lib's styles, by importing the minified css.

import 'filepond-plugin-media-preview/dist/filepond-plugin-media-preview.min.css';

Demo

View the demo

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago