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

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 snapshot button
controlbarBooleantrueWhether to display the video control bar
autoplayBooleantrueWhether to autoplay the video

 

Catalog Navigation