DJ Junior

2.25 2.25 bip1 bip2
2.25 2.25 bip3 bip4
2.25 2.25 bip5 bip6

// SONS
var son1= new Audio();
son1.src = "sound/dino.mp3";
var son2= new Audio();
son2.src = "sound/cloche.mp3";
var son3= new Audio();
son3.src = "sound/money.mp3";
var son4= new Audio();
son4.src = "sound/jap.mp3";
var son5= new Audio();
son5.src = "sound/street.mp3";
var son6= new Audio();
son6.src = "sound/alarm.mp3";

// MUSIQUE
var mus1 = new Audio();
mus1.src = "music/love.mp3";
var mus2 = new Audio();
mus2.src = "music/peace.mp3";
var mus3 = new Audio();
mus3.src = "music/teuf.mp3";
// PLAYLIST
let playlist = [mus1,mus2,mus3,son1,son2,son3,son4,son5,son6];
// BTN MUSIC
var m1 = document.getElementById("m1");
var m2 = document.getElementById("m2");
var m3 = document.getElementById("m3");

// PLAY/PAUSE
function playPause(mus,m){
	if(mus.paused){
			mus.play();
			m.innerHTML = '< i style="color:orangered" class="fa fa-play" aria-hidden="true">';
		} else {
			mus.pause();
			m.innerHTML = '< i class="fa fa-pause" aria-hidden="true">';
		}
}
// STOP MUSIQUE
function stopMusic(mus,m){
	mus.pause();
	mus.currentTime = 0;
	m.innerHTML = '< i class="fa fa-play" aria-hidden="true">';
}

	// BACK 3sec MUSIQUE
	function backMusic(mus) {
		mus.currentTime -= 2.25;
	}
	// FORWARD 3sec MUSIQUE
	function fordMusic(mus) {
		mus.currentTime += 2.25;
	}

// VITESSE
function changeSpeed(event){
	playlist.forEach((e)=>{
		e.playbackRate = event.target.value;
	});
}

// VOLUME
	function setvolume() {

		playlist.forEach((e)=>{
			e.volume = vol.value / 100;
		});

		let vold = vol.value / 100;
		document.getElementById('vol%').innerHTML = (vold.toFixed(1))*100 + "%";
	}