state(); if ($data) { foreach ($data as $k => $v) { $handle = new Handle(); $data = $handle->get($v['id']); } } return 'yes'; } # 定时获取 所有的直播视频的回放地址 public function getUrl() { $video = Dever::config('base', 'live')->video; $data = Dever::db($video['table'])->state(); if ($data) { $time = time(); foreach ($data as $k => $v) { if ($v[$video['stream_id']] > 0 && !$v[$video['url_m3u8']] && $v[$video['sdate']] > 0 && $v[$video['edate']] > 0 && $time >= $v[$video['edate']]) { $info = Dever::db('live/stream')->one($v[$video['stream_id']]); $config = Dever::db('live/info')->one($info['live_id']); $handle = new Handle(); $method = $handle->method($config); $handle->createUrlOne($v, $video, $method, $config, $info); } } } return 'yes'; } }