【问题标题】:cakephp 3 response withFile and video tagcakephp 3 响应带有文件和视频标签
【发布时间】:2018-05-06 01:22:29
【问题描述】:

我已使用此代码通过 CakePHP 中的操作发送视频:

$response = $this->response->withFile(WWW_ROOT.'Component.webm',['download' => false]);

和内部模板:

        <video class="img-responsive" controls>
        <source src="<?= Router::url(['controller' => 'posts', 'action' => 'stream', $id]) ?>" />
    </video>

在 Microsoft Edge 中一切正常。但是当我在谷歌浏览器中查看页面并开始播放视频时,我无法访问我网站的任何其他页面,直到视频完全下载,并且在 30 秒后,如果视频未下载,则会显示此错误:

Maximum execution time of 30 seconds exceeded

【问题讨论】:

    标签: php google-chrome cakephp html5-video cakephp-3.x


    【解决方案1】:

    我在这里发现了问题: https://gist.github.com/ranacseruet/9826293#gistcomment-2141349

    我在操作上使用了session_write_close();,现在 chrome 也可以使用了。

    【讨论】:

      猜你喜欢
      • 2013-11-15
      • 2020-06-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多