14 votes

Illegal streams, decrypting m3u8's, and building a better stream experience

2 comments

  1. [2]
    Crespyl
    Link
    This is a really nice write up, thanks for sharing! It's interesting that you had to go so far out of the way to forge the referer header, I suppose it makes sense to prevent that for normal...

    This is a really nice write up, thanks for sharing!

    It's interesting that you had to go so far out of the way to forge the referer header, I suppose it makes sense to prevent that for normal browser JS, but it's odd that the node version would be the same way. I suppose they just reused the browser version.

    3 votes
    1. jonluca
      Link Parent
      Thanks! Electron is just based on Chromium - it relies on Chrome for its rendering and interpreter, and even uses its devtools for debugging. If I had decided to use node's http or request I...

      Thanks!

      Electron is just based on Chromium - it relies on Chrome for its rendering and interpreter, and even uses its devtools for debugging. If I had decided to use node's http or request I wouldn't have had these issues, it's just the library I was using used XMLHttpRequest, which is a browser-only feature, and that's why it ran into those issues.

      Doing a full replacement of XMLHttpRequest is actually a non trivial task, and I've been spending some time debugging certain features today. I'm not sure the node-xhr2 library is a perfect clone of the browser's.

      1 vote