mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-19 02:34:17 +01:00
fix: app not reporting playback started on first start
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
||||
parseM3U8ForSubtitles,
|
||||
SubtitleTrack,
|
||||
} from "@/utils/hls/parseM3U8ForSubtitles";
|
||||
import { useRouter } from "expo-router";
|
||||
|
||||
export type CurrentlyPlayingState = {
|
||||
url: string;
|
||||
@@ -70,6 +71,8 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
|
||||
const [api] = useAtom(apiAtom);
|
||||
const [user] = useAtom(userAtom);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const videoRef = useRef<VideoRef | null>(null);
|
||||
|
||||
const [settings] = useSettings();
|
||||
@@ -326,6 +329,7 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
|
||||
} else if (command === "Stop") {
|
||||
console.log("Command ~ Stop");
|
||||
stopPlayback();
|
||||
router.canGoBack() && router.back();
|
||||
} else if (command === "Mute") {
|
||||
console.log("Command ~ Mute");
|
||||
setVolume(0);
|
||||
|
||||
Reference in New Issue
Block a user