Spaces:
Running
Running
Commit
·
d5b583f
1
Parent(s):
1c4a779
add support for HD videos
Browse files- src/app/api/video/[videoId]/route.ts +1 -1
- src/app/embed/page.tsx +1 -1
- src/app/interface/equirectangular-video-player/index.tsx +2 -0
- src/app/interface/equirectangular-video-player/viewer.tsx +1 -1
- src/app/interface/track-card/index.tsx +1 -1
- src/app/interface/video-card/index.tsx +1 -1
- src/app/interface/video-player/cartesian.tsx +1 -1
- src/app/interface/video-player/equirectangular.tsx +1 -1
- src/app/page.tsx +1 -1
- src/app/views/public-music-videos-view/index.tsx +1 -1
- src/app/watch/page.tsx +1 -1
src/app/api/video/[videoId]/route.ts
CHANGED
@@ -35,7 +35,7 @@ export async function GET(req: NextRequest) {
|
|
35 |
crossorigin="anonymous"
|
36 |
playsinline
|
37 |
webkit-playsinline
|
38 |
-
src="${video.assetUrl}">
|
39 |
</video>
|
40 |
</a-assets>
|
41 |
${
|
|
|
35 |
crossorigin="anonymous"
|
36 |
playsinline
|
37 |
webkit-playsinline
|
38 |
+
src="${video.assetUrlHd || video.assetUrl}">
|
39 |
</video>
|
40 |
</a-assets>
|
41 |
${
|
src/app/embed/page.tsx
CHANGED
@@ -39,7 +39,7 @@ export async function generateMetadata(
|
|
39 |
],
|
40 |
videos: [
|
41 |
{
|
42 |
-
"url": video.assetUrl
|
43 |
}
|
44 |
],
|
45 |
// images: ['/some-specific-page-image.jpg', ...previousImages],
|
|
|
39 |
],
|
40 |
videos: [
|
41 |
{
|
42 |
+
"url": video.assetUrlHd || video.assetUrl
|
43 |
}
|
44 |
],
|
45 |
// images: ['/some-specific-page-image.jpg', ...previousImages],
|
src/app/interface/equirectangular-video-player/index.tsx
CHANGED
@@ -14,6 +14,8 @@ export function EquirectangularVideoPlayer({
|
|
14 |
video?: VideoInfo
|
15 |
className?: string
|
16 |
}) {
|
|
|
|
|
17 |
// we shield the VideeoSphere viewer from bad data
|
18 |
if (!video?.assetUrl) { return null }
|
19 |
|
|
|
14 |
video?: VideoInfo
|
15 |
className?: string
|
16 |
}) {
|
17 |
+
|
18 |
+
|
19 |
// we shield the VideeoSphere viewer from bad data
|
20 |
if (!video?.assetUrl) { return null }
|
21 |
|
src/app/interface/equirectangular-video-player/viewer.tsx
CHANGED
@@ -79,7 +79,7 @@ export function VideoSphereViewer({
|
|
79 |
{
|
80 |
id: 'HD',
|
81 |
label: 'Standard',
|
82 |
-
panorama: { source: video.assetUrl },
|
83 |
},
|
84 |
],
|
85 |
}],
|
|
|
79 |
{
|
80 |
id: 'HD',
|
81 |
label: 'Standard',
|
82 |
+
panorama: { source: video.assetUrlHd || video.assetUrl },
|
83 |
},
|
84 |
],
|
85 |
}],
|
src/app/interface/track-card/index.tsx
CHANGED
@@ -119,7 +119,7 @@ export function TrackCard({
|
|
119 |
playsInline
|
120 |
|
121 |
ref={ref}
|
122 |
-
src={media.assetUrl}
|
123 |
className={cn(
|
124 |
`w-full h-full`,
|
125 |
`aspect-square`,
|
|
|
119 |
playsInline
|
120 |
|
121 |
ref={ref}
|
122 |
+
src={media.assetUrlHd || media.assetUrl}
|
123 |
className={cn(
|
124 |
`w-full h-full`,
|
125 |
`aspect-square`,
|
src/app/interface/video-card/index.tsx
CHANGED
@@ -112,7 +112,7 @@ export function VideoCard({
|
|
112 |
playsInline
|
113 |
|
114 |
ref={ref}
|
115 |
-
src={media.assetUrl}
|
116 |
className={cn(
|
117 |
`w-full h-full`,
|
118 |
`object-cover`,
|
|
|
112 |
playsInline
|
113 |
|
114 |
ref={ref}
|
115 |
+
src={media.assetUrlHd || media.assetUrl}
|
116 |
className={cn(
|
117 |
`w-full h-full`,
|
118 |
`object-cover`,
|
src/app/interface/video-player/cartesian.tsx
CHANGED
@@ -36,7 +36,7 @@ export function CartesianVideoPlayer({
|
|
36 |
src={[
|
37 |
{
|
38 |
quality: "Full HD",
|
39 |
-
url: video.assetUrl,
|
40 |
}
|
41 |
]}
|
42 |
|
|
|
36 |
src={[
|
37 |
{
|
38 |
quality: "Full HD",
|
39 |
+
url: video.assetUrlHd || video.assetUrl,
|
40 |
}
|
41 |
]}
|
42 |
|
src/app/interface/video-player/equirectangular.tsx
CHANGED
@@ -79,7 +79,7 @@ export function EquirectangularVideoPlayer({
|
|
79 |
{
|
80 |
id: 'HD',
|
81 |
label: 'Standard',
|
82 |
-
panorama: { source: video.assetUrl },
|
83 |
},
|
84 |
],
|
85 |
}],
|
|
|
79 |
{
|
80 |
id: 'HD',
|
81 |
label: 'Standard',
|
82 |
+
panorama: { source: video.assetUrlHd || video.assetUrl },
|
83 |
},
|
84 |
],
|
85 |
}],
|
src/app/page.tsx
CHANGED
@@ -50,7 +50,7 @@ export async function generateMetadata(
|
|
50 |
|
51 |
videos: [
|
52 |
{
|
53 |
-
"url": video.assetUrl
|
54 |
}
|
55 |
],
|
56 |
// images: ['/some-specific-page-image.jpg', ...previousImages],
|
|
|
50 |
|
51 |
videos: [
|
52 |
{
|
53 |
+
"url": video.assetUrlHd || video.assetUrl
|
54 |
}
|
55 |
],
|
56 |
// images: ['/some-specific-page-image.jpg', ...previousImages],
|
src/app/views/public-music-videos-view/index.tsx
CHANGED
@@ -35,7 +35,7 @@ export function PublicMusicVideosView() {
|
|
35 |
}, [])
|
36 |
|
37 |
const handleSelect = (media: VideoInfo) => {
|
38 |
-
console.log("going to play:", media.assetUrl.replace(".mp4", ".mp3"))
|
39 |
playlist.playback({
|
40 |
url: media.assetUrl.replace(".mp4", ".mp3"),
|
41 |
meta: media,
|
|
|
35 |
}, [])
|
36 |
|
37 |
const handleSelect = (media: VideoInfo) => {
|
38 |
+
// console.log("going to play:", media.assetUrl.replace(".mp4", ".mp3"))
|
39 |
playlist.playback({
|
40 |
url: media.assetUrl.replace(".mp4", ".mp3"),
|
41 |
meta: media,
|
src/app/watch/page.tsx
CHANGED
@@ -39,7 +39,7 @@ export async function generateMetadata(
|
|
39 |
],
|
40 |
videos: [
|
41 |
{
|
42 |
-
"url": video.assetUrl
|
43 |
}
|
44 |
],
|
45 |
// images: ['/some-specific-page-image.jpg', ...previousImages],
|
|
|
39 |
],
|
40 |
videos: [
|
41 |
{
|
42 |
+
"url": video.assetUrlHd || video.assetUrl
|
43 |
}
|
44 |
],
|
45 |
// images: ['/some-specific-page-image.jpg', ...previousImages],
|