-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Videos] Video player - PR #1 - basic player #4731
Conversation
Your Render PR Server URL is https://social-app-pr-4731.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cq3fl6aj1k6c73fqd5a0. |
The Pull Request introduced fingerprint changes against the base commit: Fingerprint diff[{"type":"file","filePath":"package.json","reasons":["expoConfigPlugins"],"hash":"0f3b60558eddc1ed3905fe647b04f853cf1612bb"},{"type":"dir","filePath":"node_modules/expo-video/android","reasons":["expoAutolinkingAndroid"],"hash":"457855e16ebdbf23264e26af22dafdbaae35b0e8"},{"type":"dir","filePath":"patches","reasons":["patchPackage"],"hash":"229ffcdfaa62ce8cfdfe434d1f8354f0d34d20c9"}] Generated by PR labeler 🤖 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick glance this looks good. Gonna be tweaking it over time, so didn't super thoroughly test it.
} | ||
}, []) | ||
|
||
useFrameCallback(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to be using this at all on web? I assume not with the intersection observer route it sounds like we're going to take.
I think I'm going to be using this a little in this implementation I cooked up on paper, but its fine to leave this logic here for now (or just empty this out, doesn't really matter)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, impl on web will be completely different
|
||
import {atoms as a} from '#/alf' | ||
|
||
export const VideoEmbedInner = ({source}: {source: string}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not reviewing this because i think we address it on part 2, correct me if wrong tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct!
src/view/com/posts/FeedItem.tsx
Outdated
@@ -348,6 +349,7 @@ let FeedItemInner = ({ | |||
postAuthor={post.author} | |||
onOpenEmbed={onOpenEmbed} | |||
/> | |||
<VideoEmbed source="https://vid.jazco.dev/watch/did:plc:q6gjnaw2blty4crticxkmujt/QmVdiZ6Bw6rTD98NTJzFWdmCTnWgiVcR7qxt127X5Km1JG/playlist.m3u8" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remember to remove this line before merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or gate :)
@mozzius Hi, did you encounter this on component unmount while testing it?
I tried to use the While using this though the error went away (and functionality remains the same): const checkInView = useCallback(() => {
'worklet';
if (!aref) return;
const measurement = measure(aref);
if (measurement === null) {
return;
}
if (
measurement.pageY >= 0 &&
measurement.pageY + measurement.height <= windowHeight
) {
if (hasLeftView.value) {
runOnJS(onEnterView)();
hasLeftView.value = false;
}
} else {
if (!hasLeftView.value) {
runOnJS(onLeaveView)();
hasLeftView.value = true;
}
}
}, [aref, hasLeftView, onEnterView, onLeaveView, windowHeight]);
useEffect(() => {
const interval = setInterval(() => {
runOnUI(checkInView)();
}, 500);
return () => clearInterval(interval);
}, [checkInView]); I believe this is ligther too since it calls every |
@efstathiosntonas We're not actually using that anyway in favor of a better solution (thankfully!) There is some context on why the interval trick doesn't work in all cases and why
If it's useful I don't mind sharing, gotta dig up the PR where I added it. |
* origin/main: (30 commits) Only show "followed you back" when appropriate (#4849) [Web] Retrigger onEndReached if needed when content height changes (#4859) Remove unused NoopFeedTuner (#4856) useDedupe callback (#4855) [Video] Uploads (#4754) Make label required in link components (#4844) Boolean filter improvement alternative: TS upgrade (#4840) Add label to profile card (#4843) Improve a11y on noty feed (#4842) Add labels in feed card (#4836) Add labels to mod details dialog (#4839) Add labels to a few missing places (#4838) Add labels in list card (#4837) Refactor feed slices (#4834) `true` (#4833) Replace `import hairlineWidth =` with const (#4831) [Videos] Video player - PR #1 - basic player (#4731) Bump 1.90 (#4832) Fix sloppy filter(Boolean) types (#4830) Fuggedaboudit (#4829) ...
* origin/main: (37 commits) Only show "followed you back" when appropriate (#4849) [Web] Retrigger onEndReached if needed when content height changes (#4859) Remove unused NoopFeedTuner (#4856) useDedupe callback (#4855) [Video] Uploads (#4754) Make label required in link components (#4844) Boolean filter improvement alternative: TS upgrade (#4840) Add label to profile card (#4843) Improve a11y on noty feed (#4842) Add labels in feed card (#4836) Add labels to mod details dialog (#4839) Add labels to a few missing places (#4838) Add labels in list card (#4837) Refactor feed slices (#4834) `true` (#4833) Replace `import hairlineWidth =` with const (#4831) [Videos] Video player - PR #1 - basic player (#4731) Bump 1.90 (#4832) Fix sloppy filter(Boolean) types (#4830) Fuggedaboudit (#4829) ...
Stacked on #4638
Basic video player. Other stuff is stacked on it, probably don't merge until those are ready