We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46cf59b commit e8f27feCopy full SHA for e8f27fe
src/HLSPlaylist.php
@@ -107,12 +107,13 @@ private function getAudioBitrate(Representation $rep): int
107
private function getOriginalAudioBitrate(): int
108
{
109
try {
110
- return $this->hls
111
- ->getMedia()
112
- ->getStreams()
113
- ->audios()
114
- ->first()
115
- ->get('bit_rate', static::DEFAULT_AUDIO_BITRATE);
+ $audios = $this->hls->getMedia()->getStreams()->audios();
+
+ if (!$audios->count()){
+ return static::DEFAULT_AUDIO_BITRATE;
+ }
116
+ return $audios->first()->get('bit_rate', static::DEFAULT_AUDIO_BITRATE);
117
} catch (ExceptionInterface $e) {
118
return static::DEFAULT_AUDIO_BITRATE;
119
}
0 commit comments