Skip to content

Instantly share code, notes, and snippets.

@Security2431
Last active April 1, 2025 19:35
Show Gist options
  • Save Security2431/2b28f17e11870bb4b0e347673e16d5ba to your computer and use it in GitHub Desktop.
Save Security2431/2b28f17e11870bb4b0e347673e16d5ba to your computer and use it in GitHub Desktop.
shaka-player 4.3.4.patch
{
"scripts": {
"postinstall": "patch-package"
},
"devDependencies": {
"patch-package": "6.5.1",
"shaka-player": "4.3.4"
}
}
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;
@mevljas
Copy link

mevljas commented Sep 16, 2024

@enjikaka's patch didn't work for me because of different paths so I modified it:

shaka-player+4.11.1.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 ba937d653c8927987fc86d28fdac35002baaed8c..164ec3490b0b84551931e3d1afc83d66dfc03ec5 100644
--- a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
@@ -5108,3 +5108,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 b5d4d89cdc6012c3124ee9e93e7f52684df460d4..dfa473f25a185dc03fe8253317fc6676d56285ef 100644
--- a/node_modules/shaka-player/dist/shaka-player.ui.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.ui.d.ts
@@ -5821,3 +5821,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/index.d.ts b/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..86130b219f20157404545f817f41485ab13ced25
--- /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 0000000000000000000000000000000000000000..e5c05d687e22014d4ba6bbdd4bf73e62b67b0ad6
--- /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;

@mevljas
Copy link

mevljas commented Sep 27, 2024

Has anyone prepared a patch for the latest version? :)

@Security2431
Copy link
Author

Hi @mevljas, thanks for contributing! I'm surprised to see that there have been so many versions released below. I'm curious, is there a reason why this bug hasn't been fixed yet?

@mevljas
Copy link

mevljas commented Sep 27, 2024

I think it's because Shaka currently doesn't officially support TS and we're all waiting for the official support sometime next year.

@Security2431
Copy link
Author

Gotchu, let's keep fingers crossed 🤞

@ts-sebastjanmevlja
Copy link

ts-sebastjanmevlja commented Oct 1, 2024

shaka-player+4.11.7.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 19c0930..cc0a3fd 100644
--- a/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.compiled.d.ts
@@ -5117,3 +5117,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 1618ca0..a6076c6 100644
--- a/node_modules/shaka-player/dist/shaka-player.ui.d.ts
+++ b/node_modules/shaka-player/dist/shaka-player.ui.d.ts
@@ -5830,3 +5830,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

@Security2431
Copy link
Author

Appreciate @ts-sebastjanmevlja

@mevljas
Copy link

mevljas commented Oct 28, 2024

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

@mevljas
Copy link

mevljas commented Dec 9, 2024

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

@mevljas
Copy link

mevljas commented Jan 23, 2025

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

@Pranav1703
Copy link

Thank You, @mevljas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment