- Overview
- Name meaning
- Features
- download and install
- User Guide
- Basic Usage
- Vue framework usage
- Parameter Configuration
- method
- event
- Detailed explanation of source address URL parameters
- Logo settings
- Chapter annotation settings
- Progress bar preview image settings
- Subtitle Settings
- Bullet Chat Settings
- Description of Barrage Server
- Play RTSP stream
- autoplay
- shortcut key
- demo
- Basic Usage
- logoSettings
- Chapter annotation settings
- Progress bar preview image settings
- Subtitle Settings
- bullet chat
- Support protocol format
- comprehensive
This document is created by zwplayer provides
Basic Usage
1. Basic Usage Demo
2. Example Code
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" charset="utf-8" src="https://cdn.zwplayer.cn/v3/zwplayer/zwplayer.js"></script>
</head>
<body>
<div id="mse" style="width: 800px; height: 450px; margin: 0 auto;"></div>
<script type="text/javascript">
var info = {
playerElm: 'mse',
url: 'https://d2zihajmogu5jn.cloudfront.net/elephantsdream/ed_hd.mp4',
infoButton: true,
optionButton: true,
snapshotButton: true,
controlbar: true,
autoplay: true,
};
new ZWPlayer(info);
</script>
</body>
</html>3. Configuration Parameters
| Parameter | Type | Default Value | Description |
|---|---|---|---|
| playerElm | String or Element | - | Player container element or selector |
| url | String or Object | - | URL address of the video file |
| infoButton | Boolean | false | Whether to display the video info button |
| optionButton | Boolean | false | Whether to display the video options button |
| snapshotButton | Boolean | false | Whether to display the video snapshot button |
| controlbar | Boolean | true | Whether to display the video control bar |
| autoplay | Boolean | true | Whether to autoplay the video |
Catalog Navigation