Skip to content

Commit

Permalink
www: Switch cdn.livepeer.com to livepeercdn.com (#1000)
Browse files Browse the repository at this point in the history
* www: switch cdn.livepeer.com to livepeercdn.com

* www: added double domain check on asset table

* www: docs: rollback regional endpoints

* fix typo

* fix typo

* www: added tooltip on playback URL
  • Loading branch information
gioelecerati authored Apr 12, 2022
1 parent 7b7744b commit 438df64
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 14 deletions.
3 changes: 2 additions & 1 deletion packages/www/components/Dashboard/AssetsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ const AssetsTable = ({
children: (
<Box>
{sourceUrl &&
sourceUrl.indexOf("https://cdn.livepeer.com") === 0
(sourceUrl.indexOf("https://livepeercdn.com") === 0 ||
sourceUrl.indexOf("https://cdn.livepeer.com") === 0)
? "Live Stream"
: "Import"}
</Box>
Expand Down
2 changes: 1 addition & 1 deletion packages/www/docs/api-reference/session/get-session.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ curl -H 'authorization: Bearer {api-key}' \
"record":true,
"parentId":"nnnnnnnn-nnnn-nnnn-nnnn-nnnn",
"recordingStatus":"ready",
"recordingUrl":"https://cdn.livepeer.com/recordings/aaaaaaaa-aaaa-aaaa-aaaa-aaaa/index.m3u8"},
"recordingUrl":"https://livepeercdn.com/recordings/aaaaaaaa-aaaa-aaaa-aaaa-aaaa/index.m3u8"},
{other asset object keys, like createdAt and profiles}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ curl -H 'authorization: Bearer {api-key}' \
"record":true,
"parentId":"nnnnnnnn-nnnn-nnnn-nnnn-nnnn",
"recordingStatus":"ready",
"recordingUrl":"https://cdn.livepeer.com/recordings/aaaaaaaa-aaaa-aaaa-aaaa-aaaa/index.m3u8"},
"recordingUrl":"https://livepeercdn.com/recordings/aaaaaaaa-aaaa-aaaa-aaaa-aaaa/index.m3u8"},
"mp4URL":"https://mdw-cdn.livepeer.com/recordings/ccccccc-cccc-cccc-cccc-cccccccccccccc/2021_01_01_01_00_01-source.mp4",
{other asset object keys, like createdAt and profiles},
{
Expand All @@ -34,7 +34,7 @@ curl -H 'authorization: Bearer {api-key}' \
"record":true,
"parentId":"nnnnnnnn-nnnn-nnnn-nnnn-nnnn",
"recordingStatus":"ready",
"recordingUrl":"https://cdn.livepeer.com/recordings/bbbbbbbb-bbbb-bbbb-bbbb-bbbb/index.m3u8",
"recordingUrl":"https://livepeercdn.com/recordings/bbbbbbbb-bbbb-bbbb-bbbb-bbbb/index.m3u8",
"mp4URL":"https://mdw-cdn.livepeer.com/recordings/eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee/2021_01_01_01_00_01-source.mp4",
{other asset object keys, like createdAt and profiles}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/www/docs/api-reference/vod/list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ curl --location --request GET 'https://livepeer.com/api/asset/$ASSET_ID' \
"duration": 309.986393
},
"playbackId": "$PLAYBACK_ID",
"downloadUrl": "https://cdn.livepeer.com/asset/$PLAYBACK_ID/video"
"downloadUrl": "https://livepeercdn.com/asset/$PLAYBACK_ID/video"
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ These globally-optimized URLs are the best option for nearly all Livepeer.com
users.

- Stream into: `rtmp://rtmp.livepeer.com/live/[stream-key]`
- Playback from: `https://cdn.livepeer.com/hls/[playbackId]/index.m3u8`
- Playback from: `https://livepeercdn.com/hls/[playbackId]/index.m3u8`

## Back-up transcoding with regional ingest and playback URLs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ stream playback URL.
Load your playback URL in the [Livepeer.com test player](/app/test-player). If
you get a "Stream not found" error, confirm that your URL is correct. It should
look something like this:
`https://cdn.livepeer.com/hls/123456abcdef7890/index.m3u8`
`https://livepeercdn.com/hls/123456abcdef7890/index.m3u8`

