[Video] Add uploaded video to post (#4884)

* video uploads!

* use video upload lexicons

* add missing postgate

* remove references to prerelease package

* fix scrubber showing a "0"

* Delete types.ts

* rm logs

* rm upload header

---------

Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
This commit is contained in:
Samuel Newman 2024-08-29 16:34:41 +01:00 committed by GitHub
parent d52d29621e
commit 551c4a4f32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 116 additions and 126 deletions

View file

@ -1,3 +1,6 @@
import {useMemo} from 'react'
import {AtpAgent} from '@atproto/api'
const UPLOAD_ENDPOINT = process.env.EXPO_PUBLIC_VIDEO_ROOT_ENDPOINT ?? ''
export const createVideoEndpointUrl = (
@ -13,3 +16,11 @@ export const createVideoEndpointUrl = (
}
return url.href
}
export function useVideoAgent() {
return useMemo(() => {
return new AtpAgent({
service: UPLOAD_ENDPOINT,
})
}, [])
}