Skip to content

Google cast support with docs#293

Open
gelotte wants to merge 3 commits intovideo-react:masterfrom
gelotte:google_cast
Open

Google cast support with docs#293
gelotte wants to merge 3 commits intovideo-react:masterfrom
gelotte:google_cast

Conversation

@gelotte
Copy link
Copy Markdown

@gelotte gelotte commented Jun 29, 2019

A very simple implementation of a cast sender application, for Chromecast and other receivers. The only working button in the control bar is the PlayToggle. This can serve as a base for further implementation of the components required by projects.

I made a CastPlayToggle component that wraps the regular PlayToggle so the easiest implementation is to disable the default controls and use this one instead. Another way is to let the CastPlayToggle handle only the "remote player" and switching between controls in the ControlBar component instead, i.e.

<PlayToggle disabled={this.state.isCasting} />
<CastPlayToggle disabled={!this.state.isCasting} />

Let me know if anyone has thoughts about other approaches to the local/remote player controls and state display.

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #293 into master will increase coverage by 0.44%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   48.04%   48.48%   +0.44%     
==========================================
  Files          47       48       +1     
  Lines        1278     1291      +13     
==========================================
+ Hits          614      626      +12     
- Misses        664      665       +1
Impacted Files Coverage Δ
src/components/control-bar/CastPlayToggle.js 92.3% <92.3%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c31635...49ce194. Read the comment docs.

@mondaychen
Copy link
Copy Markdown
Member

Thank you for submitting such a high-quality PR! However, at this moment I don't think it's a good idea to add a component in video-react just for Google Cast since it's not widely used. Video-react is highly customizable at many levels, so users can add the feature to support Google Cast by creating their own components.

It will be nice if you can keep it a simple and clear doc page (like https://video-react.js.org/customize/customize-source/) demonstrating this use case.

@stolinski
Copy link
Copy Markdown

I respectfully disagree that Google Cast is not widely used. It's extremely popular and expected functionality.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 24, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.48%. Comparing base (4c31635) to head (49ce194).
⚠️ Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
src/components/control-bar/CastPlayToggle.js 92.30% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   48.04%   48.48%   +0.44%     
==========================================
  Files          47       48       +1     
  Lines        1278     1291      +13     
==========================================
+ Hits          614      626      +12     
- Misses        664      665       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

5 participants