Coder Social home page Coder Social logo

bootsie123 / f1-web-viewer Goto Github PK

View Code? Open in Web Editor NEW
163.0 8.0 24.0 5.81 MB

A simple grid-based web viewer for Formula 1

Home Page: https://f1webviewer.netlify.app

License: ISC License

Dockerfile 0.47% HTML 1.35% JavaScript 27.58% Vue 70.09% SCSS 0.49% Shell 0.03%
vuejs vue f1 f1tv formula1

f1-web-viewer's Introduction

Netlify Status CircleCI Build Status GitHub

IMPORTANT - Live website currently broken

Please self host the application locally or through Docker. Or alternatively, use the desktop application. Updates can be found under issue #35 (last updated 2/20/22)


A simple grid-based web viewer for Formula 1. Simply login with your F1TV credentials, select the season, event, and session, and then drag and drop the channels you want to watch into the grid! Unable to install it? No problem! The application can be fully accessed here

Features

  • An easy to use grid system to customize your layout
  • Ability to drag and drop feeds into the grid
  • Ability to pin feeds to prevent them from moving
  • Support for syncing feeds (works across multiple tabs)
  • Support for multiple layouts
  • Support for play/pause all (works across multiple tabs)
  • Support for resizing any feed in the layout
  • Ability to set the number of columns in the layout
  • Ability to set the height for rows in the layout
  • Ability to change the audio source and quality for any feed
  • Picture in picture support
  • Easy to use and modern web interface
  • Docker support
  • VR support (if using a web browser in VR)

Coming Soon

  • Syncing across devices on the same local network

Have any suggestions? Let us know!

Installation

Clone the repository using git and then use npm to install the node modules.

# Clone the repository
git clone https://github.com/bootsie123/F1-Web-Viewer.git

# Enter the directory
cd F1-Web-Viewer

# Install the dependencies
npm install

# Build the application
npm run build

# Start the server
npm start

Alternatively you can install the application with docker.

docker pull bootsie123/f1-web-viewer

Usage

Local

To run the web server simply run:

npm start

This will run the server locally on port 3000 and allow you to connect to it through:

http://localhost:3000 or the IP address of your computer http://192.168.x.x:3000

Docker

To start the web server with Docker simply run:

docker run -d -p 3000:3000 bootsie123/f1-web-viewer

From there, you can then access the server on port 3000 of your Docker host. For example: http://192.168.x.x:3000

Configuration

Changing the default port

To change the default port of the web server locally you can simply rename the .env.example file in the main directory of the application to .env. From there, edit the following:

SERVER_PORT=3000 //Change this value here to the desired port

For Docker, simply start the container with your desired mapped ports. For example, to access the web server from port 8080 use:

docker run -d -p 8080:3000 bootsie123/f1-web-viewer

FAQ

What credentials do I use to login?

For login, you need an F1TV account and an active subscription. To login, simply open the sliding panel on the right and enter the same username and password you use for F1TV

What happens to my credentials after login?

During login, your credentials are exchanged with the F1TV servers which in turn give back an access token. This token is stored locally through your browser and is automatically loaded after the first login. However, if this token expires simply logout and relogin

Will my layout be saved?

The layout is automatically saved locally to your browser. It will also be loaded automatically when you revisit the application. However, if you clear your browser cache you will loose your layout

Is it possible to sync the feeds?

Yes! Just click on the clock icon on the feed you want all the other feeds to sync up to. It will also sync across multiple tabs too

Acknowledgements

Special thanks to: SoMuchForSubtlety (F1 Viewer) and robvdpol (RaceControl) for giving me a framework to work with and mapping out the F1TV API!

Other thanks to:

  • Video.js - For the awesome to work with video player
  • Vue Grid Layout - For making the amazing grid layout system
  • Remixicon - For all of the amazing icons used through the project

Contributing

Pull requests are welcome. Any changes are appreciated!

License

ISC

f1-web-viewer's People

Contributors

bootsie123 avatar dependabot[bot] avatar forsethc avatar giantorth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

f1-web-viewer's Issues

Live icon shows as a gear icon

When watching a video live, the icon next to the "LIVE" text shows a gear icon instead of a circle. This seems to only appear on the deployed website and not during local development

Background White in Full Screen Mode

Describe the bug
When in full screen mode the background is white, creating distracting white spaces on the screen

To Reproduce
Steps to reproduce the behavior:

  1. Create a layout that doesn't fill 100% of the browser
  2. Make the browser full screen
  3. See the background is white

Expected behavior
The description on Reddit suggests full screen mode should make the background dark, so that's what I was expecting.

Screenshots
Actual: Screen Shot 2021-06-04 at 1 33 02 PM
Expected: Screen Shot 2021-06-04 at 1 33 22 PM

Desktop (please complete the following information):

  • OS: macOS 10.15.7
  • Browser Safari 14.1.1

F1TV Account (please complete the following information):

  • Subscription Type: Pro
  • Country: Canada

App not able to log-in

