cdn env var

main
Greg Hogan 2018-10-26 12:24:20 -07:00
parent 4f68c898c2
commit ac2ca9d261
3 changed files with 5 additions and 1 deletions

1
.env.development 100644
View File

@ -0,0 +1 @@
REACT_APP_VIDEO_CDN=https://comma-video-staging.azureedge.net

1
.env.production 100644
View File

@ -0,0 +1 @@
REACT_APP_VIDEO_CDN=https://comma-video.azureedge.net

View File

@ -1,5 +1,7 @@
function videoUrl(dongleId, hashedRouteName) {
return `https://comma-video.azureedge.net/hls/${dongleId}/${hashedRouteName}/index.m3u8`;
return `${
process.env.REACT_APP_VIDEO_CDN
}/hls/${dongleId}/${hashedRouteName}/index.m3u8`;
}
function videoUrlForRouteUrl(routeUrlString) {