getTempPathname() public method

임시 경로 이름 반환
public getTempPathname ( ) : string
return string
コード例 #1
0
 /**
  * 영상에서 snapshot 추출
  *
  * @param string $content    media content
  * @param int    $fromSecond 영상에서의 시간(초 단위)
  * @return string
  */
 public function getSnapshot($content, $fromSecond = 10)
 {
     $videoFile = $this->temp->create($content);
     $imgPathname = $this->temp->getTempPathname();
     $video = $this->ffmpeg->open($videoFile->getPathname());
     $video->frame(TimeCode::fromSeconds($fromSecond))->save($imgPathname);
     $imageContent = file_get_contents($imgPathname);
     $videoFile->destroy();
     @unlink($imgPathname);
     return $imageContent;
 }