Before last race I installed the app on my MacBook. I was able to view on multiple screens.
Now I am able to log-in anymore.

When starting the app and filling out the credentials it comes back with:
Request failed with status code 403

On the F1 website (https://f1tv.formula1.com) the credentials are working.

Macos Monterey
Version 12.3.1

F1TV Account (please complete the following information):

Pro Subscription
Netherlands

Video players stay black

Describe the bug
Streams don't play at all. Video players stay black.

To Reproduce
Steps to reproduce the behavior:

  1. open a stream as normal and click the play button
  2. Nothing happens

Expected behavior
Stream begins to play

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Edge (chromium) and Firefox
  • Web version

F1TV Account (please complete the following information):

  • Subscription Type: Pro
  • Country: New Zealand

Additional context
Browser console shows the following errors:

Tracking Prevention blocked access to storage for https://www.google-analytics.com/g/collect?v=2&tid=G-QH40ELPHB6&gtm=2oe7e0&_p=1197533762&sr=1200x800&ul=en-nz&cid=710191642.1626579773&_s=2&dl=https%3A%2F%2Ff1webviewer.netlify.app%2F&dt=F1%20Web%20Viewer&sid=1626579772&sct=1&seg=1&en=user_engagement&_et=15778. f1webviewer.netlify.app/:1 Tracking Prevention blocked a Ping request to https://www.google-analytics.com/g/collect?v=2&tid=G-QH40ELPHB6&gtm=2oe7e0&_p=1169701885&sr=1200x800&ul=en-nz&cid=710191642.1626579773&_s=1&dl=https%3A%2F%2Ff1webviewer.netlify.app%2F&dt=F1%20Web%20Viewer&sid=1626579772&sct=1&seg=1&en=page_view. www.google-analytics.com/g/collect?v=2&tid=G-QH40ELPHB6&gtm=2oe7e0&_p=1169701885&sr=1200x800&ul=en-nz&cid=710191642.1626579773&_s=1&dl=https%3A%2F%2Ff1webviewer.netlify.app%2F&dt=F1%20Web%20Viewer&sid=1626579772&sct=1&seg=1&en=page_view:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT DevTools failed to load source map: Could not load content for https://d33wubrfki0l68.cloudfront.net/bundles/index.2ae109a3.js.map;: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

I turned off the tracker blocking and it gets rid of the errors about that, but doesn't fix the issue. I have also changed network in case the network was blocking something. Browser ad block is disabled also.

I'm not too sure what's going on, th video just stays black as if tthe play button did nothing.

Changing video resolution may cause controls to remain

Describe the bug
If I manually set a video to a specific resolution, there is a chance that the controls for that specific window will not fade out again.

To Reproduce
Steps to reproduce the behavior:

  1. Create a multi view setup
  2. Manually change the largest window to 1080p
  3. Controls will not fade for that window.

Expected behavior
Player controls should always fade out when not active.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Mac OSX Big Sur
  • Browser Chrome
  • Version 91

F1TV Account (please complete the following information):

  • Subscription Type: Pro
  • Country: US

Sort dropdowns by latest first

Discussed in #27

Originally posted by ManCaveMedia June 22, 2021
Last race I noticed the Season dropdown is sorted in reversed sort order, while all others are not.
To select the live F1 race (or practice/qualification) feed you leave Series to Formula 1, select the top option for Season (2021) and the bottom option for Events and Session.

I'm curious what everyon thinks would be the most logical sort order? Latest at the bottom or at the top for all dropdowns?

Email validation routine doesn't allow domains with more than one tld

The isValidEmail() function is very simplistic and doesn't account for addresses with more than one top level domain, e.g. co.uk. This means that it is not possible for such users to log in at all at the moment.

Is it even worth validating the address at all? It only gets sent through to F1TV anyway :)

Feature request: Video window titles

Window titles on hover would be nice.

When watching the race I have several streams โ€“ world feed, map and a few driver cams. If I have chosen drivers from the same team, after a while I forget who is who. That is where window titles with the driver's name would come in handy to remind what stream that is.

Buffering and live issues

Just trying it out again after fixed the last steaming issue, and now does load nicely, well done. However, I am still experiencing two problems; 1. buffer problems, 2. live icon doesn't work.

I'm not sure whether the buffer issues are due to the f1 API, or your app, but having 4 streams open, 2 are buffering.
For the live icon, it only seems to restart streaming from where it was, the progress bar behind (not all the way to the right), and dragging it all the way to the right also doesn't help.

When the buffering issues happen, the only way to get them working is to close the stream and repoen them, which ofcourse is a bit tedious.

Edit: Now I closed my other 3 streams my mainstream is having buffering issues.
Smaller other issues: would be nice if thestreams open on click, not only on drag. And if they open slightly larger than this super small size.

[Request] Export/import option to backup and transfer settings/layouts

The settings and layouts are saved to cache, so you don't have to create an account and save them each time you change them.
And I love that!

