-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
65 lines (52 loc) · 921 Bytes
/
test.js
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
var streamPlayback = require('./stream_manager.js').streamPlayback;
var playlist1 = [
{
aid: 1,
duration: 5
},
{
aid: 2,
duration: 10
},
{
aid: 3,
duration: 15
},
{
aid: 4,
duration: 10
}
];
var playlist2 = [
{
aid: 5,
duration: 10
},
{
aid: 3,
duration: 10
},
{
aid: 6,
duration: 10
},
{
aid: 7,
duration: 10
},
{
aid: 8,
duration: 10
}
];
var playlist3 = [
];
var stream = {
playlist: playlist1
};
streamPlayback.startPlaying(stream, 2, 100 * 1000);
console.log(stream);
console.log(streamPlayback.getPlayback(stream, 234 * 1000 ));
streamPlayback.updateActivePlaylist(stream, playlist3, 235 * 1000);
console.log(stream);
console.log(streamPlayback.getPlayback(stream, 236 * 1000 ));