feat(lockscreen): ultimate lock-screen MediaSession player with real video metadata and 10s seek buttons v1.4.18

This commit is contained in:
Enes Yakıştır
2026-08-31 21:34:30 +03:00
parent 1aba41c992
commit e7dc5136e5
2 changed files with 17 additions and 2 deletions
+16 -1
View File
@@ -880,7 +880,22 @@ try {
} }
function getVideoElement() { function getVideoElement() {
return document.querySelector('video'); // 1. Direct video tag in DOM
var v = document.querySelector('video');
if (v) return v;
// 2. Video inside iframes (e.g. embed player)
var iframes = document.querySelectorAll('iframe');
for (var i = 0; i < iframes.length; i++) {
try {
var doc = iframes[i].contentDocument || (iframes[i].contentWindow && iframes[i].contentWindow.document);
if (doc) {
var iv = doc.querySelector('video');
if (iv) return iv;
}
} catch (e) {}
}
return null;
} }
function formatTime(seconds) { function formatTime(seconds) {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "peertube-plugin-yaktube-ondemand", "name": "peertube-plugin-yaktube-ondemand",
"version": "1.4.17", "version": "1.4.18",
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube", "description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube",
"main": "main.js", "main": "main.js",
"library": "./main.js", "library": "./main.js",