diff --git a/packages/fakeyou.com/src/v2/view/pages/landing/LandingPage.tsx b/packages/fakeyou.com/src/v2/view/pages/landing/LandingPage.tsx
index eafc84f8f3..037f31a146 100644
--- a/packages/fakeyou.com/src/v2/view/pages/landing/LandingPage.tsx
+++ b/packages/fakeyou.com/src/v2/view/pages/landing/LandingPage.tsx
@@ -43,6 +43,8 @@ function LandingPage(props: Props) {
const isLoggedIn = props.sessionWrapper.isLoggedIn();
+ const canAccessStudio = props.sessionWrapper.canAccessStudio();
+
return (
<>
{domain.website === Website.StorytellerAi && !isLoggedIn && (
@@ -79,7 +81,7 @@ function LandingPage(props: Props) {
{/* STORYTELLER,AI */}
{!isLoggedIn ? (
<>
-
+ {!canAccessStudio &&
}
(null);
const [activeIndex, setActiveIndex] = useState(0);
- const [isPlaying, setIsPlaying] = useState(true);
+ // const [isPlaying, setIsPlaying] = useState(true);
// const togglePlayback = () => {
// setIsPlaying(!isPlaying);
// };
- const handleVideoPlay = () => {
- if (!isPlaying) {
- setIsPlaying(true);
- }
- };
+ // const handleVideoPlay = () => {
+ // if (!isPlaying) {
+ // setIsPlaying(true);
+ // }
+ // };
- const handleVideoPause = () => {
- if (isPlaying) {
- setIsPlaying(false);
- }
- };
+ // const handleVideoPause = () => {
+ // if (isPlaying) {
+ // setIsPlaying(false);
+ // }
+ // };
- const videoRef = useRef(null);
+ // const videoRef = useRef(null);
- useEffect(() => {
- if (videoRef.current) {
- if (isPlaying) {
- videoRef.current.play();
- } else {
- videoRef.current.pause();
- }
- }
- }, [isPlaying]);
+ // useEffect(() => {
+ // if (videoRef.current) {
+ // if (isPlaying) {
+ // videoRef.current.play();
+ // } else {
+ // videoRef.current.pause();
+ // }
+ // }
+ // }, [isPlaying]);
const videoSet = [
{
src: "/videos/landing/vst/1-original.mp4",
+ thumbnail: "/videos/landing/vst/1-original.jpg",
styledVideos: [
{
src: "/videos/landing/vst/1-2d_flat_anime.mp4",
@@ -80,6 +81,7 @@ export default function VstSectionV2(props: VstSectionV2Props) {
},
{
src: "/videos/landing/vst/2-original.mp4",
+ thumbnail: "/videos/landing/vst/2-original.jpg",
styledVideos: [
{
src: "/videos/landing/vst/2-2d_flat_anime.mp4",
@@ -157,16 +159,17 @@ export default function VstSectionV2(props: VstSectionV2Props) {
muted
playsInline
controls={false}
+ preload="auto"
key={`${index}-${activeIndex}`}
- onPlay={handleVideoPlay}
- onPause={handleVideoPause}
- ref={videoRef => {
- if (videoRef && isPlaying) {
- videoRef.play();
- } else if (videoRef) {
- videoRef.pause();
- }
- }}
+ // onPlay={handleVideoPlay}
+ // onPause={handleVideoPause}
+ // ref={videoRef => {
+ // if (videoRef && isPlaying) {
+ // videoRef.play();
+ // } else if (videoRef) {
+ // videoRef.pause();
+ // }
+ // }}
>
Your browser does not support the video tag.
@@ -186,10 +189,10 @@ export default function VstSectionV2(props: VstSectionV2Props) {
{videoSet.map((video, index) => (
-
+
))}
@@ -218,16 +221,17 @@ export default function VstSectionV2(props: VstSectionV2Props) {
muted
playsInline
controls={false}
+ preload="auto"
key={styledVideo.src}
- onPlay={handleVideoPlay}
- onPause={handleVideoPause}
- ref={videoRef => {
- if (videoRef && isPlaying) {
- videoRef.play();
- } else if (videoRef) {
- videoRef.pause();
- }
- }}
+ // onPlay={handleVideoPlay}
+ // onPause={handleVideoPause}
+ // ref={videoRef => {
+ // if (videoRef && isPlaying) {
+ // videoRef.play();
+ // } else if (videoRef) {
+ // videoRef.pause();
+ // }
+ // }}
>
Your browser does not support the video tag.
diff --git a/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/OnboardingSelection/OnboardingSelection.tsx b/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/OnboardingSelection/OnboardingSelection.tsx
index 7620cc1ded..dfa84bb460 100644
--- a/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/OnboardingSelection/OnboardingSelection.tsx
+++ b/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/OnboardingSelection/OnboardingSelection.tsx
@@ -10,31 +10,31 @@ export default function OnboardingSelection(props: OnboardingSelectionProps) {
const cards = [
{
- text: "Scene 1",
- backgroundImage: "",
+ text: "Room Scene",
+ backgroundImage: "/images/landing/onboarding/room-scene-thumbnail.webp",
onClick: () => {
- history.push("/studio-intro/");
+ history.push("/studio-intro/m_ejhs95fc5aybp36h4a79k7523ds6an");
},
},
{
text: "Scene 2",
backgroundImage: "",
onClick: () => {
- history.push("/studio-intro/");
+ history.push("/studio-intro");
},
},
{
text: "Scene 3",
backgroundImage: "",
onClick: () => {
- history.push("/studio-intro/");
+ history.push("/studio-intro");
},
},
{
text: "Scene 4",
backgroundImage: "",
onClick: () => {
- history.push("/studio-intro/");
+ history.push("/studio-intro");
},
},
];
diff --git a/packages/fakeyou.com/src/v2/view/pages/storyteller_studio_intro/StudioIntroPage.tsx b/packages/fakeyou.com/src/v2/view/pages/storyteller_studio_intro/StudioIntroPage.tsx
index 360a8360c9..de7662cf56 100644
--- a/packages/fakeyou.com/src/v2/view/pages/storyteller_studio_intro/StudioIntroPage.tsx
+++ b/packages/fakeyou.com/src/v2/view/pages/storyteller_studio_intro/StudioIntroPage.tsx
@@ -19,7 +19,6 @@ interface Props {
}
function StudioIntroPage(props: Props) {
- const [camera,cameraSet] = useState("rotation");
const { mediaToken } = useParams<{ mediaToken: string }>();
const history = useHistory();
@@ -32,11 +31,28 @@ function StudioIntroPage(props: Props) {
// for subsequent steps of this flow.
const [savedMediaToken, setSavedMediaToken] = useState(mediaToken);
+ // We don't show the "next step" buttons until the engine loads.
+ // Unfortunately the engine sometimes fires this twice, with one instance
+ // being called before the scene loads. Until this is fixed, we'll count the
+ // number of event fires and assume we must have two calls.
+ const [sceneIsLoadedCount, sceneIsLoadedCountSet] = useState(0);
+
+ // If the scene is saved, we know the user must have interacted.
+ // This can serve as a second optional gate for enabling the next steps.
+ const [sceneIsSaved, sceneIsSavedSet] = useState(false);
+
+ const [camera, cameraSet] = useState("rotation");
+
usePrefixedDocumentTitle("Storyteller Studio");
const onSaveCallback = useCallback((sceneMediaToken: string) => {
setSavedMediaToken(sceneMediaToken);
- }, [setSavedMediaToken]);
+ sceneIsSavedSet(true); // Just in case we missed the "scene loaded" event.
+ }, [setSavedMediaToken, sceneIsSavedSet]);
+
+ const onSceneReadyCallback = useCallback(() => {
+ sceneIsLoadedCountSet(sceneIsLoadedCount + 1);
+ }, [sceneIsLoadedCount, sceneIsLoadedCountSet])
if (!props.sessionWrapper.canAccessStudio()) {
return ;
@@ -84,6 +100,30 @@ function StudioIntroPage(props: Props) {
value: "static"
}];
+ const sceneIsLoaded = sceneIsLoadedCount > 1 || sceneIsSaved;
+
+ let progressButtons = <>>;
+
+ if (sceneIsLoaded) {
+ progressButtons = (
+ <>
+
+
+
+ Add camera motion to render
+
+
+
+ {
+ cameraSet(target.value)
+ }, options: cameraOpts, value: camera }}/>
+
+
+
+ >
+ )
+ }
+
return (
-
-
-
- Add camera motion to render
-
-
-
- {
- cameraSet(target.value)
- }, options: cameraOpts, value: camera }}/>
-
-
-
+
+ {progressButtons}
);
}
diff --git a/packages/fakeyou.com/src/v2/view/pages/storyteller_studio_intro/StudioVST/StudioVSTPage.tsx b/packages/fakeyou.com/src/v2/view/pages/storyteller_studio_intro/StudioVST/StudioVSTPage.tsx
index 88f65b8da2..7a87fb65b2 100644
--- a/packages/fakeyou.com/src/v2/view/pages/storyteller_studio_intro/StudioVST/StudioVSTPage.tsx
+++ b/packages/fakeyou.com/src/v2/view/pages/storyteller_studio_intro/StudioVST/StudioVSTPage.tsx
@@ -75,23 +75,23 @@ export default function PageVSTApp() {
const styleOptions = [
{
- label: "Anime",
- imageUrl: "/images/dummy-image.jpg",
+ label: "2D Anime",
+ imageUrl: "/images/landing/onboarding/styles/style-2d-anime.webp",
token: "weight_yqexh77ntqyawzgh9fzash798",
},
{
- label: "Pixel",
- imageUrl: "/images/dummy-image-2.jpg",
+ label: "3D Cartoon",
+ imageUrl: "/images/landing/onboarding/styles/style-3d-cartoon.webp",
token: "weight_yqexh77ntqyawzgh9fzash798",
},
{
- label: "Painting",
- imageUrl: "/images/dummy-image-3.jpg",
+ label: "Ink B&W",
+ imageUrl: "/images/landing/onboarding/styles/style-ink-bw.webp",
token: "weight_yqexh77ntqyawzgh9fzash798",
},
{
- label: "Ink",
- imageUrl: "/images/dummy-image-4.jpg",
+ label: "Origami",
+ imageUrl: "/images/landing/onboarding/styles/style-origami.webp",
token: "weight_yqexh77ntqyawzgh9fzash798",
},
];