Skip to content

Commit

Permalink
test(mediaAspect): log to debug on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
evandrododo committed Dec 9, 2023
1 parent f52c49e commit ff559d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/VideoPlane/VideoPlane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { useControls } from "leva";

export const VideoPlane = ({ userMedia }: { userMedia: MediaStream }) => {
// shaders options on leva: Chroma, Edge
const { shader } = useControls({
const { shader,
} = useControls({
shader: {
value: "edge",
options: ["chroma", "edge"],
Expand All @@ -17,8 +18,7 @@ export const VideoPlane = ({ userMedia }: { userMedia: MediaStream }) => {
const mediaHeight = userMedia.getVideoTracks()[0].getSettings().height || 1;
const mediaAspect = mediaWidth / mediaHeight;
const size = useAspect(mediaAspect, 1, 0.1);
console.log("mediaAspect", mediaAspect);

console.log("userMedia.getVideoTracks()[0].getSettings()", userMedia.getVideoTracks()[0].getSettings());
return (
<mesh scale={size} position={[0, 0, 0]}>
<planeGeometry />
Expand Down

0 comments on commit ff559d0

Please sign in to comment.