mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-03 04:28:31 +01:00
wip
This commit is contained in:
@@ -343,6 +343,12 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
|
|||||||
// TODO: ??
|
// TODO: ??
|
||||||
} else if (json.MessageType === "ForceKeepAlive") {
|
} else if (json.MessageType === "ForceKeepAlive") {
|
||||||
// TODO: ??
|
// TODO: ??
|
||||||
|
} else if (json.MessageType === "SyncPlayCommand") {
|
||||||
|
console.log("SyncPlayCommand ~", command);
|
||||||
|
if (command === "Stop") {
|
||||||
|
console.log("Command ~ Stop");
|
||||||
|
stopPlayback();
|
||||||
|
}
|
||||||
} else if (json.MessageType === "SyncPlayGroupUpdate") {
|
} else if (json.MessageType === "SyncPlayGroupUpdate") {
|
||||||
if (!api) return;
|
if (!api) return;
|
||||||
|
|
||||||
@@ -379,14 +385,14 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
|
|||||||
pauseVideo();
|
pauseVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
// getSyncPlayApi(api).syncPlayReady({
|
getSyncPlayApi(api).syncPlayReady({
|
||||||
// readyRequestDto: {
|
readyRequestDto: {
|
||||||
// IsPlaying: data.IsPlaying,
|
IsPlaying: data.IsPlaying,
|
||||||
// PositionTicks: data.StartPositionTicks,
|
PositionTicks: data.StartPositionTicks,
|
||||||
// PlaylistItemId: currentlyPlaying?.item.Id,
|
PlaylistItemId: currentlyPlaying?.item.Id,
|
||||||
// When: new Date().toISOString(),
|
When: new Date().toISOString(),
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ export type SyncPlayCommandData = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type StateUpdateData = {
|
export type StateUpdateData = {
|
||||||
|
State: "Waiting" | "Playing" | "Paused";
|
||||||
Reason: "Pause" | "Unpause";
|
Reason: "Pause" | "Unpause";
|
||||||
State: "Waiting" | "Playing";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GroupJoinedData = {
|
export type GroupJoinedData = {
|
||||||
|
|||||||
Reference in New Issue
Block a user