答案 0 :(得分:1)
在single.php或custom-post-type-single.php中尝试此操作
playButton.addEventListener("click", function() {
if (video.paused == true) {
video.paused = false;
// Play the video
video.play();
// Update the button text to 'Pause'
document.getElementById("playbtn").src = "img/icons/pause.png";
} else {
video.paused = true;
// Pause the video
video.pause();
// Update the button text to 'Play'
document.getElementById("playbtn").src = "img/icons/play.png";
}
});