Everything an episode page needs, in one map.
Everything an episode page needs, in one map.
The limits of the requests for the files and value blocks of an episode when their options don't set them: how many seconds a request can take, and the most bytes of a chapters file, a transcript or a feed.
The limits of the requests for the files and value blocks of an episode when their options don't set them: how many seconds a request can take, and the most bytes of a chapters file, a transcript or a feed.
(fetch-remote-values! view)(fetch-remote-values! view opts)Fetch the value blocks that the time splits of the episode view point
at, with the opts below. Returns a map, in ClojureScript as a promise:
Each block comes from the Podcast Index when opts give its
credentials. When they don't, or the index has no block, it comes from
the feed URL of the remote item, if it names one. Fetch the blocks when
the episode starts rather than at each payment, and again for those in
the report. Nothing is thrown for what the network or a server does.
The opts are:
Fetch the value blocks that the time splits of the episode `view` point at, with the `opts` below. Returns a map, in ClojureScript as a promise: - :remote-values, the value block of each remote item, or nil when it has none - :remote-report, a diagnostic for each remote item whose block couldn't be fetched, which :remote-values leaves out Each block comes from the Podcast Index when `opts` give its credentials. When they don't, or the index has no block, it comes from the feed URL of the remote item, if it names one. Fetch the blocks when the episode starts rather than at each payment, and again for those in the report. Nothing is thrown for what the network or a server does. The `opts` are: - :send and :allow-pred, as for any request - :timeout-seconds and :max-bytes, over default-limits - :index, the credentials of the Podcast Index, and :now-fn, a function of the current time to sign the requests with - :fetch, in place of dk.simongray.podcast/fetch!. Each remote feed is fetched once, though several songs of an album name it.
(metadata feed view)The metadata of the episode view of the show feed for the Media
Session API, as a map of the keys of MediaMetadataInit in kebab-case,
e.g. for the session namespace of the play-nice library:
(session/metadata! (metadata feed view))
The artist is the author of the show, or else its title, since the author of an episode is often an email address, and the album is the title of the show. The chapters are those of the view, so for those of a chapters file, give the view the :chapters that read-files! gives.
The metadata of the episode `view` of the show `feed` for the Media
Session API, as a map of the keys of MediaMetadataInit in kebab-case,
e.g. for the session namespace of the play-nice library:
(session/metadata! (metadata feed view))
The artist is the author of the show, or else its title, since the
author of an episode is often an email address, and the album is the
title of the show. The chapters are those of the view, so for those of
a chapters file, give the view the :chapters that read-files! gives.(read-files! view)(read-files! view {:keys [except] :or {except #{}} :as opts})Read the files of the episode view with the opts below. Returns a
map, in ClojureScript as a promise:
view chose, with its :document
and :report.Nothing is thrown for what the network or a server does, and a part
that couldn't be read has an :error. The opts are:
Read the files of the episode `view` with the `opts` below. Returns a map, in ClojureScript as a promise: - :chapters has the :source, :url, :document and :report of the chapters. They come from the first place that has them: the chapters file, the embedded chapters, the media file, or the timestamps in the show notes. - :transcript is the reference that `view` chose, with its :document and :report. - :media is the :duration, :artwork and :report of the media file. For an HLS stream, it's what format.hls/read! gives, with :video?. The report has :file/duration when the duration differs from the one that the feed declares, so that a position may not carry over to another file of the episode. - :duration is that of the media file or the stream. - :bytes is the size of the media file, e.g. for a feed that gives the wrong length. Nothing is thrown for what the network or a server does, and a part that couldn't be read has an :error. The `opts` are: - :send, :allow-pred and :headers, as for any request - :fetch, a function that reads the media file by its ranges in place of a request, as format.media/read! takes it, e.g. the file fetcher of util.bytes.ranges for a downloaded file or one of a show of local files - :timeout-seconds and :max-bytes, over default-limits - :except, a set of the parts to leave unread - :cache, a document store of like-minded that keeps the chapters files and the transcripts, asked for again with their validators, and read when a request fails, e.g. offline
(report files)The diagnostics of all the parts of the read files, each with the
:part that it's about: :chapters, :transcript or :media.
The diagnostics of all the parts of the read `files`, each with the :part that it's about: :chapters, :transcript or :media.
(view feed item)(view feed
item
{:keys [url notes-url-fn timestamp-fn except]
:or {notes-url-fn resolve/notes-url except #{}}
:as opts})The episode item of feed as a page shows it, with the opts below:
the item with the properties of resolve/properties merged in, and these
keys:
opts give
the :url of the feedThe opts are:
The episode `item` of `feed` as a page shows it, with the `opts` below: the item with the properties of resolve/properties merged in, and these keys: - :guid, the guid of the item - :id, its id for the profile, when the feed has a guid or `opts` give the :url of the feed - :notes, the show notes as Hiccup, and :text, as plain text - :chapters, the :source and :document of the chapters in the feed itself, where the source is :embedded, or else :inferred from the timestamps in the show notes. A chapters file is named by :chapters-url. - :links, links to the episode in other apps The `opts` are: - :languages, the wanted languages for both the :enclosure and the :transcript - :video?, :types, :max-bitrate, :max-height and :playable-pred, to select the :enclosure as resolve/enclosure does - :timed? and :transcript-types, to select the :transcript as resolve/transcript does - :url, the URL of the feed, for a feed that doesn't name its own - :notes-url-fn, a function of the web page of the episode and a URL in its show notes, which gives the URL to keep or nil, by default the URL made absolute - :timestamp-fn, a function of the seconds and the text of a time in the show notes, e.g. 12:34, which gives the Hiccup in its place, e.g. a link that plays from there, or nil to leave the text. A time in a link, or past the end of the episode, stays text. - :except, a set of the keys above to leave out
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |