redseat-api
Rust client for Redseat media servers. Work in progress.
let cloud = http?;
let session = cloud.sign_in_with_google_id_token.await?;
let servers = cloud.list_servers.await?;
let client = connect_http.await?;
let server = new;
let libraries = server.get_libraries.await?;
let page = server.library
.get_medias_page
.await?;
A media's file: library.get_media(&media, &MediaFileQuery::default()) downloads it whole (decrypted in an encrypted library), and library.media_url(&media.id, ...) gives its URL with a server token, for a video player that streams it with range requests. In an encrypted library, library.open_encrypted_media(&media) reads its plaintext by ranges (read_at), decrypting only what is read.
Desktop apps can get the Google ID token with google::GoogleSignIn (browser sign-in with a loopback redirect and PKCE). See examples/sign_in.rs.
- Data types are the server's own, from
rs-plugin-common-interfaces(redseat_api::types). - Encrypted libraries use the server's own implementation, from
redseat-crypto(redseat_api::crypto). - Builds for
wasm32-unknown-unknown. UniFFI and wasm-bindgen bindings are planned.
Licensed under MIT or Apache-2.0, at your option.