Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/expose control props #332

Merged
merged 13 commits into from Aug 25, 2022

Conversation

cjpillsbury
Copy link
Contributor

@cjpillsbury cjpillsbury commented Aug 11, 2022

Adding props & attributes to mux player react to support configurable:

  • playback rates
  • hiding duration
  • defaulting to show remaining time

Also pre-reqs for this PR:

  • update repo docs
  • update mux-player tests

This is based on current goals for control customization.

@vercel
Copy link

vercel bot commented Aug 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
elements-demo-create-react-app ✅ Ready (Inspect) Visit Preview Aug 25, 2022 at 2:21PM (UTC)
elements-demo-nextjs ✅ Ready (Inspect) Visit Preview Aug 25, 2022 at 2:21PM (UTC)
elements-demo-svelte-kit ✅ Ready (Inspect) Visit Preview Aug 25, 2022 at 2:21PM (UTC)
elements-demo-vanilla ✅ Ready (Inspect) Visit Preview Aug 25, 2022 at 2:21PM (UTC)
elements-demo-vue ✅ Ready (Inspect) Visit Preview Aug 25, 2022 at 2:21PM (UTC)

@codecov
Copy link

codecov bot commented Aug 11, 2022

Codecov Report

Merging #332 (8e7024f) into main (3858f9c) will decrease coverage by 0.58%.
The diff coverage is 48.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #332      +/-   ##
==========================================
- Coverage   80.83%   80.25%   -0.59%     
==========================================
  Files          38       38              
  Lines        4722     4800      +78     
  Branches      154      156       +2     
==========================================
+ Hits         3817     3852      +35     
- Misses        896      939      +43     
  Partials        9        9              
Impacted Files Coverage Δ
packages/mux-player/src/index.ts 69.15% <21.95%> (-1.99%) ⬇️
...ckages/mux-player/src/media-chrome/time-display.ts 67.41% <40.00%> (-8.30%) ⬇️
.../mux-player/src/media-theme-mux/media-theme-mux.ts 80.51% <68.42%> (+0.38%) ⬆️
packages/mux-player/src/helpers.ts 91.42% <100.00%> (+0.47%) ⬆️
packages/mux-player/src/template.ts 95.91% <100.00%> (+0.19%) ⬆️

@@ -80,6 +80,8 @@ export const content = (props: MuxTemplateProps) => html`
default-hidden-captions="${props.defaultHiddenCaptions}"
forward-seek-offset="${props.forwardSeekOffset}"
backward-seek-offset="${props.backwardSeekOffset}"
playbackrates="${props.playbackRates ?? false}"
hide-duration="${props.hideDuration ?? false}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: This was another case of attributes vs. props from getProps stepping on toes, where, even for a boolean, I have to handle this with nullish coalescing.

Copy link
Contributor

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thought

packages/mux-player/src/index.ts Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants