A stream.place VOD client inspired by icarly.com
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix video API endpoint - use iameli.com PDS instead of vod-beta.stream.place

- Changed from vod-beta.stream.place to iameli.com (the actual PDS)
- Updated HomeClient, ISongs, and WatchPageClient to use correct endpoint
- API path: com.atproto.repo.listRecords with repo and collection params
- Response format changed from data.videos to data.records

jack df74a964 349f17f7

+10 -10
+3 -3
src/app/watch/[id]/WatchPageClient.tsx
··· 49 49 try { 50 50 setLoading(true); 51 51 52 - // Use the stream.place VOD API directly 53 - const videosRes = await fetch('https://vod-beta.stream.place/xrpc/com.stream.place.vod.getVideos'); 52 + // Use the stream.place PDS directly (iameli.com) 53 + const videosRes = await fetch('https://iameli.com/xrpc/com.atproto.repo.listRecords?repo=did:plc:rbvrr34edl5ddpuwcubjiost&collection=place.stream.video'); 54 54 if (!videosRes.ok) { 55 55 throw new Error(`Failed to fetch videos: ${videosRes.status}`); 56 56 } 57 57 58 58 const data = await videosRes.json(); 59 - const allVideos = data.videos as { uri: string; cid: string; value: VideoRecord }[]; 59 + const allVideos = data.records as { uri: string; cid: string; value: VideoRecord }[]; 60 60 61 61 const foundVideo = allVideos.find((v) => v.uri.endsWith(`/${id}`)); 62 62
+3 -3
src/components/HomeClient.tsx
··· 37 37 try { 38 38 setLoading(true); 39 39 40 - // Use the stream.place VOD API directly 41 - const videosRes = await fetch('https://vod-beta.stream.place/xrpc/com.stream.place.vod.getVideos', { 40 + // Use the stream.place PDS directly (iameli.com) 41 + const videosRes = await fetch('https://iameli.com/xrpc/com.atproto.repo.listRecords?repo=did:plc:rbvrr34edl5ddpuwcubjiost&collection=place.stream.video', { 42 42 method: 'GET', 43 43 headers: { 44 44 'Accept': 'application/json', ··· 50 50 } 51 51 52 52 const data = await videosRes.json(); 53 - const allVideos = data.videos as { uri: string; cid: string; value: VideoRecord }[]; 53 + const allVideos = data.records as { uri: string; cid: string; value: VideoRecord }[]; 54 54 55 55 // Resolve handles 56 56 const videosWithHandles = await Promise.all(
+4 -4
src/components/ISongs.tsx
··· 11 11 handle: string; 12 12 } 13 13 14 - const VOD_BETA_BASE = 'https://vod-beta.stream.place/xrpc'; 14 + const VOD_PLAYBACK_BASE = 'https://vod-beta.stream.place/xrpc'; 15 15 16 16 export default function ISongs() { 17 17 const [videos, setVideos] = useState<VideoWithHandle[]>([]); ··· 29 29 const fetchVideos = async () => { 30 30 try { 31 31 setLoading(true); 32 - const videosRes = await fetch('https://vod-beta.stream.place/xrpc/com.stream.place.vod.getVideos'); 32 + const videosRes = await fetch('https://iameli.com/xrpc/com.atproto.repo.listRecords?repo=did:plc:rbvrr34edl5ddpuwcubjiost&collection=place.stream.video'); 33 33 if (!videosRes.ok) { 34 34 throw new Error(`Failed to fetch videos: ${videosRes.status}`); 35 35 } 36 36 37 37 const data = await videosRes.json(); 38 - const allVideos = data.videos as { uri: string; cid: string; value: VideoRecord }[]; 38 + const allVideos = data.records as { uri: string; cid: string; value: VideoRecord }[]; 39 39 40 40 // Resolve handles 41 41 const videosWithHandles = await Promise.all( ··· 73 73 if (!currentVideo || !audioRef.current) return; 74 74 75 75 const audio = audioRef.current; 76 - const playlistUrl = `${VOD_BETA_BASE}/place.stream.playback.getVideoPlaylist?uri=${encodeURIComponent(currentVideo.uri)}`; 76 + const playlistUrl = `${VOD_PLAYBACK_BASE}/place.stream.playback.getVideoPlaylist?uri=${encodeURIComponent(currentVideo.uri)}`; 77 77 78 78 // Cleanup previous HLS instance 79 79 if (hlsRef.current) {