feat: adopt IINA-style playback window
This commit is contained in:
@@ -748,6 +748,16 @@ bool player_seek(Player *player, double seconds) {
|
||||
bool player_close(Player *player) {
|
||||
return submit(player, [=] { return player->enqueue({Action::Close, {}}); });
|
||||
}
|
||||
bool player_set_volume(Player *player, float normalized0to1) {
|
||||
if (!std::isfinite(normalized0to1) || normalized0to1 < 0 || normalized0to1 > 1) return false;
|
||||
return submit(player, [=] {
|
||||
player->output.set_volume(normalized0to1);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
float player_get_volume(Player *player) {
|
||||
return player ? player->output.volume() : 0;
|
||||
}
|
||||
PlayerState player_get_state(Player *player) {
|
||||
try {
|
||||
if (player) {
|
||||
|
||||
Reference in New Issue
Block a user