Git Product home page Git Product logo

Comments (14)

Ivshti avatar Ivshti commented on June 7, 2024 1

Currently, this is not possible, cause we're trying to design the streams object in a way that allows easy browser support (HTTPS/WebTorrent)

However, we can implement this feature in a relatively platform-agnostic way, but the problem is, the moment you use headers, browser users would need to connect their stremio to a streaming server (that will act as a proxy) in order to play those streams

in any case, we will consider this feature

from stremio-addon-sdk.

zoreu avatar zoreu commented on June 7, 2024 1

now i got it thanks

from stremio-addon-sdk.

jaruba avatar jaruba commented on June 7, 2024 1

@IsraPerez98 it is possible with the local proxy for headers, see: https://github.com/dexter21767/stremio-addic7ed/blob/5ee447d3176c96860266c191a8cfd852b038d9aa/addic7ed.js#L45

from stremio-addon-sdk.

jaruba avatar jaruba commented on June 7, 2024

Please see the Stream Response docs under stream.behaviorHints.proxyHeaders, this is available in both Desktop and Android versions.

from stremio-addon-sdk.

sleeyax avatar sleeyax commented on June 7, 2024

Can we close this issue now that we have the proxyHeaders option ?

from stremio-addon-sdk.

jaruba avatar jaruba commented on June 7, 2024

@sleeyax yup

from stremio-addon-sdk.

zoreu avatar zoreu commented on June 7, 2024

this dict not work:

streams['streams'] = [{'title':' HD (HTTPS)','url':'https://site.com/stream.mp4', 'proxyHeaders': {"request": {"Referer": "http://myreferer.com" } }}]

what is the correct json with headers? please

from stremio-addon-sdk.

jaruba avatar jaruba commented on June 7, 2024

@zoreu because it is wrong, follow the stream object definition precisely:

{
  "streams": [
    {
      "url": "...",
      "title": "...",
      "behaviorHints": {
        "proxyHeaders": {
          // ...
        },
      }
   }
]

from stremio-addon-sdk.

zoreu avatar zoreu commented on June 7, 2024

@zoreu because it is wrong, follow the stream object definition precisely:

{
  "streams": [
    {
      "url": "...",
      "title": "...",
      "behaviorHints": {
        "proxyHeaders": {
          // ...
        },
      }
   }
]

still not opened the transmission, did I do it right? does stremio support this? I have the last version

{"streams":[{"behaviorHints":{"proxyHeaders":{"request":{"Referer":"https://referer.com/","User-Agent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Mobile Safari/537.36"}}},"title":"ASSISTIR","url":"https://site.com/channel/playlist.m3u8"}]}

from stremio-addon-sdk.

jaruba avatar jaruba commented on June 7, 2024

@zoreu almost, you are still not following the documentation: https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/api/responses/stream.md

which states:

When using this property, you must also set stream.behaviorHints.notWebReady: true

from stremio-addon-sdk.

IsraPerez98 avatar IsraPerez98 commented on June 7, 2024

Is it possible to do something similar for defineSubtitlesHandler ?

I'm trying to build an addon but the URLs used to get the .srt files need a Referer header as well, I can't find a way to work around this

from stremio-addon-sdk.

IsraPerez98 avatar IsraPerez98 commented on June 7, 2024

@jaruba Thank you, where can I find the documentation for the proxy options?

from stremio-addon-sdk.

dexter21767-dev avatar dexter21767-dev commented on June 7, 2024

Is it possible to do something similar for defineSubtitlesHandler?

as Jaruba said, you can use the local proxy:
LocalServerURL/proxy/EncodedProxyHeader/path

LocalServerURL: the URL to the local proxy server usually is http://127.0.0.1:11470, which it might not be, which is an issue.

EncodedProxyHeader: the encoded header properties are:
d=${BaseURL}
&h=referer:${referer} // h stands for header and can probably take other parameters other than referer
all those variables should be URL encoded

path is the path of the required file

so if I want to access https://stremio.com/downloads with the referer set to https://stremio.com it will look like this:
http://127.0.0.1:11470/proxy/d=https%3A%2F%2Fstremio.com&h=referer:https%3A%2F%2Fstremio.com/downloads

from stremio-addon-sdk.

dexter21767-dev avatar dexter21767-dev commented on June 7, 2024

@IsraPerez98 and I would suggest opening a new issue if u have more problems.
a 4 years old issue wouldn't bring much help imo.

from stremio-addon-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.