mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
opt img placeholder opt player gesture opt pref tweaks Signed-off-by: dom <githubaccount56556@proton.me>
53 lines
789 B
Dart
53 lines
789 B
Dart
sealed class DanmakuExtra {
|
|
Object get mid;
|
|
Object get id;
|
|
|
|
const DanmakuExtra();
|
|
}
|
|
|
|
class VideoDanmaku extends DanmakuExtra {
|
|
@override
|
|
final int id;
|
|
@override
|
|
final String mid;
|
|
|
|
int like;
|
|
|
|
bool isLike;
|
|
|
|
VideoDanmaku({
|
|
required this.id,
|
|
required this.mid,
|
|
this.like = 0,
|
|
this.isLike = false,
|
|
});
|
|
}
|
|
|
|
class LiveDanmaku extends DanmakuExtra {
|
|
@override
|
|
final Object id;
|
|
@override
|
|
final Object mid;
|
|
|
|
final int dmType;
|
|
|
|
final Object ts;
|
|
final Object ct;
|
|
|
|
const LiveDanmaku({
|
|
required this.id,
|
|
required this.mid,
|
|
required this.dmType,
|
|
required this.ts,
|
|
required this.ct,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() => <String, dynamic>{
|
|
'id': id,
|
|
'mid': mid,
|
|
'dm_type': dmType,
|
|
'ts': ts,
|
|
'ct': ct,
|
|
};
|
|
}
|