File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -848,6 +848,8 @@ export default defineComponent({
848
848
// // https://github.com/iv-org/invidious/pull/4589
849
849
// if (this.proxyVideos) {
850
850
851
+ this . streamingDataExpiryDate = this . extractExpiryDateFromStreamingUrl ( result . adaptiveFormats [ 0 ] . url )
852
+
851
853
let hlsManifestUrl = result . hlsUrl
852
854
853
855
if ( this . proxyVideos ) {
@@ -876,6 +878,8 @@ export default defineComponent({
876
878
} else {
877
879
this . videoLengthSeconds = result . lengthSeconds
878
880
881
+ this . streamingDataExpiryDate = this . extractExpiryDateFromStreamingUrl ( result . adaptiveFormats [ 0 ] . url )
882
+
879
883
this . legacyFormats = result . formatStreams . map ( mapInvidiousLegacyFormat )
880
884
881
885
if ( ! process . env . SUPPORTS_LOCAL_API || this . proxyVideos ) {
@@ -945,6 +949,12 @@ export default defineComponent({
945
949
} )
946
950
} ,
947
951
952
+ extractExpiryDateFromStreamingUrl : function ( url ) {
953
+ const expireString = new URL ( url ) . searchParams . get ( 'expire' )
954
+
955
+ return new Date ( parseInt ( expireString ) * 1000 )
956
+ } ,
957
+
948
958
/**
949
959
* @param {string } description
950
960
*/
You can’t perform that action at this time.
0 commit comments