mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Receivers: Fixed protocol v3 volume field in play message
This commit is contained in:
parent
1bc8e15406
commit
920bde9179
2 changed files with 2 additions and 2 deletions
|
@ -71,7 +71,7 @@ function onPlayerLoad(value: PlayMessage) {
|
|||
player.setPlaybackRate(value.speed);
|
||||
playerCtrlStateUpdate(PlayerControlEvent.SetPlaybackRate);
|
||||
}
|
||||
if (value.volume) {
|
||||
if (value.volume !== null && value.volume >= 0) {
|
||||
volumeChangeHandler(value.volume);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -165,7 +165,7 @@ export class Main {
|
|||
// Protocol v2 FCast PlayMessage does not contain volume field and could result in the receiver
|
||||
// getting out-of-sync with the sender when player windows are closed and re-opened. Volume
|
||||
// is cached in the play message when volume is not set in v3 PlayMessage.
|
||||
message.volume = message.volume || message.volume === undefined ? Main.cache.playerVolume : message.volume;
|
||||
message.volume = message.volume === undefined ? Main.cache.playerVolume : message.volume;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
let rendererMessage: any = await NetworkService.proxyPlayIfRequired(message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue