forked from suvelocity/Mp3PlayerTask
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
107 lines (96 loc) · 1.71 KB
/
index.js
File metadata and controls
107 lines (96 loc) · 1.71 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
const player = {
songs: [
{
id: 1,
title: 'Vortex',
album: 'Wallflowers',
artist: 'Jinjer',
duration: 242,
},
{
id: 2,
title: 'Vinda',
album: 'Godtfolk',
artist: 'Songleikr',
duration: 160,
},
{
id: 7,
title: 'Shiroyama',
album: 'The Last Stand',
artist: 'Sabaton',
duration: 213,
},
{
id: 3,
title: 'Thunderstruck',
album: 'The Razors Edge',
artist: 'AC/DC',
duration: 292,
},
{
id: 4,
title: 'All is One',
album: 'All is One',
artist: 'Orphaned Land',
duration: 270,
},
{
id: 5,
title: 'As a Stone',
album: 'Show Us What You Got',
artist: 'Full Trunk',
duration: 259,
},
],
playlists: [
{ id: 1, name: 'Metal', songs: [1, 7, 4] },
{ id: 5, name: 'Israeli', songs: [4, 5] },
],
playSong(song) {
console.log(/* your code here */)
},
}
function playSong(id) {
// your code here
}
function removeSong(id) {
// your code here
}
function addSong(title, album, artist, duration, id) {
// your code here
}
function removePlaylist(id) {
// your code here
}
function createPlaylist(name, id) {
// your code here
}
function playPlaylist(id) {
// your code here
}
function editPlaylist(playlistId, songId) {
// your code here
}
function playlistDuration(id) {
// your code here
}
function searchByQuery(query) {
// your code here
}
function searchByDuration(duration) {
// your code here
}
module.exports = {
player,
playSong,
removeSong,
addSong,
removePlaylist,
createPlaylist,
playPlaylist,
editPlaylist,
playlistDuration,
searchByQuery,
searchByDuration,
}