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

  1. 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).

  2. 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

ParameterTypeDefault ValueDescription
playerElmString or Element-Player container element or selector
urlString or Object-URL address of the video file
infoButtonBooleanfalseWhether to display the video info button
optionButtonBooleanfalseWhether to display the video options button
snapshotButtonBooleanfalseWhether to display the video screenshot button
controlbarBooleantrueWhether to display the video control bar
autoplayBooleantrueWhether to autoplay the video
isLiveBooleanfalseWhether it is a live video

5. Disclaimer

  1. 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. 2. All test videos, streaming links, and other content referenced by this player for demonstration purposes are sourced from the public internet.

  3. 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. 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. 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.

Catalog Navigation