From 25b694d1db4431985d33bc6567c78e7f3c773816 Mon Sep 17 00:00:00 2001
From: Vanilagy <1696106+Vanilagy@users.noreply.github.com>
Date: Tue, 17 Jun 2025 11:00:05 +0200
Subject: [PATCH] Fix BBB trimmed link
---
examples/file-compression/file-compression.ts | 3 +++
examples/file-compression/index.html | 2 +-
examples/media-player/index.html | 2 +-
examples/media-player/media-player.ts | 3 +++
examples/metadata-extraction/index.html | 2 +-
examples/metadata-extraction/metadata-extraction.ts | 3 +++
examples/thumbnail-generation/index.html | 2 +-
examples/thumbnail-generation/thumbnail-generation.ts | 3 +++
tsconfig.vite.json | 1 +
9 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/examples/file-compression/file-compression.ts b/examples/file-compression/file-compression.ts
index 047925f..57a1572 100644
--- a/examples/file-compression/file-compression.ts
+++ b/examples/file-compression/file-compression.ts
@@ -9,6 +9,9 @@ import {
QUALITY_VERY_LOW,
} from 'mediabunny';
+import SampleFileUrl from '../../assets/big-buck-bunny-trimmed.mp4';
+(document.querySelector('#sample-file-download') as HTMLAnchorElement).href = SampleFileUrl;
+
const selectMediaButton = document.querySelector('button') as HTMLButtonElement;
const fileNameElement = document.querySelector('#file-name') as HTMLParagraphElement;
const horizontalRule = document.querySelector('hr') as HTMLHRElement;
diff --git a/examples/file-compression/index.html b/examples/file-compression/index.html
index 4d2b446..46edbe1 100644
--- a/examples/file-compression/index.html
+++ b/examples/file-compression/index.html
@@ -19,7 +19,7 @@
Select media file
-
+
diff --git a/examples/media-player/index.html b/examples/media-player/index.html
index dc5c2a8..b32f551 100644
--- a/examples/media-player/index.html
+++ b/examples/media-player/index.html
@@ -19,7 +19,7 @@
Select media file
-
+
diff --git a/examples/media-player/media-player.ts b/examples/media-player/media-player.ts
index 24ad66f..8b3a800 100644
--- a/examples/media-player/media-player.ts
+++ b/examples/media-player/media-player.ts
@@ -8,6 +8,9 @@ import {
WrappedCanvas,
} from 'mediabunny';
+import SampleFileUrl from '../../assets/big-buck-bunny-trimmed.mp4';
+(document.querySelector('#sample-file-download') as HTMLAnchorElement).href = SampleFileUrl;
+
const selectMediaButton = document.querySelector('button') as HTMLButtonElement;
const fileNameElement = document.querySelector('#file-name') as HTMLParagraphElement;
const horizontalRule = document.querySelector('hr') as HTMLHRElement;
diff --git a/examples/metadata-extraction/index.html b/examples/metadata-extraction/index.html
index 7ac9899..236c671 100644
--- a/examples/metadata-extraction/index.html
+++ b/examples/metadata-extraction/index.html
@@ -19,7 +19,7 @@
Select media file
-
+
diff --git a/examples/metadata-extraction/metadata-extraction.ts b/examples/metadata-extraction/metadata-extraction.ts
index feb86d0..eb6d2cf 100644
--- a/examples/metadata-extraction/metadata-extraction.ts
+++ b/examples/metadata-extraction/metadata-extraction.ts
@@ -1,5 +1,8 @@
import { Input, ALL_FORMATS, BlobSource } from 'mediabunny';
+import SampleFileUrl from '../../assets/big-buck-bunny-trimmed.mp4';
+(document.querySelector('#sample-file-download') as HTMLAnchorElement).href = SampleFileUrl;
+
const selectMediaButton = document.querySelector('button') as HTMLButtonElement;
const fileNameElement = document.querySelector('#file-name') as HTMLParagraphElement;
const horizontalRule = document.querySelector('hr') as HTMLHRElement;
diff --git a/examples/thumbnail-generation/index.html b/examples/thumbnail-generation/index.html
index 925e8b7..a913063 100644
--- a/examples/thumbnail-generation/index.html
+++ b/examples/thumbnail-generation/index.html
@@ -19,7 +19,7 @@
Select media file
-
+
diff --git a/examples/thumbnail-generation/thumbnail-generation.ts b/examples/thumbnail-generation/thumbnail-generation.ts
index 1d84498..797352a 100644
--- a/examples/thumbnail-generation/thumbnail-generation.ts
+++ b/examples/thumbnail-generation/thumbnail-generation.ts
@@ -1,5 +1,8 @@
import { Input, ALL_FORMATS, BlobSource, CanvasSink } from 'mediabunny';
+import SampleFileUrl from '../../assets/big-buck-bunny-trimmed.mp4';
+(document.querySelector('#sample-file-download') as HTMLAnchorElement).href = SampleFileUrl;
+
const selectMediaButton = document.querySelector('button') as HTMLButtonElement;
const fileNameElement = document.querySelector('#file-name') as HTMLParagraphElement;
const horizontalRule = document.querySelector('hr') as HTMLHRElement;
diff --git a/tsconfig.vite.json b/tsconfig.vite.json
index 1961365..dbd4542 100644
--- a/tsconfig.vite.json
+++ b/tsconfig.vite.json
@@ -8,6 +8,7 @@
"paths": {
"mediabunny": ["./dist/mediabunny.d.ts"],
},
+ "types": ["vite/client"]
},
"include": [
"./vite.config.ts",