Last active
August 25, 2025 08:28
-
-
Save Security2431/2b28f17e11870bb4b0e347673e16d5ba to your computer and use it in GitHub Desktop.
shaka-player 4.3.4.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "scripts": { | |
| "postinstall": "patch-package" | |
| }, | |
| "devDependencies": { | |
| "patch-package": "6.5.1", | |
| "shaka-player": "4.3.4" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts | |
| index e8cb5c3..08e6c9a 100644 | |
| --- a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts | |
| +++ b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts | |
| @@ -4468,3 +4468,5 @@ declare namespace ಠ_ಠ.clutz { | |
| static isTypeSupported (keySystem : string , contentType : string ) : boolean ; | |
| } | |
| } | |
| + | |
| +export default shaka; | |
| \ No newline at end of file | |
| diff --git a/node_modules/shaka-player/dist/shaka-player.ui.d.ts b/node_modules/shaka-player/dist/shaka-player.ui.d.ts | |
| index 6dbd94e..0ad95ab 100644 | |
| --- a/node_modules/shaka-player/dist/shaka-player.ui.d.ts | |
| +++ b/node_modules/shaka-player/dist/shaka-player.ui.d.ts | |
| @@ -5054,3 +5054,5 @@ declare namespace shaka.extern { | |
| declare namespace shaka.extern { | |
| type UIVolumeBarColors = { base : string , level : string } ; | |
| } | |
| + | |
| +export default shaka; | |
| \ No newline at end of file | |
| diff --git a/node_modules/shaka-player/index.d.ts b/node_modules/shaka-player/index.d.ts | |
| new file mode 100644 | |
| index 0000000..86130b2 | |
| --- /dev/null | |
| +++ b/node_modules/shaka-player/index.d.ts | |
| @@ -0,0 +1,2 @@ | |
| +/// <reference path="./dist/shaka-player.compiled.d.ts" /> | |
| +/// <reference path="./dist/shaka-player.ui.d.ts" /> | |
| diff --git a/node_modules/shaka-player/ui.d.ts b/node_modules/shaka-player/ui.d.ts | |
| new file mode 100644 | |
| index 0000000..7471371 | |
| --- /dev/null | |
| +++ b/node_modules/shaka-player/ui.d.ts | |
| @@ -0,0 +1,3 @@ | |
| +import shaka from 'shaka-player/dist/shaka-player.ui' | |
| +export * from 'shaka-player/dist/shaka-player.ui' | |
| +export default shaka; |
Appreciate @ts-sebastjanmevlja
shaka-player+4.11.10.patch
diff --git a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
index 30859d1..a8901ac 100644
--- a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
@@ -5128,3 +5128,5 @@ declare namespace shaka.extern {
declare namespace shaka.extern {
type TransmuxerPlugin = ( ) => shaka.extern.Transmuxer ;
}
+
+export default shaka;
diff --git a/node_modules/shaka-player/dist/shaka-player.ui.d.ts b/node_modules/shaka-player/dist/shaka-player.ui.d.ts
index 04130c8..8892116 100644
--- a/node_modules/shaka-player/dist/shaka-player.ui.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.ui.d.ts
@@ -5841,3 +5841,5 @@ declare namespace shaka.extern {
declare namespace shaka.extern {
type UIVolumeBarColors = { base : string , level : string } ;
}
+
+export default shaka;
diff --git a/node_modules/shaka-player/index.d.ts b/node_modules/shaka-player/index.d.ts
new file mode 100644
index 0000000..3ebfd96
--- /dev/null
+++ b/node_modules/shaka-player/index.d.ts
@@ -0,0 +1,2 @@
+/// <reference path="./dist/shaka-player.compiled.d.ts" />
+/// <reference path="./dist/shaka-player.ui.d.ts" />
\ No newline at end of file
diff --git a/node_modules/shaka-player/ui.d.ts b/node_modules/shaka-player/ui.d.ts
new file mode 100644
index 0000000..84a3be0
--- /dev/null
+++ b/node_modules/shaka-player/ui.d.ts
@@ -0,0 +1,3 @@
+import shaka from 'shaka-player/dist/shaka-player.ui'
+export * from 'shaka-player/dist/shaka-player.ui'
+export default shaka;
\ No newline at end of file
shaka-player+4.12.4.patch
diff --git a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
index a2248b6..484f115 100644
--- a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
@@ -5156,3 +5156,5 @@ declare namespace shaka.extern {
declare namespace shaka.extern {
type TransmuxerPlugin = ( ) => shaka.extern.Transmuxer ;
}
+
+export default shaka;
\ No newline at end of file
diff --git a/node_modules/shaka-player/dist/shaka-player.ui.d.ts b/node_modules/shaka-player/dist/shaka-player.ui.d.ts
index 4fdbd43..7aa663d 100644
--- a/node_modules/shaka-player/dist/shaka-player.ui.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.ui.d.ts
@@ -5869,3 +5869,5 @@ declare namespace shaka.extern {
declare namespace shaka.extern {
type UIVolumeBarColors = { base : string , level : string } ;
}
+
+export default shaka;
\ No newline at end of file
diff --git a/node_modules/shaka-player/index.d.ts b/node_modules/shaka-player/index.d.ts
new file mode 100644
index 0000000..3ebfd96
--- /dev/null
+++ b/node_modules/shaka-player/index.d.ts
@@ -0,0 +1,2 @@
+/// <reference path="./dist/shaka-player.compiled.d.ts" />
+/// <reference path="./dist/shaka-player.ui.d.ts" />
\ No newline at end of file
diff --git a/node_modules/shaka-player/ui.d.ts b/node_modules/shaka-player/ui.d.ts
new file mode 100644
index 0000000..84a3be0
--- /dev/null
+++ b/node_modules/shaka-player/ui.d.ts
@@ -0,0 +1,3 @@
+import shaka from 'shaka-player/dist/shaka-player.ui'
+export * from 'shaka-player/dist/shaka-player.ui'
+export default shaka;
\ No newline at end of file
shaka-player+4.13.0.patch
diff --git a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
index 0971e58..9d5c515 100644
--- a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
@@ -5266,3 +5266,5 @@ declare namespace shaka.extern {
declare namespace shaka.extern {
type TransmuxerPlugin = ( ) => shaka.extern.Transmuxer ;
}
+
+export default shaka;
diff --git a/node_modules/shaka-player/dist/shaka-player.ui.d.ts b/node_modules/shaka-player/dist/shaka-player.ui.d.ts
index 460e009..41bab00 100644
--- a/node_modules/shaka-player/dist/shaka-player.ui.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.ui.d.ts
@@ -6011,3 +6011,5 @@ declare namespace shaka.extern {
declare namespace shaka.ui.Watermark {
type Options = { alpha : number , color : string , displayDuration : number , interval : number , position : string , size : number , skip : number , text : string , transitionDuration : number , type : string } ;
}
+
+export default shaka;
diff --git a/node_modules/shaka-player/index.d.ts b/node_modules/shaka-player/index.d.ts
new file mode 100644
index 0000000..79f4829
--- /dev/null
+++ b/node_modules/shaka-player/index.d.ts
@@ -0,0 +1,2 @@
+<reference path="./dist/shaka-player.compiled.d.ts" />
+<reference path="./dist/shaka-player.ui.d.ts" />
\ No newline at end of file
diff --git a/node_modules/shaka-player/ui.d.ts b/node_modules/shaka-player/ui.d.ts
new file mode 100644
index 0000000..84a3be0
--- /dev/null
+++ b/node_modules/shaka-player/ui.d.ts
@@ -0,0 +1,3 @@
+import shaka from 'shaka-player/dist/shaka-player.ui'
+export * from 'shaka-player/dist/shaka-player.ui'
+export default shaka;
\ No newline at end of file
Thank You, @mevljas
So, as a user how do I import it? Like this? import shaka from 'shaka-player/dist/shaka-player.compiled'
@opticSquid you may use it regularly as import shaka from 'shaka-player';. See the How to use? section https://gist.github.com/Security2431/2b28f17e11870bb4b0e347673e16d5ba?permalink_comment_id=4455738#gistcomment-4455738
shaka-player+4.14.13.patch (without UI)
diff --git a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
index 8cc02c8..9e9d586 100644
--- a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
@@ -5354,3 +5354,5 @@ declare namespace shaka.extern {
declare namespace shaka.extern {
type TransmuxerPlugin = ( ) => shaka.extern.Transmuxer ;
}
+
+export default shaka;
\ No newline at end of file
diff --git a/node_modules/shaka-player/index.d.ts b/node_modules/shaka-player/index.d.ts
new file mode 100644
index 0000000..f02e80e
--- /dev/null
+++ b/node_modules/shaka-player/index.d.ts
@@ -0,0 +1 @@
+export default shaka;
\ No newline at end of file
Thank you @mevljas
If and when possible, could you please produce the "including UI" updated patch version?
Thanks in advance.
I wrote a Bash script for the patch generation:
#!/bin/bash
# This script is used ONLY when updating the shaka-player package.
# It removes the old patch, installs the new shaka-player version, patches for TypeScript, and generates a new patch file using patch-package.
set -e
SHAKA_DIR="node_modules/shaka-player"
DIST_DTS="$SHAKA_DIR/dist/shaka-player.compiled.d.ts"
INDEX_DTS="$SHAKA_DIR/index.d.ts"
PATCHES_DIR="patches"
# 1. Remove old patch file(s) for shaka-player
echo "Removing old shaka-player patch files..."
find "$PATCHES_DIR" -name 'shaka-player+*.patch' -delete
echo "Installing dependencies (including new shaka-player)..."
# 2. Install the new shaka-player version (ensure package.json is updated as needed)
npm install
# 3. Remove old index.d.ts if exists
echo "Cleaning up old index.d.ts if present..."
if [ -f "$INDEX_DTS" ]; then
rm "$INDEX_DTS"
fi
# 4. Manually patch shaka-player.compiled.d.ts to add export default shaka;
echo "Patching shaka-player.compiled.d.ts for TypeScript export..."
if ! grep -q "export default shaka;" "$DIST_DTS"; then
echo -e "\nexport default shaka;" >> "$DIST_DTS"
fi
# 5. Create index.d.ts to re-export shaka for TypeScript
echo "Creating index.d.ts for TypeScript consumers..."
cat <<EOT > "$INDEX_DTS"
export default shaka;
EOT
# 6. Use patch-package to generate a patch for shaka-player
echo "Generating new patch file with patch-package..."
npx patch-package shaka-player --patch-dir "$PATCHES_DIR"
echo "Done! New patch file created in $PATCHES_DIR using patch-package."
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
shaka-player+4.11.7.patch