0.0.3 • Published 5 years ago
@bytemd/plugin-xgplayer v0.0.3
@bytemd/plugin-xgplayer
bytemd plugin to support <video>
with xgplayer
Usage
import { Editor } from 'bytemd';
import xgplayer from '@bytemd/plugin-xgplayer';
new Editor({
target: document.body,
props: {
plugins: [
xgplayer(),
// ... other plugins
],
},
});
Options
xgplayer({
// Specify tag name, default: video
tagName: 'my-awesome-video',
// See http://h5player.bytedance.com/en/config/#optional-configuration
playerOptions: {},
onClickIcon(cm) {
// Toolbar icon click event
},
});
Example
<video src="https://example.com/video.mp4" poster="https://example.com/poster.png" width="720" height="480"></video>
License
MIT