Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[epic] new stream spec: implement #142

Open
Ivshti opened this issue Feb 6, 2019 · 0 comments
Open

[epic] new stream spec: implement #142

Ivshti opened this issue Feb 6, 2019 · 0 comments
Assignees

Comments

@Ivshti
Copy link
Member

Ivshti commented Feb 6, 2019

TODO: update this issue with info on how to implement this new spec in the current stremio versions

Spec proposal:

  • url: optional: internally playable URL; can use protocols: file:///, https://, ipfs://, ipns://, magnet:, stremio-yt://{ytid}, or in fact anything that one of our player implementations (with the help of the streaming server) supports; pointing to a particular file in a torrent will be represented via http://www.bittorrent.org/beps/bep_0053.html (?so={fileIdx}); this will be polyfilled by legacy props (infoHash, fileIdx), ytId/yt_id
  • externalURL: optional: URL that needs to be externally opened
  • playerFrameURL: optional: see https://github.com/stremio/stremio-players#playerurl
  • title: optional: string - title of the stream; usually used for stream quality
  • thumbnail: optional: string, URL; this might be a SVG, which would be useful for icons (e.g. iTunes, Netflix, Amazon)
  • subtitles: optional: array of {id, lang, url} where url is a URL to a HTTPS+VTT+UTF8 file
  • behaviorHints (all are optional)
    • platformsWhitelist: which hints it's restricted to particular platforms - to be discussed
    • countryWhitelist: which hints it's restricted to particular countries - array of ISO 3166-1 alpha-2 country codes in lowercase in which the stream is accessible
    • notWebReady applies if the protocol of the url is http(s); needs to be set to true if the URL does not support https or is not an MP4 file
    • peers: number of connected peers; applies for P2P protocols
    • group: if defined, addons with the same behaviorHints.group will be chosen automatically for binge watching; this should be something that identifies the stream's nature within your addon: for example, if your addon is called "gobsAddon", and the stream is 720p, the group should be "gobsAddon-720p"; if the next episode has a stream with the same group, stremio should select that stream implicitly
    • headers: only applies to urls; HTTP headers to use when communicating with url; for the HTML5 player, this will force proxying in the middleware, via NeedsConversion(URL); for MPV, this can be set directly as an MPV setting
    • adexSlotId: ad slot ID to visualize when player is paused; this slot must be available on market.adex.network; it should only work if the addon manifest has behaviorHints.hasAds, so that the user is aware the addon has ads; furthermore, the UI should show the ad is from the addon (e.g. small text below the ad)

The stream is valid if there is at least one of url, externalURL, playerFrameUrl

The stream ID is defined as a hash of the stream (Hashable in rust)

Streams are ordered by: stream.is_web_ready(), putting the web-ready streams first; The rest should be displayed differently to indicate they need a streaming server, esp if one is not connected

Furthermore, in relation to Stremio/stremio-addon-sdk#16, having a P2P protocol in your url should make the SDK hint that you set manifest.behaviorHints.usesP2P to true;
returning streams that look like web ready (http URLs, mp4) should hint you to set manifest.behaviorHints.webReady to true

To read more about how streams are played, see: https://github.com/Stremio/stremio-players

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants