File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -310,6 +310,15 @@ class HybridPlayer {
310310 }
311311
312312 selectBestVideoStream ( formats ) {
313+ console . log ( `[HybridPlayer] Selecting video from ${ formats ?. length } formats` ) ;
314+ if ( formats && formats . length > 0 ) {
315+ console . log ( '[HybridPlayer] Sample format:' , JSON . stringify ( {
316+ mimeType : formats [ 0 ] . mimeType ,
317+ hasUrl : ! ! formats [ 0 ] . url ,
318+ hasCipher : ! ! ( formats [ 0 ] . signatureCipher || formats [ 0 ] . cipher )
319+ } ) ) ;
320+ }
321+
313322 const preferredQuality = configRead ( 'preferredVideoQuality' ) ;
314323 const h = ( preferredQuality === 'auto' || isNaN ( parseInt ( preferredQuality ) ) ) ? 1080 : parseInt ( preferredQuality ) ;
315324
Original file line number Diff line number Diff line change @@ -11,16 +11,16 @@ export const signatureDecrypter = {
1111 */
1212 decrypt ( format ) {
1313 if ( format . url ) return format ;
14- if ( ! format . signatureCipher ) return format ;
14+ const cipher = format . signatureCipher || format . cipher ;
15+ if ( ! cipher ) return format ;
1516
16- const cipher = format . signatureCipher ;
1717 const params = new URLSearchParams ( cipher ) ;
1818 const url = params . get ( 'url' ) ;
1919 const signature = params . get ( 's' ) ;
2020 const sp = params . get ( 'sp' ) || 'sig' ;
2121
2222 if ( ! url || ! signature ) {
23- console . warn ( '[SignatureDecrypter] Invalid cipher data' , format ) ;
23+ console . warn ( '[SignatureDecrypter] Invalid cipher data' , { hasUrl : ! ! url , hasSig : ! ! signature } ) ;
2424 return format ;
2525 }
2626
You can’t perform that action at this time.
0 commit comments