fix: firefox not resolving codec (h264)

This commit is contained in:
2026-07-10 00:31:01 +01:00
parent 888eace0bf
commit 2f0a02131e
7 changed files with 206 additions and 113 deletions
+14 -1
View File
@@ -18,8 +18,9 @@ use axum::{
response::{IntoResponse, Response},
routing::{get, post},
};
use chrono::{DateTime, Utc};
use entity::{auth_session, stream_key, stream_session, users};
use sea_orm::{DatabaseConnection, EntityTrait, QueryFilter};
use sea_orm::{DatabaseConnection, EntityTrait, QueryFilter, prelude::DateTimeUtc};
use serde::{Deserialize, Serialize};
use tokio::{
net::TcpListener,
@@ -108,6 +109,7 @@ struct StreamListing {
label: String,
id: i32,
user: String,
started_at: DateTime<Utc>, //UNIX TIMESTAMP
}
async fn catalog_handler(State(state): State<Arc<HttpServer>>) -> impl IntoResponse {
@@ -118,6 +120,7 @@ async fn catalog_handler(State(state): State<Arc<HttpServer>>) -> impl IntoRespo
let catalog: Vec<StreamListing> = futures::future::join_all(streams.iter().map(|listing| {
let db = state.db.clone();
let stream_key_id = listing.stream_key_id;
let state2 = state.clone();
async move {
let key_info = stream_key::Entity::find_by_id(stream_key_id)
.one(&db)
@@ -129,10 +132,20 @@ async fn catalog_handler(State(state): State<Arc<HttpServer>>) -> impl IntoRespo
.await
.unwrap()
.unwrap();
let meow = state2
.appstate
.clone()
.lock()
.await
.stream_sessions
.get(&key_info.id)
.unwrap()
.started_at;
StreamListing {
id: stream_key_id,
label: key_info.label,
user: user.username,
started_at: meow,
}
}
}))