You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.8 KiB
HTML
58 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Hello Bulma!</title>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
|
|
<script defer src="https://use.fontawesome.com/releases/v5.0.7/js/all.js"></script>
|
|
</head>
|
|
<body>
|
|
<section class="section">
|
|
<div class="container">
|
|
<h1 class="title">
|
|
Hello World
|
|
</h1>
|
|
<p class="subtitle">
|
|
My first website with <strong>Bulma</strong>!
|
|
</p>
|
|
<button name="shareButton" id="shareButton" >Share</button>
|
|
</div>
|
|
</section>
|
|
<video id="video" src="https://www.videvo.net/videvo_files/converted/2017_04/videos/170216A_023_BoyatWindow4_1080p.mp439692.mp4"></video>
|
|
|
|
<button id="pipButton"></button>
|
|
|
|
<script>
|
|
// Hide button if Picture In Picture is not supported.
|
|
pipButton.hidden = !document.pictureInPictureEnabled;
|
|
|
|
pipButton.addEventListener('click', function() {
|
|
// If there is no element in Picture In Picture yet, let's request Picture
|
|
// In Picture for the video, otherwise leave it.
|
|
if (!document.pictureInPictureElement) {
|
|
video.requestPictureInPicture()
|
|
.catch(error => {
|
|
// Video failed to enter Picture In Picture mode.
|
|
});
|
|
} else {
|
|
document.exitPictureInPicture()
|
|
.catch(error => {
|
|
// Video failed to leave Picture In Picture mode.
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
<script>
|
|
shareButton.addEventListener("click", async () => {
|
|
try {
|
|
await navigator.share({ title: "Example Page", url: "" });
|
|
console.log("Data was shared successfully");
|
|
} catch (err) {
|
|
console.error("Share failed:", err.message);
|
|
}
|
|
});
|
|
</script>
|
|
</html>
|