-
Notifications
You must be signed in to change notification settings - Fork 0
/
musicPlayer.html
73 lines (64 loc) · 3.14 KB
/
musicPlayer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="musicStyle.css">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<link rel="stylesheet" href="mediaelementplayer.min.css">
<title>MusicPlayer</title>
<script>
function changeSource() {
var audioSource = document.getElementById('inputFile').files[0].name;
var audio = document.getElementById('audioPlayer');
audio.src = audioSource;
}
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Home</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link active" href="weather.html">WeatherApp<span class="sr-only">(current)</span></a>
<a class="nav-item nav-link" href="musicPlayer.html">MusicPlayer</a>
<a class="nav-item nav-link" href="musicPlayer.html">App-3</a>
</div>
</div>
</nav>
<div class="input-group mb-3">
<div class="custom-file">
<input type="file" class="custom-file-input" id="inputFile">
<label class="custom-file-label" for="inputGroupFile02" aria-describedby="inputGroupFileAddon02">Choose file</label>
</div>
<div class="input-group-append">
<button type="button" class="btn btn-primary" onclick="changeSource()">Play</button>
</div>
</div>
<div class="contain">
<div class="container">
<div class="music-player">
<div class="cover">
<img src="14625.png" alt="">
</div>
<div class="titre">
<h3 id="artist">Artist</h3>
<h1 id="songName">Stole the show</h1>
</div>
<div class="lecteur">
<audio style="width: 100%;" class="fc-media" id="audioPlayer">
<source src="kygo-stole-the-show.mp3" type="audio/mp3"/>
</audio>
</div>
</div>
</div>
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.7/mediaelement-and-player.min.js'></script>
<script src="musicPlayer.js"></script>
</body>
</html>