diff options
-rw-r--r-- | index.php | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -470,7 +470,8 @@ if (isset($_GET['id'])) { 'fps' => $stream['fps'], 'resolution' => $stream['qualityLabel'], 'qualityLabel' => $stream['qualityLabel'], - 'format' => exformat($stream['itag']) + 'format' => exformat($stream['itag']), + 'size' => $stream['width'].'x'.$stream['height'], ); array_push($vdef, $values); } else { @@ -500,6 +501,7 @@ if (isset($_GET['id'])) { 'resolution' => $stream['qualityLabel'], 'qualityLabel' => $stream['qualityLabel'], 'format' => exformat($stream['itag']), + 'size' => $stream['width'].'x'.$stream['height'], ); array_push($vid, $values); } @@ -537,13 +539,14 @@ if (isset($_GET['id'])) { 'resolution' => $stream['qualityLabel'], 'qualityLabel' => $stream['qualityLabel'], 'format' => exformat($stream['itag']), + 'size' => $stream['width'].'x'.$stream['height'], ); array_push($vid, $values); } } } $json['adaptiveFormats'] = array_merge($vid, $aud); - $json['formatStreams']=$vdef; + $json['formatStreams'] = $vdef; // $json['audio']=$aud; // $json['video']=$vid; } else { @@ -552,12 +555,12 @@ if (isset($_GET['id'])) { $vid = array(); $json['adaptiveFormats'] = array_merge($vid, $aud); - $json['formatStreams']=$vdef; + $json['formatStreams'] = $vdef; // $json['audio']=$aud; // $json['video']=$vid; } - - echo json_encode($json, JSON_FORCE_OBJECT); + // echo json_encode($json, JSON_FORCE_OBJECT); + echo json_encode($json); // echo json_encode($streamin_data_json, JSON_FORCE_OBJECT); } else { $json = array( |