- Overview
- About Name
- Features
- Installation
- User Guide
- Basic Usage
- Vue Usage
- Parameter
- Method
- Event
- URL Parameters
- Logo settings
- Chapter Markers
- Progress Preview
- Subtitle Settings
- Danmaku Settings
- Danmaku Server
- RTSP Stream
- Autoplay
- Shortcut Key
- Demo
- Basic Usage
- Logo Settings
- Chapter Markers
- Progress Preview
- Subtitle Settings
- Danmaku
- Supported Protocols
- 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