EduSoho v8.x 本地播放视频超时或者快进后网络错误导致视频下载中途失败。鉴权播放次数问题
文章转载于 https://m.zkdygl.com/d/223-edusoho-v8710
src/AppBundle/Twig/WebExtension.php
protected function makeToken($type, $fileId, $context = [])
{
$fields = [
'data' => [
'id' => $fileId,
],
'times' => 10, // // 修改这个参数即可,可以理解为鉴权次数
'duration' => 3600,
'userId' => $this->biz['user']['id'],
];
if (isset($context['watchTimeLimit'])) {
$fields['data']['watchTimeLimit'] = $context['watchTimeLimit'];
}
if (isset($context['hideBeginning'])) {
$fields['data']['hideBeginning'] = $context['hideBeginning'];
}
return $this->getTokenService()->makeToken($type, $fields);
}