Merge branch 'develop' into feature/stream
This commit is contained in:
commit
f27bb3bbb9
2 changed files with 14 additions and 0 deletions
|
@ -265,6 +265,9 @@ class VideoDownload
|
|||
}
|
||||
|
||||
$video = $this->getJSON($url, $format, $password);
|
||||
if (in_array($video->protocol, ['m3u8', 'm3u8_native'])) {
|
||||
throw(new \Exception('Conversion of M3U8 files is not supported.'));
|
||||
}
|
||||
|
||||
//Vimeo needs a correct user-agent
|
||||
ini_set(
|
||||
|
|
|
@ -330,4 +330,15 @@ class VideoDownloadTest extends \PHPUnit_Framework_TestCase
|
|||
$config->rtmpdump = 'foobar';
|
||||
$this->download->getAudioStream($url, $format);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test getAudioStream function with a M3U8 file.
|
||||
*
|
||||
* @return void
|
||||
* @expectedException Exception
|
||||
*/
|
||||
public function testGetAudioStreamM3uError()
|
||||
{
|
||||
$this->download->getAudioStream('https://twitter.com/verge/status/813055465324056576/video/1', 'best');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue