Files
Joey ParrishandClaude Code 154b837f2c feat(Demo): Replace Material Icons font with inline SVGs (#10156)
The player UI previously moved from a Material Design icons font to
inline SVGs, but the demo still loaded the "Material Icons Round" web
font from Google Fonts. Convert the demo to inline SVGs and drop the
font dependency.

- Add demo/icons.js: the SVG path data the demo needs plus a small
makeSvgIcon helper, mirroring shaka.ui.Icon but self-contained so the
demo does not depend on UI-internal classes.
- Convert the demo's own icon usages (config, input_container,
asset_card, custom, and the drawer close button in index.html) to inline
SVGs.
- Render MDL's drawer toggle button (a settings gear, set via MDL's
MENU_ICON) by appending an inline SVG to MDL's icon element in
setupPlayer_, instead of relying on the font.
- Remove the Google Fonts stylesheet link and the now-dead fonts.gstatic
preconnect from both demo HTML files, and drop the .material-icons
font-family override and line-height fix from demo.less.

Co-authored-by: Claude Code (Opus 4.8) <[email protected]>
2026-06-01 09:39:14 +02:00

78 lines
2.7 KiB
HTML

<!DOCTYPE html>
<!--
Copyright 2016 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shaka Player Cast Demo</title>
<link rel="preconnect" href="https://www.gstatic.com">
<link rel="stylesheet" href="../../dist/controls.css">
<link rel="stylesheet" href="receiver_app.css">
<!-- MPEG-5 Part2 LCEVC support is enabled by including this: -->
<script defer src="../../node_modules/lcevc_dec.js/dist/lcevc_dec.min.js"></script>
<script defer src="https://www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script>
<!-- Include IMA SDK to enable client-side ad insertion: -->
<script type="text/javascript" src="https://imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
<!-- Include IMA DAI SDK to enable server-side ad insertion: -->
<script type="text/javascript" src="https://imasdk.googleapis.com/js/sdkloader/ima3_dai.js"></script>
<script>
COMPILED_JS = [
// The compiled library, with all features + experimental.
'../../dist/shaka-player.experimental.js',
// The compiled receiver app.
'../../dist/receiver.compiled.js',
];
COMPILED_DEBUG_JS = [
// The compiled library, with all features + experimental, debug mode.
'../../dist/shaka-player.experimental.debug.js',
// The compiled receiver app.
'../../dist/receiver.compiled.debug.js',
];
UNCOMPILED_JS = [
// Bootstrap the Shaka Player library through the Closure library.
'../../node_modules/google-closure-library/closure/goog/base.js',
'../../dist/deps.js',
// This file contains goog.require calls for all exported library classes.
'../../shaka-player.uncompiled.js',
// These are the individual parts of the receiver app.
'../common/asset.js',
'../common/assets.js',
'receiver_app.js',
];
</script>
<!-- Load the compiled or uncompiled version of the code. -->
<script defer src="../load.js"></script>
</head>
<body>
<div data-shaka-player-container id="video-container">
<video autoplay data-shaka-player id="video"></video>
</div>
<!-- Covers everything else while idle -->
<div id="welcome">
<div class="version-string"></div>
</div>
</body>
</html>