mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 12:23:24 +00:00
chore: add selected audiotrack variable
This commit is contained in:
@@ -20,6 +20,7 @@ import { findHighestQuality } from "@movie-web/provider-utils";
|
|||||||
import { useBrightness } from "~/hooks/player/useBrightness";
|
import { useBrightness } from "~/hooks/player/useBrightness";
|
||||||
import { usePlayer } from "~/hooks/player/usePlayer";
|
import { usePlayer } from "~/hooks/player/usePlayer";
|
||||||
import { useVolume } from "~/hooks/player/useVolume";
|
import { useVolume } from "~/hooks/player/useVolume";
|
||||||
|
import { useAudioTrackStore } from "~/stores/audio";
|
||||||
import { usePlayerStore } from "~/stores/player/store";
|
import { usePlayerStore } from "~/stores/player/store";
|
||||||
import { Text } from "../ui/Text";
|
import { Text } from "../ui/Text";
|
||||||
import { CaptionRenderer } from "./CaptionRenderer";
|
import { CaptionRenderer } from "./CaptionRenderer";
|
||||||
@@ -53,6 +54,9 @@ export const VideoPlayer = () => {
|
|||||||
const isIdle = usePlayerStore((state) => state.interface.isIdle);
|
const isIdle = usePlayerStore((state) => state.interface.isIdle);
|
||||||
const stream = usePlayerStore((state) => state.interface.currentStream);
|
const stream = usePlayerStore((state) => state.interface.currentStream);
|
||||||
const audioTracks = usePlayerStore((state) => state.interface.audioTracks);
|
const audioTracks = usePlayerStore((state) => state.interface.audioTracks);
|
||||||
|
const _selectedAudioTrack = useAudioTrackStore(
|
||||||
|
(state) => state.selectedTrack,
|
||||||
|
);
|
||||||
const setVideoRef = usePlayerStore((state) => state.setVideoRef);
|
const setVideoRef = usePlayerStore((state) => state.setVideoRef);
|
||||||
const setStatus = usePlayerStore((state) => state.setStatus);
|
const setStatus = usePlayerStore((state) => state.setStatus);
|
||||||
const setIsIdle = usePlayerStore((state) => state.setIsIdle);
|
const setIsIdle = usePlayerStore((state) => state.setIsIdle);
|
||||||
@@ -146,7 +150,6 @@ export const VideoPlayer = () => {
|
|||||||
let url = null;
|
let url = null;
|
||||||
|
|
||||||
if (stream.type === "hls") {
|
if (stream.type === "hls") {
|
||||||
console.log(audioTracks);
|
|
||||||
url = stream.playlist;
|
url = stream.playlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user