GithubHelp home page GithubHelp logo

Comments (6)

robvdpol avatar robvdpol commented on August 16, 2024 1

First attempt at implementing the new API:
79f5e50

To be continued soon.

from racecontrol.

robvdpol avatar robvdpol commented on August 16, 2024 1

Will close this issue now, basic support for new API has been implemented. Still need to focus on race archive and video on demand archive.

from racecontrol.

robvdpol avatar robvdpol commented on August 16, 2024

I've been capturing the website traffic for a bit, but unfortunately it seems that the API has changed significantly (also from a security point of view). I'm afraid this will require a complete rewrite of the API interface. I've also noticed that the Android app (which was updated 2 days ago) is still using the old API.

Please feel free to add any info about the API you may have discovered.

from racecontrol.

robvdpol avatar robvdpol commented on August 16, 2024

Some initial findings:

GET
https://f1tv.formula1.com/1.0/R/ENG/WEB_HLS/ALL/CONTENT/PLAY?contentId=1000001393
(requires some additional HTTP headers such as correlationid, sessionid, ascendontoken, entitlementtoken and cookie)

Returns JSON that contains a tokenized stream URL that is playable with VLC / MPV.

{
	"resultCode": "OK",
	"message": "200",
	"errorDescription": "200",
	"resultObj": {
		"entitlementToken": "eyJhbGciOiJIU....(shortened)....TGRmtYVM",
		"url": "https://f1prodvod.akamaized.net/f1vodprod/625/768/1598810310384/2007_Belgium_RaceHighlights_7min_F1TV-563295813107-master.m3u8?hdnea=st=1615022128~exp=1615022428~acl=/f1vodprod/625/768/1598810310384/*~hmac=f67e55f865134312824e0585ff471ba87d1076d99ce620a72cec8effbf8be0e5",
		"streamType": "HLS"
	},
	"systemTime": 1615022128593
}

from racecontrol.

anthonylavado avatar anthonylavado commented on August 16, 2024

For reference, they're using the Bitmovin Player on the new site, which is how they've gotten Chromecast support "for free". If you look at the Bitmovin example page, it's the same design for the "Playing on _____" screen.

I'm not sure if their documentation can provide any more hints on the video playback authentication. Knowing what technology the player uses could also be a start towards seeing if anyone else has worked with it before.

from racecontrol.

robvdpol avatar robvdpol commented on August 16, 2024

The login form on the F1TV-website still uses the same old authenticate-URL (https://api.formula1.com/v2/account/subscriber/authenticate/by-password). This returns a subscription token that can be used to obtain an entitlement token:

GET
https://f1tv.formula1.com/1.0/R/ENG/WEB_DASH/ALL/USER/ENTITLEMENT
ascendontoken: (put subscriptiontoken here)

Response:

{
	"resultCode": "OK",
	"message": "Entitlement check successful",
	"errorDescription": "200",
	"resultObj": {
		"entitlementToken": "eyJhbGciOiJIUz....(shortened)....AvUogLkrkBQV4"
	},
	"systemTime": 1615037247215
}

Not sure yet what the entitlement token is needed for.

from racecontrol.

Related Issues (20)

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.