However, I would love to be able to export my settings (ie. to xml/csv/json/txt/etc.) and import them on a different device/browser.

But that's not the only use case...
I have a few layouts I switch between for practice, qualifying and races, but also mid-race to have a better view or view different teams/drivers. I noticed that when I save a layout and create a new layout from the exact same feeds (without closing and re-adding them), you can switch between these layouts without losing audio setup (language, volume, etc.). But after closing a feed and re-adding it, this won't work anymore. My guess is they get a unique id each time they're added. If I could export my layouts to a human readable format (ie. to xml/csv/json/txt/etc.) I could edit and copy over these id's and import these to do the fast layout shuffle mid-race without having to change audio settings and losing information. ๐Ÿ˜‰

Does this make any sense?

EVERY THING got 400 Bad Request

Description
During to F12, every Request is Status Code: 400 Bad Request. After my research, i think it lose some cookie from the response of MASTER m3u8.

Desktop:

  • OS: Win 10
  • Browser: chrome
  • Version: 97.0

F1TV Account:

  • Subscription Type: Access
  • Country: CN

404 error

Describe the bug
When accessing the locally hosted website via the URL "http://localhost:3000", I get a 404 error and the HTML page displays the text, "Cannot GET /". There's a content security policy that blocks the favicon from loading, but I'm not sure if that affects the overall loading of the HTML page.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Microsoft Windows 11 Pro (10.0.22000 Build 22000)
  • Browser: Firefox (98.0.1)

Multiple tabs update

When I do have multiple tabs open and update 1 tab with the correct season and event I would like to see that the other tabs do update to the same season and event and session.
No I have to select in the 3 tabs the season and event and session.
I am using the F1 Web Viewer on my Macbook Air M1 with a local installation. This is running more smooth than the internetpage link.

Not able to log-in running locally

I am running the f1 web viewer on my MacBook on port 3000.
Till the last race the majority of the options were working.
When launching the program the log-in box appears.
After filling-out the credentials it returns with the following error:
Request failed with status code 500

Macos Monterey
Version 12.3.1

F1TV Account (please complete the following information):

Pro Subscription
Netherlands

[Request] Single Channel Selection without Drag and Drop

Describe the bug
It's a bit more of a platform limitation. If viewing the website on a console (Xbox One X with Chromium Edge), the browser does not support drag and drop events, even with a mouse connected. As a result, it's not possible to start playback.

Expected behavior/Feature Request
If no streams are currently selected in the layout, a compromise would be to automatically add the first stream that is clicked on, without having to drag and drop it into the grid. If desired, this could be kept as an option like "Console" behind the Stream Type selector.

Desktop (please complete the following information):

  • OS: Xbox One X on March 9 2022 update (10.0.22000.3832)
  • Browser: Edge (Xbox)
  • Version: 97.0.1072.91

F1TV Account (please complete the following information):

  • Subscription Type: Pro
  • Country: Canada

F1-Web-Viewer username and password incorrect

While logging in on Firefox, safari or chrome I do get the message that the username and password are incorrect.
Just open the website and try to log-in

MacBook Air 2021
Firefox, safari or chrome

F1TV Account (please complete the following information):

  • Subscription Type: Pro Annual
  • Country: the Netherlands

The username and password are accepted on the original website of the F1.

No compatible source was found for this media

When opening the stream I do get the following message: No compatible source was found for this media.
I do have the program running on my laptop (Macbook Air). So opening the webviewer via http://localhost:3000/

Schermafbeelding 2021-12-04 om 14 45 15

Desktop (please complete the following information):

  • MacOS Monterey 12.0.1
  • Chrome Version 96.0.4664.55

F1TV Account (please complete the following information):

  • Pro Subscription
  • Netherlands

.env not used locally

Describe the bug
Local install does not use .env file.

To Reproduce
Follow the instructions from the readme to install locally and try to change the port by means of a .env file.

Expected behavior
Server listens to port specified in .env.

Desktop:

  • OS: openSUSE/Windows 10

Additional context
Steps to remedy

  • npm install dotenv
  • Prepend the following to server.js
  • const dotenv = require("dotenv"); dotenv.config();
  • hope dotenv doesn't break on netlify, I know it doesn't break on glitch.com

Add time delay input option

Describe the bug
I watch F1 across several devices. F1WebViewer is used to display timing data/onboards while a TV shows the main feed. It is frequently difficult to sync the streams using the video scrubber.

A suggestion would be some kind of text input field to allow for a manual input for a "delay from live" to better match an external stream reference from the app.

To Reproduce
Steps to reproduce the behavior:

  1. Start a stream
  2. Use scrubber to try and delay -5 or -10 seconds from "live"
  3. Scrubber snaps (especially on a smaller screen/laptop" to the live setting of the stream

Expected behavior
An improved method to add a "short" time delay from live of < 30 seconds. A text input field or physical buttons would be much appreciated

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Firefox 91

F1TV Account (please complete the following information):

  • Subscription Type: F1 Pro US

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.