This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reconfigure
Video
options to optimize for user's settings around au…
…toplay (#276) * show video controls on hover; show play button for browsers with disabled autoplay * Merge branch 'main' into video-controls * main: Add the catalog site (#137) Delete dependabot.yml Only direct dependencies Create dependabot.yml (#296) Update Travis bad Update devDependencies (#294) * Add example * More comments * Reduce changes * eslint and fix button styles * Clean up button * Set playsInline to true if autoPlay is true; make `muted` a prop * Update test cases description to indicate the autoplay state * Update description * Update snapshots * Update CHANGELOG.md * Create `playsInline` prop * Append hash to src to enable preview on iOS * Update video.js * Adds optional `poster` prop * Remove hack * Add poster example * Fix paths * Update descriptions * Apply suggestions from code review
- Loading branch information
Katy DeCorah
authored
Apr 22, 2021
1 parent
979d521
commit f54d0a3
Showing
9 changed files
with
407 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
172 changes: 164 additions & 8 deletions
172
src/components/video/__tests__/__snapshots__/video.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
The video will not autoplay. Uses `poster` to set preview image. | ||
*/ | ||
import React from 'react'; | ||
import Video from '../video'; | ||
|
||
export default class Example extends React.PureComponent { | ||
render() { | ||
return ( | ||
<Video | ||
autoplay={false} | ||
poster="../files/browser-example-mp4-poster.png" | ||
src="../files/browser-example.mp4" | ||
title="A video!" | ||
/> | ||
); | ||
} | ||
} |
Oops, something went wrong.