diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-08-09 02:33:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-09 02:33:42 +0100 |
commit | 4350dbc853766dc4ba7cc304b7a12505ef0c4781 (patch) | |
tree | 4a53a445f0b9972858f3a6cdc84992ed3914aec4 /src/view/com/posts/FeedItem.tsx | |
parent | e782db33dcd415bf6ad122daedd3abd3aafabd64 (diff) | |
download | voidsky-4350dbc853766dc4ba7cc304b7a12505ef0c4781.tar.zst |
[Video] Bundle of minor tweaks (#4904)
* fix bg color * unique video urls for debug * improve controls slightly * mute until fullscreen --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
Diffstat (limited to 'src/view/com/posts/FeedItem.tsx')
-rw-r--r-- | src/view/com/posts/FeedItem.tsx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index 8592f0bec..0071e2401 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -1,4 +1,4 @@ -import React, {memo, useMemo, useState} from 'react' +import React, {memo, useId, useMemo, useState} from 'react' import {StyleSheet, View} from 'react-native' import { AppBskyActorDefs, @@ -137,7 +137,6 @@ let FeedItemInner = ({ const {openComposer} = useComposerControls() const pal = usePalette('default') const {_} = useLingui() - const gate = useGate() const href = useMemo(() => { const urip = new AtUri(post.uri) @@ -356,9 +355,7 @@ let FeedItemInner = ({ postAuthor={post.author} onOpenEmbed={onOpenEmbed} /> - {gate('video_debug') && ( - <VideoEmbed source="https://lumi.jazco.dev/watch/did:plc:q6gjnaw2blty4crticxkmujt/Qmc8w93UpTa2adJHg4ZhnDPrBs1EsbzrekzPcqF5SwusuZ/playlist.m3u8" /> - )} + <VideoDebug /> <PostCtrls post={post} record={record} @@ -501,6 +498,19 @@ function ReplyToLabel({ ) } +function VideoDebug() { + const gate = useGate() + const id = useId() + + if (!gate('video_debug')) return null + + return ( + <VideoEmbed + source={`https://lumi.jazco.dev/watch/did:plc:q6gjnaw2blty4crticxkmujt/Qmc8w93UpTa2adJHg4ZhnDPrBs1EsbzrekzPcqF5SwusuZ/playlist.m3u8?ignore_me_just_testing_frontend_stuff=${id}`} + /> + ) +} + const styles = StyleSheet.create({ outer: { paddingLeft: 10, |