Skip to content

Commit

Permalink
Hide camera examples on iOS Safari for now (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhawryluk authored Jan 15, 2025
1 parent 0142a4a commit 18bc9c4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
7 changes: 6 additions & 1 deletion apps/typegpu-docs/src/components/ExampleLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ function SideMenu() {

<hr className="my-0 box-border w-full border-t border-tameplum-100" />

<ExampleList excludeTags={isDev ? [] : ['experimental']} />
<ExampleList
excludeTags={[
isDev ? [] : ['experimental'],
typeof MediaStreamTrackProcessor === 'undefined' ? ['camera'] : [],
].flat()}
/>

<div className="flex justify-between text-tameplum-800 text-xs">
<div>&copy; 2024 Software Mansion S.A.</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"title": "Camera Thresholding",
"category": "image-processing"
"category": "image-processing",
"tags": ["camera"]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"title": "Chroma Keying",
"category": "image-processing"
"category": "image-processing",
"tags": ["camera"]
}
5 changes: 5 additions & 0 deletions apps/typegpu-docs/src/utils/examples/exampleContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ export const examplesStable = pipe(
examples,
entries(),
filter(([_, example]) => !example.metadata.tags?.includes('experimental')),
filter(([_, example]) =>
example.metadata.tags?.includes('camera')
? typeof MediaStreamTrackProcessor === 'undefined'
: true,
),
fromEntries(),
);

Expand Down

0 comments on commit 18bc9c4

Please sign in to comment.