2021-04-15 17:18:53 +00:00
## JSON Chapters Format
< small > Version 1.2 - Updated on 2021.04.15< / small >
2021-04-15 17:17:16 +00:00
2021-04-15 17:19:16 +00:00
< br > < br >
2020-10-16 14:30:34 +00:00
2020-10-28 20:51:59 +00:00
This is the initial spec for a json chapters format that can be referenced in an RSS feed using the `<podcast:chapters>` tag of
the "podcast" namespace. This file can reside on any publicly accessible url. See the podcast namespace documentation for
details on the format of the tag.
2020-10-22 14:09:55 +00:00
2021-03-17 20:11:29 +00:00
This type of file should be served with a Content-type of 'application/json+chapters'. Chapter order is assumed to be
2020-10-28 20:51:59 +00:00
in ascending order based on the `startTime` .
< br >
## "Chapters" Object
The chapters object is a simple JSON object with only 2 required properties:
- `version` (required - string) The version number of the format being used
- `chapters` (required - array) An array of chapter objects defined below
#### Optional Attributes:
- `author` (optional - string) The name of the author of this podcast episode.
- `title` (optional - string) The title of this podcast episode.
- `podcastName` (optional - string) The name of the podcast this episode belongs to.
- `description` (optional - string) A description of this episode.
- `fileName` (optional - string) The name of the audio file these chapters apply to.
2021-04-15 19:51:27 +00:00
- `waypoints` (optional - boolean) If this property is present, the locations in a chapter object should be displayed with a route between locations.
2020-10-28 20:51:59 +00:00
< br >
2021-04-15 17:17:16 +00:00
## The "Chapter" Object
2020-10-28 20:51:59 +00:00
The "chapter" object takes this basic form:
2020-10-16 14:30:34 +00:00
2021-04-19 03:35:20 +00:00
```json
2020-10-16 14:30:34 +00:00
{
2020-10-18 06:32:56 +00:00
"startTime": 94,
2020-10-26 17:04:57 +00:00
"title": "Donation Segment"
2020-10-16 14:30:34 +00:00
}
```
2020-10-28 20:51:59 +00:00
There is only one required attribute:
2020-10-18 06:32:56 +00:00
2020-11-05 00:06:48 +00:00
- `startTime` (required - float) The starting time of the chapter, expressed in seconds with float precision for fractions of a second.
2020-10-28 20:51:59 +00:00
2021-04-15 17:17:16 +00:00
< br >
2020-10-28 20:51:59 +00:00
#### Optional Attributes:
2020-10-26 21:32:29 +00:00
- `title` (optional - string) The title of this chapter.
2020-10-18 06:32:56 +00:00
- `img` (optional - string) The url of an image to use as chapter art.
- `url` (optional - string) The url of a web page or supporting document that's related to the topic of this chapter.
2020-10-28 20:51:59 +00:00
- `toc` (optional - boolean) If this property is present and set to false, this chapter should not display visibly to the user in either the table of contents or as a jump-to point in the user interface. It should be considered a "silent" chapter marker for the purpose of meta-data only. If this property is set to `true` or not present at all, this should be considered a normal chapter for display to the user. The name "toc" is short for "table of contents".
2020-11-05 00:06:48 +00:00
- `endTime` (optional - float) The end time of the chapter, expressed in seconds with float precision for fractions of a second.
2021-04-15 17:17:16 +00:00
- `location` (optional - object) This object defines an optional location that is tied to this chapter. It follows the structure of the [location ](https://github.com/Podcastindex-org/podcast-namespace/blob/main/location/location.md ) tag in the XML namespace.
< br >
## The Location Object:
The "location" object takes this basic form:
2021-04-19 03:35:20 +00:00
```json
2021-04-15 17:17:16 +00:00
{
"name": "Eiffel Tower, Paris",
"geo": "geo:48.858093,2.294694"
}
```
It is intended to provide for rich location-based experiences tied to a point of time within a podcast episode, or other feed based media. For example, a "walking tour" may include latitude and longitude waypoints along side the image within chapters markers as someone listens to the tour podcast. This
would allow apps to show a map with markers within the UI as the tour progresses. Or, perhaps a "History of the Middle East" podcast might expose a map to highlight where certain landmarks are when being discussed.
There are two required attributes:
- `name` (required - string) A human readable place name.
- `geo` (required - string) A simple latitude,longitude given in geoURI format, conformant to [RFC 5870 ](https://tools.ietf.org/html/rfc5870 ).
#### Optional Attributes:
- `osm` (optional - string) An OpenStreetMaps query string. Please see the [location ](https://github.com/Podcastindex-org/podcast-namespace/blob/main/location/location.md ) XML tag specification for full details.
2020-10-26 17:04:57 +00:00
2020-10-28 20:51:59 +00:00
< br >
2020-10-26 17:04:57 +00:00
## Basic example
Here is what a very basic chapters file may look like:
2021-04-19 03:35:20 +00:00
```json
2020-10-26 17:04:57 +00:00
{
2021-04-19 21:49:30 +00:00
"version": "1.2.0",
2020-10-26 17:04:57 +00:00
"chapters":
[
{
"startTime": 0,
"title": "Intro"
},
{
"startTime": 168,
"title": "Hearing Aids",
"img": "https://example.com/images/hearing_aids.jpg"
},
{
"startTime": 260,
"title": "Progress Report"
},
{
"startTime": 410,
"title": "Namespace",
"img": "https://example.com/images/namepsace_example.jpg",
"url": "https://github.com/Podcastindex-org/podcast-namespace"
},
{
"startTime": 3990,
"title": "Just Break Up",
"img": "https://example.com/images/justbreakuppod.png"
},
{
"startTime": 5510,
"title": "The Big Players"
},
{
"startTime": 5854,
"title": "Spread the Word"
},
{
"startTime": 6089,
"title": "Outro"
}
]
}
```
2020-10-26 21:32:29 +00:00
In this simple form, the chapter objects are treated as sequential just based on their index as a function of being
2020-10-28 22:19:39 +00:00
ordered in ascending fashion based on their `startTime` . In a very simple example such as this nothing is present except the `startTime` ,
2020-10-26 17:04:57 +00:00
`title` , and a few bits of optional meta-data.
2020-10-26 17:06:48 +00:00
< br > < br >
2020-10-26 17:04:57 +00:00
## More complex example
In this more robust example, we can bring in more meta-data about the podcast episode, and provide a way for this file to exist more easily in a web
2020-10-26 21:32:29 +00:00
context for something like an embedded HTML5 player on a website. Also there is an example of a "silent" chapter that has no presence in the visible
chapter list, but allows for different artwork to be shown:
2020-10-26 17:04:57 +00:00
2021-04-19 03:35:20 +00:00
```json
2020-10-26 17:04:57 +00:00
{
2021-04-19 21:49:30 +00:00
"version": "1.2.0",
2020-10-26 17:04:57 +00:00
"author": "John Doe",
"title": "Episode 7 - Making Progress",
"podcastName": "John's Awesome Podcast",
"chapters":
[
{
"startTime": 0,
2020-10-26 21:32:29 +00:00
"title": "Intro"
2020-10-26 17:04:57 +00:00
},
{
"startTime": 168,
"title": "Hearing Aids",
"hasArtwork": "chapter1.jpg"
},
{
"startTime": 260,
2020-10-26 21:32:29 +00:00
"title": "Progress Report"
2020-10-26 17:04:57 +00:00
},
{
"startTime": 410,
"title": "Namespace",
"img": "https://example.com/images/namepsace_example.jpg",
2020-10-26 21:32:29 +00:00
"url": "https://github.com/Podcastindex-org/podcast-namespace"
2020-10-26 17:04:57 +00:00
},
{
"startTime": 3990,
"title": "Just Break Up",
"img": "https://example.com/images/justbreakuppod.png",
2020-10-26 21:32:29 +00:00
"url": "https://twitter.com/justbreakuppod"
2020-10-26 17:04:57 +00:00
},
{
"startTime": 4826,
2021-04-19 21:49:30 +00:00
"img": "https://example.com/images/parisfrance.jpg",
2021-04-15 17:17:16 +00:00
"toc": false,
"location": {
"name": "Eiffel Tower, Paris",
"geo": "geo:42.3417649,-70.9661596"
}
2020-10-26 17:04:57 +00:00
},
{
"startTime": 5510,
2020-10-26 21:32:29 +00:00
"title": "The Big Players"
2020-10-26 17:04:57 +00:00
},
{
"startTime": 5854,
2020-10-26 21:32:29 +00:00
"title": "Spread the Word"
2020-10-26 17:04:57 +00:00
},
{
"startTime": 6089,
2020-10-26 21:32:29 +00:00
"title": "Outro"
2020-10-26 17:04:57 +00:00
}
]
}
2020-10-26 21:32:29 +00:00
```
< br > < br >
## Note about privacy
Clearly, when pulling in web based data there is the chance that this functionality could be used for tracking. As a safeguard against that, apps
using chapters are encouraged to prompt the user to acknowledge whether they trust the podcast in question before displaying the content. Trusted
2021-04-15 17:18:53 +00:00
podcasts can then be remembered for the future.