doukanzhuo4297 2017-12-18 08:04
浏览 131
已采纳

用户选择是下载还是流式传输mp4媒体

I'd like to give the user the possibility to download or stream the same media. I tried this way (adding download) but it doesn't work:

<a target='_blank' href='http://another/site/file.mp4' download>DOWNLOAD</a>
<a target='_blank' href='http://another/site/file.mp4'>STREAMING</a>

I create the page using php 5.6

Note that the file is always the same: http://another/site/file.mp4 and comes from a different domain (The <a> urls are in site1 and the media is in site2 )

  • 写回答

1条回答 默认 最新

  • duanqiang5722 2017-12-18 08:12
    关注

    The download attribute on <a> tags only work with the following:

    • The URL must be the same origin as the HTML document.
    • The browser must be Chrome, Firefox, Edge, Safari (10) or Opera (15)

    I'm going to assume the URL is from another website, and that's why it's not working.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 损失匹配问题,求解答
  • ¥15 3500常用汉字书法体检测数据集下载
  • ¥15 odoo17在制造模块或采购模块良品与次品如何分流和在质检模块下如何开发
  • ¥15 Qt音乐播放器的音乐文件相对路径怎么写
  • ¥15 VB.NET利用摄像头拍照的程序
  • ¥15 linux下vscode设置不了字连体
  • ¥20 游戏mod是如何制作的
  • ¥15 关于#hadoop#的问题:按照老师上课讲的步骤写的
  • ¥20 有人会用这个工具箱吗 付fei咨询
  • ¥30 成都市武侯区住宅小区兴趣点