Copy code
<html>
<head>
<link rel="stylesheet" href="../src/csPlayer.css">
<script src="https://www.youtube.com/iframe_api"></script>
</head>
<body>
<div id="video1"></div>
<script src="../src/csPlayer.js"></script>
<script>
csPlayer.init("video1",{
defaultId: "RKERYQwvlFw",
thumbnail: true,
theme: "default",
loop: false,
});
// Example methods:
// csPlayer.play("video1")
// csPlayer.pause("video1")
// csPlayer.getCurrentTime("video1")
// csPlayer.getDuration("video1")
// csPlayer.getVideoTitle("video1")
// csPlayer.getPlayerState("video1")
// csPlayer.changeVideo("video1","bTqVqk7FSmY")
// csPlayer.destroy("video1")
</script>
</body>
<html>