SmFzcGlvbg / index.html
Ciros's picture
Upload index.html
323d964
raw
history blame
12.8 kB
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Player de Vídeo com Playlist</title>
<style>
/* Estilização CSS */
body {
background-color: #000;
margin: 0;
padding: 0;
}
#player {
display: flex;
max-width: 100%;
border-radius: 10px;
overflow: hidden;
}
#video-player {
width: 70%;
border-radius: 10px;
background-color: #000;
}
#playlist {
width: 30%;
background-color: #333;
border-radius: 10px;
overflow-y: auto;
margin-top: 0px;
}
#playlist ul {
list-style: none;
padding: 0;
margin: 0;
}
#playlist li {
display: flex;
align-items: center;
padding: 10px;
font-family: "Arial Black", Arial, sans-serif;
color: #fff;
cursor: pointer; /* Torna a lista clicável */
}
#playlist li img {
width: 80px;
height: 60px;
margin-right: 10px;
}
#controls {
text-align: left;
background-color: #ccc;
padding: 10px;
}
/* Estilização do botão de mostrar/ocultar playlist */
#toggle-playlist {
background-color: #1C1C1C;
color: #fff;
border: none;
border-radius: 5px;
padding: 8px 15px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease;
}
#toggle-playlist:hover {
background-color: #d60000;
}
#toggle-playlist:focus {
outline: none;
}
@media screen and (orientation: landscape) {
#player {
flex-direction: row;
align-items: stretch;
}
#video-player {
width: 70%;
height: 100%;
}
#playlist {
width: 30%;
height: 100%;
max-height: none;
overflow-y: auto;
}
}
</style>
</head>
<body>
<div id="player">
<video id="video-player" autoplay>
<!-- O vídeo inicial será carregado através do JavaScript -->
</video>
<div id="playlist">
<ul>
<ul>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/01_O_Planeta_de_Edin.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>1 - O planeta de Edin</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/02_O_triste_fim_de_Sakura.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>2 - O triste fim de Sakura</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/03_O_sonho_do_menino_galactico.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>3 - O sonho do menino galáctico</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/04_A_furia_do_pantano.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>4 - A fúria do pântano</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/05_O_enigma_da_flauta.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>5 - O enigma da flauta</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/06_Gordon_em_busca_da_mae.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>6 - Gordon em busca da mãe</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/07_O_demonio_da_montanha.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>7 - O demônio da montanha</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/08_O_casal_fugitivo.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>8 - O casal fugitivo</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/09_A_historia_de_uma_arvore.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>9 - A história de uma árvore</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/10_O_ataque_do_Pyrossauro.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>10 - O ataque do Pyrossauro</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/11_Perigo_em_Tsukuba.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>11 - Perigo em Tsukuba</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/12_A_profecia.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>12 - A profecia</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/13_A_investida_dos_aliados_espaciais.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>13 - A investida dos aliados espaciais</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/14_Perigo_na_lagoa_dos_noivos.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>14 - Perigo na lagoa dos noivos</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/15_Sonho_ou_ilusao_A_imagem_dourada.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>15 - Sonho ou ilusão? A imagem dourada</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/16_Qual_o_destino_da_humanidade.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>16 - Qual o destino da humanidade?</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/17_O_misterio_do_Passaro_Dourado.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>17 - O mistério do Pássaro Dourado</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/18_O_inimigo_imortal.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>18 - O inimigo imortal</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/19_Alerta_no_oceano.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>19 - Alerta no oceano</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/20_A_ultima_chance.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>20 - A última chance</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/21_O_valente_garoto_jogador.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>21 - O valente garoto jogador</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/22_O_feitico_de_Titania.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>22 - O feitiço de Titânia</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/23_O_monstro_do_seculo.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>23 - O monstro do século</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/24_Ambicao_perigosa.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>24 - Ambição perigosa</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/25_Toquio_em_perigo.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>25 - Tóquio em perigo</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/26_Contra_ataque_de_Daileon.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>26 - A vingança do Furfante</span>
</li>
<li data-src="https://huggingface.co/datasets/Ciros/Jaspion/resolve/main/27_Juventude_ameacadora.mp4">
<img src="https://e0.pxfuel.com/wallpapers/168/464/desktop-wallpaper-jaspion-thumbnail.jpg" alt="Thumbnail do vídeo">
<span>27 - Juventude ameaçadora</span>
</li>
</ul>
</div>
</div>
<div id="controls">
<button id="toggle-playlist">Mostrar/Ocultar Playlist</button>
</div>
<script>
// JavaScript para funcionalidade do botão de mostrar/ocultar a playlist
const toggleButton = document.getElementById('toggle-playlist');
const playlist = document.getElementById('playlist');
const videoPlayer = document.getElementById('video-player');
const playlistItems = document.querySelectorAll('#playlist li');
toggleButton.addEventListener('click', function() {
playlist.classList.toggle('visible'); // Adiciona ou remove a classe 'visible' para exibir ou ocultar a playlist
if (playlist.classList.contains('visible')) {
videoPlayer.style.width = '70%'; // Restaura o tamanho normal do player de vídeo
} else {
videoPlayer.style.width = '100%'; // Ocupa toda a largura da página quando a playlist está oculta
}
});
// Adiciona evento de clique para cada item da playlist
playlistItems.forEach(function(item) {
item.addEventListener('click', function() {
const videoSrc = this.getAttribute('data-src');
videoPlayer.src = videoSrc; // Define o src do player de vídeo para o vídeo escolhido na playlist
videoPlayer.play(); // Inicia a reprodução do vídeo escolhido
});
});
// Reproduz automaticamente o primeiro vídeo da playlist ao acessar a página
const firstVideoSrc = playlistItems[0].getAttribute('data-src');
videoPlayer.src = firstVideoSrc;
videoPlayer.play();
// Reproduz o próximo vídeo da playlist após a execução do atual
videoPlayer.addEventListener('ended', function() {
const currentVideoIndex = Array.from(playlistItems).findIndex(item => item.getAttribute('data-src') === videoPlayer.src);
const nextItem = playlistItems[currentVideoIndex + 1];
if (nextItem) {
const nextVideoSrc = nextItem.getAttribute('data-src');
videoPlayer.src = nextVideoSrc; // Define o src do player de vídeo para o próximo vídeo na sequência
// Pausa por 2 segundos antes de reproduzir o próximo vídeo
setTimeout(function() {
videoPlayer.play(); // Inicia a reprodução do próximo vídeo
}, 2000);
}
});
// Redimensiona a altura da playlist com base no tamanho do vídeo quando a página é visualizada na horizontal
function updatePlaylistHeight() {
if (window.innerWidth > window.innerHeight) {
const videoHeight = videoPlayer.offsetHeight;
playlist.style.height = `calc(100% - ${videoHeight}px)`;
} else {
playlist.style.height = '35vh';
}
}
// Bloquear o clique direito do mouse
document.addEventListener('contextmenu', function(event) {
event.preventDefault();
});
// Remover os controles de reprodução do player de vídeo
videoPlayer.removeAttribute('controls');
window.addEventListener('resize', updatePlaylistHeight);
updatePlaylistHeight();
</script>
</body>
</html>