Skip to content

Commit

Permalink
Update styling on the custom receiver
Browse files Browse the repository at this point in the history
- Adds a new splash screen to the custom receiver
- Also change refresh interval to 7m so that we're under the current CC
  10m timeout threshold

Signed-off-by: John Strunk <[email protected]>
  • Loading branch information
JohnStrunk committed May 12, 2023
1 parent 3abba58 commit af26f29
Show file tree
Hide file tree
Showing 5 changed files with 81,886 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ repos:
rev: v3.2.0
hooks:
- id: check-added-large-files # Prevents giant files from being committed
exclude: |
(?x)^(
chromecast-receiver/cc-receiver-logo.png|
media/cc-receiver-logo.svg
)$
- id: check-yaml # Checks yaml files for parseable syntax
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline
- id: trailing-whitespace # Trims trailing whitespace
Expand Down
Binary file added chromecast-receiver/cc-receiver-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions chromecast-receiver/receiver.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@

<head>
<title>Wahoo Results!</title>
<!-- Web Receiver SDK -->
<script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js"></script>
</head>

<body>
<cast-media-player></cast-media-player>
<style>
body {
/* https://developers.google.com/cast/docs/web_receiver/customize_ui */
--playback-logo-image: url('logo.png'); /* Logo image is displayed on launch */
/* https://developers.google.com/cast/docs/web_receiver/customize_ui */
cast-media-player {
--logo-image: url('cc-receiver-logo.png'); /* Logo image is displayed on launch */
}

</style>
<script>
const context = cast.framework.CastReceiverContext.getInstance();
const options = new cast.framework.CastReceiverOptions();
// https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.CastReceiverOptions
options.disableIdleTimeout = true; // Prevent receiver from shutting down due to inactivity
// options.maxInactivity = 3600;

context.start(options);
</script>
</body>
Expand Down
3 changes: 2 additions & 1 deletion imagecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
IMAGE_SIZE = (1280, 720)

# Chromecast image refresh interval (seconds)
_REFRESH_INTERVAL = 15 * 60
# Newer versions of the Chromecast firmware seem to have a 10 minute timeout
_REFRESH_INTERVAL = 7 * 60

# Chomecast application id
_WAHOO_RESULTS_APP_ID = "34B218B6"
Expand Down
Loading

0 comments on commit af26f29

Please sign in to comment.