title; $videoAuthor = $video_info->author; $videoDurationSecs = $video_info->lengthSeconds; $videoDuration = secToDuration( $videoDurationSecs ); $videoChannel = $video_info->author; // Begin_ViewCount $extract_video_view = $video_info->viewCount; $videoViews = bytes( $extract_video_view ); // End_ViewCount // change hqdefault.jpg to default.jpg for downgrading the thumbnail quality $videoThumbURL = "https://i1.ytimg.com/vi/{$video_id}/hqdefault.jpg"; $librethumb = $video_info->videoThumbnails[0]->url; // Extract videos from JSON $streamFormats = $video_info->formatStreams; // Downloads $downloads = $video_info->formatStreams; ///// Beaking DRM!!! // Check standar video into URL $url_standar = video_exists( $streamFormats[0]->url ); if ( $url_standar === FALSE ) { // nodes $node0 = "https://invidio.us/latest_version?id={$video_id}&itag=18&local=true"; $node1 = "https://invidious.snopyta.org/latest_version?id={$video_id}&itag=18&local=true"; // explain DRM $drmv = "https://archive.org/download/libreweb/rms-drm.webm"; $node0on = video_exists( $node0 ); $node1on = video_exists( $node1 ); // format video DRM $formatdrm = $streamFormats[0]->type; // check nodes if ( $node0on === TRUE ) { $breakurl = $node0; } elseif ( $node1on === TRUE ) { $breakurl = $node1; } else { $breakurl = $drmv; $formatdrm = 'video/webm'; } // liberty data $breakquality = trim( $streamFormats[0]->resolution, 'p' ); $breaklink = TRUE; $downloadFormat = $downloads[0]->container; $downloadQuality = $streamFormats[0]->resolution; $downloadbreak = TRUE; } else { // clean variables $breakurl = NULL; $breaklink = NULL; $breakquality = NULL; $downloadbreak = NULL; $downloadFormat = NULL; $downloadQuality = NULL; $formatdrm = NULL; } ///// End Beaking DRM!!! /* ---- ---- Generated URL and embed ---- ---- */ if ( isset( $_SERVER["HTTPS"] ) && $_SERVER["HTTPS"] == "on" ) { $pro = 'https'; } else { $pro = 'http'; } $subject = $pro."://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; // Local URL $local_url = preg_replace( '/index.php/', '', $subject ); /* ---- ---- Change to Freedom URL ---- ---- */ $url_freedom = "https://invidio.us/watch?v={$video_id}";