search

Home  >  Q&A  >  body text

HTML5 <video>视频居然有方法阻止用户直接下载视频?YouTube是怎么做到的?

按理来说通过video标签加载的视频都可以直接下载,视频地址会出现在代码中,可是YouTube是怎样做到不让用户直接下载呢?隐藏视频地址?或者是服务器端的某些功能?

PHP中文网PHP中文网2767 days ago686

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 11:50:43

    https://www.youtube.com/watch?v=ShLTI5xgoFA&spf=navigate

    If I’m not mistaken, Youtube should use such an API to obtain information, and the src in the dom is probably just an interface.

    reply
    0
  • 阿神

    阿神2017-04-17 11:50:43

    Use segmented playback such as m3u8 to achieve

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 11:50:43

    YouTube uses mpeg-dash to play in segments, so of course you can’t download it

    reply
    0
  • Cancelreply