fix: cast KeyRewriteLoader to any for TypeScript compatibility in VideoPlayer
- Updated the loader configuration in the HLS setup to ensure compatibility with TypeScript by casting KeyRewriteLoader to any. This change addresses type-checking issues while maintaining the functionality of key URL rewriting for HLS playback.
This commit is contained in:
@@ -395,7 +395,7 @@ function initPlayer(url: string) {
|
|||||||
hls = new Hls({
|
hls = new Hls({
|
||||||
enableWorker: true,
|
enableWorker: true,
|
||||||
lowLatencyMode: false,
|
lowLatencyMode: false,
|
||||||
loader: KeyRewriteLoader,
|
loader: KeyRewriteLoader as any,
|
||||||
// Attach auth tokens to key requests so paid content can be decrypted
|
// Attach auth tokens to key requests so paid content can be decrypted
|
||||||
xhrSetup(xhr: XMLHttpRequest, xhrUrl: string) {
|
xhrSetup(xhr: XMLHttpRequest, xhrUrl: string) {
|
||||||
if (xhrUrl.includes('/key')) {
|
if (xhrUrl.includes('/key')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user