LoginSignup
0
0

More than 1 year has passed since last update.

WEBブラウザで動画再生お試し

Posted at

src.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>sample</title>
<script>
//A再生
function PlayA(){
    vp = document.getElementById("videoplay");
    vp.src = "./a.mp4";
    vp.play();
}
//D一時停止
function PlayD(){
    vp = document.getElementById("videoplay");
    vp.src = "./d.mp4";
    vp.play();

}

</script>
</head>
<body>
    <video id="videoplay" width="500" height="300" >
        <source src="./d.mp4" type="video/mp4">
    </video>
<br />
<button onclick="PlayA()">a.mp4を再生</button>
<button onclick="PlayD()">d.mp4を再生</button>
</body>
</html>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0