Skip to content

Commit

Permalink
Fix mobile playback for default video
Browse files Browse the repository at this point in the history
  • Loading branch information
collidingScopes authored Dec 12, 2024
1 parent 162bf9b commit c284217
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<canvas id="canvas"></canvas>

<video id="defaultVideo" class=" hidden" width="480px" height="848px" loop muted playsinline>
<video id="defaultVideo" class="hidden" width="480px" height="848px" loop muted playsinline>
<source src="assets/waves.mp4" type="video/mp4" />
</video>

Expand Down
5 changes: 3 additions & 2 deletions pixelShader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Write about section, footer section, site OG tags
Clean up code / remove commented out code
Review CSS / page layout / margins
Mobile functionality testing
Rename page title, github repo, etc...
*/

// DOM Elements
Expand Down Expand Up @@ -510,8 +511,8 @@ function useDefaultVideo() {
cleanupVideoSource();

const video = document.querySelector('#defaultVideo');
video.setAttribute('playsinline', '');
video.setAttribute('webkit-playsinline', '');
video.setAttribute('playsinline', 'playsinline');
video.setAttribute('webkit-playsinline', 'webkit-playsinline');
video.setAttribute('crossorigin', 'anonymous');

// Create object URL for the uploaded file
Expand Down

0 comments on commit c284217

Please sign in to comment.