Skip to content

Commit 1dd857c

Browse files
authored
fix: Add playsinline attribute to video elements (#1082)
1 parent 0de5398 commit 1dd857c

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
**TypeGPU** is a TypeScript library that enhances the WebGPU API, allowing resource management in a type-safe, declarative way.
1111

1212
<div align="center">
13-
<video width="512" autoplay muted loop src="https://github.com/user-attachments/assets/5bca716d-477d-44a1-a839-5df0c8d9044c"></video>
13+
<video width="512" autoplay muted loop playsinline src="https://github.com/user-attachments/assets/5bca716d-477d-44a1-a839-5df0c8d9044c"></video>
1414
</div>
1515

1616
## Documentation
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<video width="400" height="300" autoplay style="object-fit: fill"></video>
1+
<video width="400" height="300" autoplay playsinline style="object-fit: fill"></video>
22
<canvas width="400" height="300"></canvas>

apps/typegpu-docs/src/content/examples/image-processing/chroma-keying-next/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<div class="rgb" style="padding: 1rem; background: white;">R: 0 G: 255 B: 0</div>
44
</div>
55
<div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;">
6-
<video width="400" height="300" autoplay style="object-fit: fill"></video>
6+
<video width="400" height="300" autoplay playsinline style="object-fit: fill"></video>
77
<canvas width="400" height="300"></canvas>
88
</div>

apps/typegpu-docs/src/content/examples/image-processing/chroma-keying/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<div class="rgb" style="padding: 1rem; background: white;">R: 0 G: 255 B: 0</div>
44
</div>
55
<div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;">
6-
<video width="400" height="300" autoplay style="object-fit: fill"></video>
6+
<video width="400" height="300" autoplay playsinline style="object-fit: fill"></video>
77
<canvas width="400" height="300"></canvas>
88
</div>

apps/typegpu-docs/src/pages/index.astro

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
22
import { Image } from 'astro:assets';
3-
import FeatureCard from '../components/FeatureCard.astro';
4-
import GetStartedButton from '../components/GetStartedButton.astro';
5-
import FooterLink from '../components/FooterLink.astro';
6-
import PageLayout from '../layouts/PageLayout.astro';
73
import DiscordIconSvg from '../assets/discord-icon.svg';
4+
import GiantTypeGPULogo from '../assets/giant-typegpu.svg';
85
import GithubIconSvg from '../assets/github-icon.svg';
9-
import SwmLogomarkSvg from '../assets/swm-logomark.svg';
6+
import Illustration from '../assets/illustration.svg';
107
import SwmLogoSvg from '../assets/swm-logo.svg';
8+
import SwmLogomarkSvg from '../assets/swm-logomark.svg';
119
import TypeGPULogoLight from '../assets/typegpu-logo-light.svg';
1210
import TypeGPULogomarkMonolight from '../assets/typegpu-logomark-monolight.svg';
13-
import GiantTypeGPULogo from '../assets/giant-typegpu.svg';
14-
import Illustration from '../assets/illustration.svg';
15-
import RoadMapStep from '../components/roadmap/RoadMapStep.astro';
16-
import MilestoneBuffersBadge from '../components/roadmap/MilestoneBuffersBadge.astro';
11+
import FeatureCard from '../components/FeatureCard.astro';
12+
import FooterLink from '../components/FooterLink.astro';
13+
import GetStartedButton from '../components/GetStartedButton.astro';
1714
import MilestoneBindGroupsBadge from '../components/roadmap/MilestoneBindGroupsBadge.astro';
18-
import MilestoneFunctionsBadge from '../components/roadmap/MilestoneFunctionsBadge.astro';
19-
import MilestonePipelinesBadge from '../components/roadmap/MilestonePipelinesBadge.astro';
15+
import MilestoneBuffersBadge from '../components/roadmap/MilestoneBuffersBadge.astro';
2016
import MilestoneCodeBadge from '../components/roadmap/MilestoneCodeBadge.astro';
17+
import MilestoneFunctionsBadge from '../components/roadmap/MilestoneFunctionsBadge.astro';
2118
import MilestoneLinkerBadge from '../components/roadmap/MilestoneLinkerBadge.astro';
19+
import MilestonePipelinesBadge from '../components/roadmap/MilestonePipelinesBadge.astro';
20+
import RoadMapStep from '../components/roadmap/RoadMapStep.astro';
21+
import PageLayout from '../layouts/PageLayout.astro';
2222
2323
const showcaseVideoResolution = [2048, 1200];
2424
---
@@ -98,10 +98,11 @@ const showcaseVideoResolution = [2048, 1200];
9898
aspectRatio:
9999
showcaseVideoResolution[0] / showcaseVideoResolution[1],
100100
}}
101-
autoplay="true"
102-
loop="true"
103-
muted="true"
104-
controls="true"
101+
autoplay
102+
loop
103+
muted
104+
controls
105+
playsinline
105106
class="w-full lg:rounded-[2.5rem] md:rounded-[1.875rem] rounded-2xl shadow-tameplum-800/50 shadow-lg"
106107
></video>
107108
</div>

packages/typegpu/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
**TypeGPU** is a TypeScript library that enhances the WebGPU API, allowing resource management in a type-safe, declarative way.
1111

1212
<div align="center">
13-
<video autoplay muted loop src="https://github.com/user-attachments/assets/5bca716d-477d-44a1-a839-5df0c8d9044c"></video>
13+
<video autoplay muted loop playsinline src="https://github.com/user-attachments/assets/5bca716d-477d-44a1-a839-5df0c8d9044c"></video>
1414
</div>
1515

1616
## Documentation

0 commit comments

Comments
 (0)