|
@@ -398,9 +398,13 @@ JS
|
|
|
*/
|
|
|
private function autoGenerateCover($videoSrc)
|
|
|
{
|
|
|
- $cover = $videoSrc.'?x-oss-process=video/snapshot,t_2000,f_jpg,h_500,m_fast';
|
|
|
- $cover = CommonHelper::ossUrl($cover);
|
|
|
- $path = $this->upload($cover,'.jpg');
|
|
|
+ try {
|
|
|
+ $cover = $videoSrc.'?x-oss-process=video/snapshot,t_2000,f_jpg,h_500,m_fast';
|
|
|
+ $cover = CommonHelper::ossUrl($cover);
|
|
|
+ $path = $this->upload($cover,'.jpg');
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ $path = ['status'=>true,'path'=>'/static/common/images/no-image.jpg'];
|
|
|
+ }
|
|
|
return $path;
|
|
|
}
|
|
|
|