diff --git a/src/main/main.ts b/src/main/main.ts
index 295c0d75..1cadcebd 100644
--- a/src/main/main.ts
+++ b/src/main/main.ts
@@ -20,13 +20,6 @@ import {
WSClient,
} from "@main/services";
import { migrateDownloadSources } from "./helpers/migrate-download-sources";
-import path from "node:path";
-
-const helloAddon = require(
- path.join(__dirname, "..", "..", "native_build", "hello_napi.node")
-);
-
-console.log(helloAddon.hello());
export const loadState = async () => {
await Lock.acquireLock();
diff --git a/src/renderer/src/pages/game-details/gallery-slider/gallery-slider.tsx b/src/renderer/src/pages/game-details/gallery-slider/gallery-slider.tsx
index c9658636..56912fcc 100644
--- a/src/renderer/src/pages/game-details/gallery-slider/gallery-slider.tsx
+++ b/src/renderer/src/pages/game-details/gallery-slider/gallery-slider.tsx
@@ -100,20 +100,48 @@ export function GallerySlider() {
src?: string;
poster?: string;
videoSrc?: string;
+ videoType?: string;
alt: string;
}> = [];
if (shopDetails?.movies) {
shopDetails.movies.forEach((video, index) => {
- items.push({
- id: String(video.id),
- type: "video",
- poster: video.thumbnail,
- videoSrc: video.mp4.max.startsWith("http://")
- ? video.mp4.max.replace("http://", "https://")
- : video.mp4.max,
- alt: t("video", { number: String(index + 1) }),
- });
+ // Prefer new formats: HLS (best browser support), then DASH H264, then DASH AV1
+ // Fallback to old format: mp4/webm if new formats are not available
+ let videoSrc: string | undefined;
+ let videoType: string | undefined;
+
+ if (video.hls_h264) {
+ videoSrc = video.hls_h264;
+ videoType = "application/x-mpegURL";
+ } else if (video.dash_h264) {
+ videoSrc = video.dash_h264;
+ videoType = "application/dash+xml";
+ } else if (video.dash_av1) {
+ videoSrc = video.dash_av1;
+ videoType = "application/dash+xml";
+ } else if (video.mp4?.max) {
+ // Fallback to old format
+ videoSrc = video.mp4.max;
+ videoType = "video/mp4";
+ } else if (video.webm?.max) {
+ // Fallback to webm if mp4 is not available
+ videoSrc = video.webm.max;
+ videoType = "video/webm";
+ }
+
+ if (videoSrc) {
+ items.push({
+ id: String(video.id),
+ type: "video",
+ poster: video.thumbnail,
+ videoSrc: videoSrc.startsWith("http://")
+ ? videoSrc.replace("http://", "https://")
+ : videoSrc,
+ videoType,
+ alt: video.name || t("video", { number: String(index + 1) }),
+ });
+ }
});
}
@@ -172,7 +200,9 @@ export function GallerySlider() {
autoPlay={autoplayEnabled}
tabIndex={-1}
>
-
+ {item.videoSrc && (
+
+ )}
) : (
![]()