PlayerEvent.java
2.44 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
package com.wd.basemusic.domain;
import com.wd.basemusic.PlayingInfoManager;
import com.wd.foundation.bean.music.bean.dto.ChangeMusic;
import com.wd.foundation.bean.music.bean.dto.PlayingMusic;
/**
* Create by KunMinX at 2022/7/4
*/
public class PlayerEvent {
public final static int EVENT_CHANGE_MUSIC = 1;
public final static int EVENT_PROGRESS = 2;
public final static int EVENT_PLAY_STATUS = 3;
public final static int EVENT_REPEAT_MODE = 4;
/**
* 倒计时
* */
public final static int EVENT_COUNTDOWN = 5;
public final int eventId;
public final ChangeMusic changeMusic;
public final PlayingMusic playingMusic;
public final boolean toPause;
public boolean isend;
public final Enum<PlayingInfoManager.RepeatMode> repeatMode;
public PlayerEvent(int eventId,
ChangeMusic changeMusic,
PlayingMusic playingMusic,
boolean toPause,
Enum<PlayingInfoManager.RepeatMode> repeatMode) {
this.eventId = eventId;
this.changeMusic = changeMusic;
this.playingMusic = playingMusic;
this.toPause = toPause;
this.repeatMode = repeatMode;
}
public PlayerEvent(int eventId, ChangeMusic changeMusic) {
this.eventId = eventId;
this.changeMusic = changeMusic;
this.playingMusic = null;
this.toPause = true;
this.repeatMode = null;
}
public PlayerEvent(int eventId) {
this.eventId = eventId;
this.changeMusic = null;
this.playingMusic = null;
this.toPause = false;
this.repeatMode = null;
}
public PlayerEvent(int eventId, PlayingMusic playingMusic) {
this.eventId = eventId;
this.changeMusic = null;
this.playingMusic = playingMusic;
this.toPause = false;
this.repeatMode = null;
}
public PlayerEvent(int eventId, boolean toPause) {
this.eventId = eventId;
this.changeMusic = null;
this.playingMusic = null;
this.toPause = toPause;
this.repeatMode = null;
}
public PlayerEvent(int eventId, boolean toPause, boolean isend, PlayingMusic playingMusic) {
this.eventId = eventId;
this.changeMusic = null;
this.playingMusic = playingMusic;
this.toPause = toPause;
this.repeatMode = null;
this.isend = isend;
}
public PlayerEvent(int eventId, Enum<PlayingInfoManager.RepeatMode> repeatMode) {
this.eventId = eventId;
this.changeMusic = null;
this.playingMusic = null;
this.toPause = false;
this.repeatMode = repeatMode;
}
}