Spaces:
Sleeping
Sleeping
Update index.html
Browse files- index.html +38 -17
index.html
CHANGED
|
@@ -1,19 +1,40 @@
|
|
| 1 |
-
<!
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>Player de vídeo estilo YouTube</title>
|
| 5 |
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
|
| 6 |
+
</head>
|
| 7 |
+
<body>
|
| 8 |
+
<div class="container">
|
| 9 |
+
<div class="row">
|
| 10 |
+
<div class="col-md-8 offset-md-2">
|
| 11 |
+
<h1>Player de vídeo</h1>
|
| 12 |
+
<form id="video-form">
|
| 13 |
+
<div class="form-group">
|
| 14 |
+
<label for="video-url">URL do vídeo:</label>
|
| 15 |
+
<input type="text" class="form-control" id="video-url" placeholder="Cole a URL do vídeo">
|
| 16 |
+
</div>
|
| 17 |
+
<button type="submit" class="btn btn-primary">Reproduzir</button>
|
| 18 |
+
</form>
|
| 19 |
+
<div id="video-player" class="mt-4"></div>
|
| 20 |
+
</div>
|
| 21 |
+
</div>
|
| 22 |
+
</div>
|
| 23 |
+
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
|
| 24 |
+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
| 25 |
+
<script>
|
| 26 |
+
$(document).ready(function() {
|
| 27 |
+
$("#video-form").submit(function(event) {
|
| 28 |
+
event.preventDefault();
|
| 29 |
+
var videoUrl = $("#video-url").val();
|
| 30 |
+
var videoPlayer = `
|
| 31 |
+
<video width="640" height="480" controls>
|
| 32 |
+
<source src="${videoUrl}" type="video/mp4">
|
| 33 |
+
</video>
|
| 34 |
+
`;
|
| 35 |
+
$("#video-player").html(videoPlayer);
|
| 36 |
+
});
|
| 37 |
+
});
|
| 38 |
+
</script>
|
| 39 |
+
</body>
|
| 40 |
</html>
|