## Step 2

Expand Down
6 changes: 3 additions & 3 deletions packages/www/docs/guides/start-live-streaming/playback.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metaDescription: Playback a Livepeer.com live stream
# Playback a live stream

This is how a Livepeer.com playback URL is formatted:
`https://cdn.livepeer.com/hls/{playbackId}/index.m3u8`.
`https://livepeercdn.com/hls/{playbackId}/index.m3u8`.

All sessions for a stream have the same playback URL.

Expand All @@ -19,7 +19,7 @@ click on a stream name. The playback URL is listed on the page.

You can also make a `GET` request to `https://livepeer.com/api/stream/{id}`, and
note the value of `playbackId` in the response. The playback URL is
`https://cdn.livepeer.com/hls/{playbackId}/index.m3u8`.
`https://livepeercdn.com/hls/{playbackId}/index.m3u8`.

## Video player

Expand Down Expand Up @@ -52,4 +52,4 @@ Lastly, check that your playback URL is correct.

You can use `?video=false` at the end of an `.m3u8` URL to get an audio-only
stream. For example,
`https://cdn.livepeer.com/hls/{playbackId}/index.m3u8?video=false`.
`https://livepeercdn.com/hls/{playbackId}/index.m3u8?video=false`.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ These globally-optimized URLs are the best option for nearly all Livepeer.com
users.

- Stream into: `rtmp://rtmp.livepeer.com/live/{stream-key}`
- Playback from: `https://cdn.livepeer.com/hls/{playbackId}/index.m3u8`
- Playback from: `https://livepeercdn.com/hls/{playbackId}/index.m3u8`

Also, If you created your stream via the Livepeer.com API, confirm your profile
bitrate settings are
Expand Down
11 changes: 10 additions & 1 deletion packages/www/layouts/streamDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const StreamDetail = ({
const playbackId = (stream || {}).playbackId || "";
const domain = isStaging() ? "monster" : "com";
const globalIngestUrl = `rtmp://rtmp.livepeer.${domain}/live`;
const globalPlaybackUrl = `https://cdn.livepeer.${domain}/hls/${playbackId}/index.m3u8`;
const globalPlaybackUrl = `https://livepeercdn.${domain}/hls/${playbackId}/index.m3u8`;
const globalSrtIngestUrl = `srt://rtmp.livepeer.${domain}:2935?streamid=${
stream?.streamKey || ""
}`;
Expand Down Expand Up @@ -486,6 +486,15 @@ const StreamDetail = ({
)}
anchor={false}
/>
<Tooltip
content={
<Box>
We changed our playback domain, but
cdn.livepeer.com is still working.
</Box>
}>
<Help />
</Tooltip>
</Cell>
<Cell css={{ color: "$mauve11" }}>Record sessions</Cell>
<Cell>
Expand Down
2 changes: 1 addition & 1 deletion packages/www/pages/app/stream/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ const ID = () => {
const playbackId = (stream || {}).playbackId || "";
const domain = isStaging() ? "monster" : "com";
const globalIngestUrl = `rtmp://rtmp.livepeer.${domain}/live`;
const globalPlaybackUrl = `https://cdn.livepeer.${domain}/hls/${playbackId}/index.m3u8`;
const globalPlaybackUrl = `https://livepeercdn.${domain}/hls/${playbackId}/index.m3u8`;

if (stream && stream.region && !lastSession) {
broadcasterPlaybackUrl = `https://${stream.region}.livepeer.${domain}/stream/${stream.id}.m3u8`;
Expand Down
2 changes: 1 addition & 1 deletion packages/www/pages/dashboard/stream-health.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const Health = () => {
setPlaybackUrl(e.target.value);
}}
size="2"
placeholder="ie. https://cdn.livepeer.com/hls/123456abcdef7890/index.m3u8"
placeholder="ie. https://livepeercdn.com/hls/123456abcdef7890/index.m3u8"
/>
<Box
css={{
Expand Down

0 comments on commit 438df64

Please sign in to comment.