some small improvements to make the ui better for testing

Signed-off-by: Manuel <manuel@kmpr.at>
This commit is contained in:
Manuel Kamper 2024-11-01 09:44:05 +01:00
parent 2bacace72f
commit 8e15edf239
3 changed files with 51 additions and 42 deletions

BIN
img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<title>FTMS Rower | Concept</title> <title>FTMS Video Rower | Demo</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/main.css">
@ -12,12 +12,17 @@
</head> </head>
<body> <body>
<h1>FTMS Rower | Concept</h1>
<h2>Connect rower</h2> <h1>FTMS Video Rower | Demo</h1>
<p><button id="bleConnectionButton">Connect FTMS BLE Rower</button></p> <p><button id="bleConnectionButton">Connect FTMS BLE Rower</button></p>
<h2>Training stats</h2> <div class="setupinfo">
<h2>Usage information</h2>
<p>Connect your rower via bluetooth using the button above. Once connected, it will show your live training stats and the training video here.<br><br></p>
<p>If you found a bug, or want to contribute to this open source project, visit us at <a href="https://git.kmpr.at/FTMS-Rower" target="_blank">https://git.kmpr.at/FTMS-Rower</a>
</div>
<div class="training">
<div class="cards"> <div class="cards">
<div class="card"> <div class="card">
<div class="name">Pace</div> <div class="name">Pace</div>
@ -44,24 +49,28 @@
</div> </div>
</div> </div>
<h2>Rowing video</h2>
<video id="rowing_video" class="video-js" controls preload="none" width="640" height="480" poster="video/posters/video.png" data-setup="{}"> <video id="rowing_video" class="video-js" controls preload="none" width="640" height="480" poster="video/posters/video.png" data-setup="{}">
<source src="video/video.mp4" type="video/mp4"> <source src="video/video.mp4" type="video/mp4">
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p> <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
</video> </video>
</div>
<footer>
<p>&copy; 2024 by <a href="https://www.kmpr.at" target="_blank">Manuel Kamper - kmpr.at</a> | Git: <a href="https://git.kmpr.at/FTMS-Rower" target="_blank">https://git.kmpr.at/FTMS-Rower</a></p>
</footer>
</body> </body>
<script> <script>
//navigation menu
//hide player controls in video.js
const player = videojs('rowing_video'); //hide player controls in video.js
player.bigPlayButton.hide(); //just don't show it const player = videojs('rowing_video');
player.controlBar.playToggle.dispose(); //remove completely player.bigPlayButton.hide(); //just don't show it
player.controlBar.progressControl.disable(); //show, but disallow user to use it player.controlBar.playToggle.dispose(); //remove completely
player.controlBar.fullscreenToggle.dispose(); player.controlBar.progressControl.disable(); //show, but disallow user to use it
player.controlBar.pictureInPictureToggle.dispose(); player.controlBar.fullscreenToggle.dispose();
player.controlBar.playbackRateMenuButton.disable(); player.controlBar.pictureInPictureToggle.dispose();
player.controlBar.playbackRateMenuButton.disable();
function handleNotifications(event) { function handleNotifications(event) {
let data = parseRowerData(event.target.value); let data = parseRowerData(event.target.value);
@ -103,7 +112,5 @@ player.controlBar.playbackRateMenuButton.disable();
} }
document.querySelector('#bleConnectionButton').addEventListener('click', what); document.querySelector('#bleConnectionButton').addEventListener('click', what);
</script> </script>
</html> </html>

View File

@ -26,6 +26,8 @@ function connect() {
.then(characteristic => { .then(characteristic => {
characteristic.startNotifications().then(_ => { characteristic.startNotifications().then(_ => {
console.log('> Notifications started'); console.log('> Notifications started');
document.querySelector(".setupinfo").style.display="none";
document.querySelector(".training").style.display="block";
}); });
return characteristic; return characteristic;
}) })