浏览量:131次
理解:播放器会对本地视频在数据丢失时进行数据获取,每次消耗一次鉴权次数,次数为0是会出现播放出错的问题。 解决:因此修改这个次数即可,这里的代码没有做细致研究,可能存在错误
还是推荐大家使用云视频,如果需要阿里云、腾讯云视频点播的可以联系我,流量折合最低0.17每GB
文件: src/Biz/Player/Service/Impl/PlayerServiceImpl.php 函数:protected function makeToken(fileId, $context = array())
protectedfunctionmakeToken($type,$fileId,$context=array()){$fields=array('data'=>array('id'=>$fileId,),'times'=>10,//修改这个参数即可,可以理解为鉴权次数'duration'=>3600,'userId'=>$this->getCurrentUser()->getId(),);if(isset($context['watchTimeLimit'])){$fields['data']['watchTimeLimit']=$context['watchTimeLimit'];}if(isset($context['hideBeginning'])){$fields['data']['hideBeginning']=$context['hideBeginning'];}$token=$this->getTokenService()->makeToken($type,$fields);return$token;}[声明]本网转载网络媒体稿件是为了传播更多的信息,此类稿件不代表本网观点,本网不承担此类稿件侵权行为的连带责任。故此,如果您发现本网站的内容侵犯了您的版权,请您的相关内容发至此邮箱【779898168@qq.com】,我们在确认后,会立即删除,保证您的版权。