- 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
Support protocol format
1. Format Support Demo
2. Format Support Features
Regardless of which protocol or encoding format the video uses, zwplayer adopts the same calling method. Developers do not need to deeply understand the differences between various streaming protocols such as HLS and DASH, nor do they need to find and configure different playback plugins for different video formats, minimizing the technical barrier. You only need to provide a video address; leave the rest to zwplayer.
Codecs supported by zwplayer:
h264
h265
av1
mp3
opus
Supported protocols:
VOD: http-flv, ws-flv, hls, dash, http-mp4
Live: http-flv, ws-flv, hls, dash, ts, webrtc, rtsp
Advanced Features
Supports multi-bitrate embedded in HLS and DASH: Manual selection of specific bitrates is available, as well as adaptive bitrate playback (automatically selecting the appropriate bitrate based on current network conditions).
RTSP protocol support without plugins: The browser can play RTSP video streams directly without installing any plugins.
Next steps will also support
vr
h266
...
Stay tuned!
3. Code Example
<!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://example.com/video.m3u8', // Actual URL address
infoButton: true,
optionButton: true,
snapshotButton: true,
controlbar: true,
autoplay: true,
isLive: false, // Set to true for live streaming
};
new ZWPlayer(info);
</script>
</body>
</html>4. 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 screenshot button |
| controlbar | Boolean | true | Whether to display the video control bar |
| autoplay | Boolean | true | Whether to autoplay the video |
| isLive | Boolean | false | Whether it is a live video |
5. Disclaimer
1. zwplayer is a free video player project developed based on HTML5 technology. This project is open-source and non-commercial, aimed at providing technical reference and exchange for the developer community, with no profit-making purpose.
2. All test videos, streaming links, and other content referenced by this player for demonstration purposes are sourced from the public internet.
3. These videos are only used to test the player's compatibility, functionality, and performance; the content does not represent the views of this project.
4. If the test videos provided by this project involve copyright issues, infringement is not intentional. If you are the copyright owner of the relevant video content and believe its content infringes upon your legitimate rights, please contact us via the following method: [893366640@qq.com].
5. Please provide sufficient copyright proof materials and specific infringing links in the email. We will delete or block the relevant test content within a reasonable time after verifying the situation.