Add video proxy to fix Firefox tracking protection blocking Twitter videos

Twitter's video.twimg.com CDN is blocked by Firefox's Enhanced Tracking
Protection when loaded cross-origin. This adds a server-side proxy that
streams videos through our domain.

- Add /proxy/video/{id} endpoint to proxy embed video URLs
- Update embed video player: click-to-play with overlay, muted, looping
- Show native controls on hover
This commit is contained in:
soup 2026-01-17 01:39:49 -05:00
parent 2887d9c430
commit 9aa8373055
Signed by: soup
SSH key fingerprint: SHA256:GYxje8eQkJ6HZKzVWDdyOUF1TyDiprruGhE0Ym8qYDY
5 changed files with 130 additions and 2 deletions

View file

@ -378,6 +378,19 @@ async function deleteItem(id) {
}
}
// Play video (initial click to start)
function playVideo(overlay) {
const container = overlay.parentElement;
const video = container.querySelector('video');
if (video) {
video.play();
overlay.remove();
// Show controls on hover
video.addEventListener('mouseenter', () => video.controls = true);
video.addEventListener('mouseleave', () => video.controls = false);
}
}
// Utility
function escapeHtml(str) {
const div = document.createElement('div');