Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---MAIN---
- <style>
- #text01, #text07 {
- -webkit-animation: pop 1s ease-in-out infinite alternate;
- animation: pop 1s ease-in-out infinite alternate;
- -moz-animation: pop 1s ease-in-out infinite alternate;
- }
- @keyframes pop {
- from {
- transform:scale(0.95)
- }
- 50% {
- transform:scale(1)
- }
- to {
- transform:scale(0.95)
- }
- }
- @-webkit-keyframes pop {
- from {
- -webkit-transform:scale(0.95)
- }
- 50% {
- -webkit-transform:scale(1)
- }
- to {
- -webkit-transform:scale(0.95)
- }
- }
- html {
- overflow: scroll;
- overflow-x: hidden;
- }
- ::-webkit-scrollbar {
- width: 0; /* remove scrollbar space */
- background: transparent; /* to make scrollbar invisible */
- }
- ::-webkit-scrollbar-thumb {
- background: transparent;
- }
- #text03 {
- overflow-y: scroll;
- height: 10.5em;
- }
- @media only screen and (max-width: 600px) {
- #text03 {
- height: 10.5em;
- }
- }
- </style>
- ---MARQUEE---
- <html>
- <head>
- </head>
- <body>
- <marquee behavior="scroll" direction="left">
- <img src="https://dl.dropbox.com/scl/fi/eybacuf6mt4uevdl26ugg/1f04d104a583d62f7021c4fc65d55415.jpeg?rlkey=3i70hao6uf5ombj3n0otwz5sk&dl=0.jpeg"75" height="75"/> <img src="https://dl.dropbox.com/scl/fi/hk7qarfuq68eu3vzz7gux/609ed54ceb9a48c4119d022ca311232b.jpeg?rlkey=izynbc0u0v56vmxhm3om5vgyr&dl=0.jpeg"75" height="75"/> <img src="https://dl.dropbox.com/scl/fi/iv5b98kek06babtmr4syt/af163cfe344be46ff4bb190099ce756f.jpeg?rlkey=fgzkbd3rl74agkthjovm4i2hi&dl=0.jpeg"75" height="75"/> <img src="https://dl.dropbox.com/scl/fi/j24aeumfxhyfddxr9578y/e31f54b71190de6d1cb2a2eabd7fcd76.jpeg?rlkey=c4hjsdzmd86sn5xkukzp0pie2&dl=0.jpeg"75" height="75"/> <img src="https://dl.dropbox.com/scl/fi/93wyywbkpj9z7u6yq1zmq/8a80d2c886c77a10c7ea3db34db49ae9.jpeg?rlkey=je6rmbsa98kkenx3h1m97qtec&dl=0.jpeg"75" height="75"/>
- </marquee>
- </body>
- </html>
- ---MUSIC---
- <!-----
- multiple song music player by adilene @ adilene.net. free to use and edit as you like! credit is not necessary, but it is appreciated! <3
- if you need any help feel free to reach out to me at adilene.net!
- source code: https://github.com/sayantanm19/js-music-player
- ----->
- <head>
- <script src="https://unpkg.com/phosphor-icons"></script>
- <style>
- @font-face {
- font-family: Nintendo-DS-BIOS;
- src: url(https://dl.dropbox.com/s/vlxjtnvrl9s0snp/Nintendo-DS-BIOS.ttf);
- }
- #musicplayer {
- position: relative;
- }
- .songtitle {
- font-family: Nintendo-DS-BIOS;
- font-size: 1em;
- color: #000;
- color: white;
- -webkit-filter: drop-shadow(0px 0px 1px #000);
- }
- .controls {
- font-size: 12px !important;
- text-align: center;
- width: 100%;
- }
- .controls td {
- padding: 0px 5px 0px 5px;
- }
- .seeking {
- display: flex;
- justify-content: space-evenly;
- }
- .current-time {
- padding-right: 5px;
- font-family: Nintendo-DS-BIOS;
- font-size: 1em;
- color: #000;
- }
- .total-duration {
- padding-left: 5px;
- font-family: Nintendo-DS-BIOS;
- font-size: 1em;
- color: #000;
- }
- input[type=range] {
- -webkit-appearance: none;
- width: 100%;
- background-color: transparent;
- }
- input[type=range]:focus {
- outline: none;
- }
- input[type=range]::-webkit-slider-runnable-track {
- width: 100%;
- height: 2px;
- cursor: help;
- animate: 0.2s;
- background: #000;
- border-radius: 1px;
- }
- input[type=range]::-webkit-slider-thumb {
- border: 0px solid #000;
- height: 10px;
- width: 10px;
- border-radius: 10px;
- background: #000;
- cursor: help;
- -webkit-appearance: none;
- margin-top: -4px;
- }
- input[type=range]:focus::-webkit-slider-runnable-track {
- background: #000;
- }
- input[type=range]::-moz-range-track {
- width: 100%;
- height: 1px;
- cursor: help;
- animate: 0.2s;
- background: #000;
- border-radius: 99px;
- }
- input[type=range]::-moz-range-thumb {
- border: 0px solid #000;
- height: 10px;
- width: 10px;
- border-radius: 10px;
- background: #000;
- cursor: help;
- }
- input[type=range]::-ms-track {
- width: 100%;
- height: 2px;
- cursor: help;
- animate: 0.2s;
- background: transparent;
- border-color: transparent;
- color: transparent;
- }
- input[type=range]::-ms-fill-lower {
- background: #000;
- border-radius: 2px;
- }
- input[type=range]::-ms-fill-upper {
- background: #000;
- border-radius: 2px;
- }
- input[type=range]::-ms-thumb {
- margin-top: 1px;
- border: 0px solid #000;
- height: 10px;
- width: 10px;
- border-radius: 10px;
- background: #000;
- cursor: help;
- }
- input[type=range]:focus::-ms-fill-lower {
- background: #000;
- }
- input[type=range]:focus::-ms-fill-upper {
- background: #000;
- }
- </style>
- </head>
- <body>
- <div id="musicplayer">
- <div>
- <div class="songtitle"></div>
- <table class="controls">
- <tr>
- <td>
- <div class="prev-track" onclick="prevTrack()"><i class="ph-skip-back-fill" style="color: #000"></i></div>
- </td>
- <td>
- <div class="playpause-track" onclick="playpauseTrack()" ><i class="ph-play-fill" style="color: #000"></i></div>
- </td>
- <td>
- <div class="next-track" onclick="nextTrack()"><i class="ph-skip-forward-fill" style="color: #000"></i></div>
- </td>
- </tr>
- </table>
- <div class="seeking">
- <div class="current-time">00:00</div>
- <input type="range" min="1" max="100" value="0" class="seek_slider" onchange="seekTo()">
- <div class="total-duration">0:00</div>
- </div>
- <audio id="music" src=""></audio>
- </div>
- </div>
- <script>
- let track_name = document.querySelector(".songtitle");
- let playpause_btn = document.querySelector(".playpause-track");
- let next_btn = document.querySelector(".next-track");
- let prev_btn = document.querySelector(".prev-track");
- let seek_slider = document.querySelector(".seek_slider");
- let curr_time = document.querySelector(".current-time");
- let total_duration = document.querySelector(".total-duration");
- let track_index = 0;
- let isPlaying = false;
- let updateTimer;
- // Create new audio element
- let curr_track = document.getElementById("music");
- //
- // DEFINE YOUR SONGS HERE!!!!!
- // MORE THAN FOUR SONGS CAN BE ADDED!!
- // JUST ADD ANOTHER BRACKET WITH NAME AND PATH
- // CATBOX.MOE IS RECOMMENDED FOR UPLOADING MP3 FILES
- let track_list = [
- {
- name:"SMARTPHONE by YENA",
- path:"https://dl.dropbox.com/scl/fi/7f27upbvczxjah7gqospf/02-SMARTPHONE.m4a?rlkey=oo50gl8zdzgkqt7co12zkedu4&dl=0.mp3"
- },
- {
- name:"WithOrWithOutYou by YENA",
- path:"https://dl.dropbox.com/scl/fi/otydr1c3kjwiaa9ra3qqt/03-WithOrWithOut.m4a?rlkey=kwld60fozwdae1zaq66cajoxp&dl=0.mp3"
- },
- {
- name:"Lemon-Aid by YENA",
- path:"https://dl.dropbox.com/scl/fi/23iz8g83krys9lu7xr7s9/04-Lemon-Aid.m4a?rlkey=js3cvl4fvkl8ez427kwlspmzv&dl=0.mp3"
- },
- ];
- function loadTrack(track_index) {
- clearInterval(updateTimer);
- resetValues();
- // Load a new track
- curr_track.src = track_list[track_index].path;
- curr_track.load();
- // Set an interval of 1000 milliseconds for updating the seek slider
- updateTimer = setInterval(seekUpdate, 1000);
- // Move to the next track if the current one finishes playing
- curr_track.addEventListener("ended", nextTrack);
- }
- // Reset Values
- function resetValues() {
- curr_time.textContent = "0:00";
- total_duration.textContent = "0:00";
- seek_slider.value = 0;
- }
- function playpauseTrack() {
- if (!isPlaying) playTrack();
- else pauseTrack();
- }
- function playTrack() {
- curr_track.play();
- isPlaying = true;
- // Replace icon with the pause icon
- playpause_btn.innerHTML = '<i class="ph-pause-fill" style="color: #000"></i>';
- }
- function pauseTrack() {
- curr_track.pause();
- isPlaying = false;
- // Replace icon with the play icon
- playpause_btn.innerHTML = '<i class="ph-play-fill" style="color: #000"></i>';
- }
- function nextTrack() {
- if (track_index < track_list.length - 1)
- track_index += 1;
- else track_index = 0;
- loadTrack(track_index);
- playTrack();
- }
- function prevTrack() {
- if (track_index > 0)
- track_index -= 1;
- else track_index = track_list.length;
- loadTrack(track_index);
- playTrack();
- }
- function seekTo() {
- seekto = curr_track.duration * (seek_slider.value / 100);
- curr_track.currentTime = seekto;
- }
- function seekUpdate() {
- let seekPosition = 0;
- // Check if the current track duration is a legible number
- if (!isNaN(curr_track.duration)) {
- seekPosition = curr_track.currentTime * (100 / curr_track.duration);
- seek_slider.value = seekPosition;
- // Calculate the time left and the total duration
- let currentMinutes = Math.floor(curr_track.currentTime / 60);
- let currentSeconds = Math.floor(curr_track.currentTime - currentMinutes * 60);
- let durationMinutes = Math.floor(curr_track.duration / 60);
- let durationSeconds = Math.floor(curr_track.duration - durationMinutes * 60);
- // Adding a zero to the single digit time values
- if (currentSeconds < 10) { currentSeconds = "0" + currentSeconds; }
- if (durationSeconds < 10) { durationSeconds = "0" + durationSeconds; }
- if (currentMinutes < 10) { currentMinutes = currentMinutes; }
- if (durationMinutes < 10) { durationMinutes = durationMinutes; }
- curr_time.textContent = currentMinutes + ":" + currentSeconds;
- total_duration.textContent = durationMinutes + ":" + durationSeconds;
- }
- }
- // Load the first track in the tracklist
- loadTrack(track_index);
- </script>
- </body>
Add Comment
Please, Sign In to add comment