Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
Compare commits
10
Commits
c667bf2f28
..
v1.4.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15361a21b6 | ||
|
|
c6e5abf87e | ||
|
|
e161dea9da | ||
|
|
6fc0f0ef97 | ||
|
|
c4fc917677 | ||
|
|
551b6d1ab6 | ||
|
|
51e41df3ca | ||
|
|
97079931f2 | ||
|
|
22ed7a4bda | ||
|
|
774c8f0f02 |
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
|
docs/
|
||||||
*.log
|
*.log
|
||||||
.DS_Store
|
.DS_Store
|
||||||
dist/
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
docs/
|
||||||
|
*.log
|
||||||
|
.git
|
||||||
|
.github
|
||||||
@@ -152,6 +152,117 @@
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 2.3 Dedicated Local Admin Login Modal (Alt+A)
|
||||||
|
function openLocalAdminLoginModal() {
|
||||||
|
var existingModal = document.getElementById('yaktube-admin-login-modal');
|
||||||
|
if (existingModal) {
|
||||||
|
existingModal.style.display = 'flex';
|
||||||
|
var uInput = existingModal.querySelector('#yaktube-admin-username');
|
||||||
|
if (uInput) uInput.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var modal = document.createElement('div');
|
||||||
|
modal.id = 'yaktube-admin-login-modal';
|
||||||
|
modal.className = 'yaktube-modal-overlay';
|
||||||
|
modal.setAttribute('role', 'dialog');
|
||||||
|
modal.setAttribute('aria-modal', 'true');
|
||||||
|
modal.setAttribute('aria-labelledby', 'yaktube-admin-modal-title');
|
||||||
|
|
||||||
|
modal.innerHTML =
|
||||||
|
'<div class="yaktube-modal-card" style="max-width: 420px; background:#181824; border:1px solid rgba(255,143,55,0.4); border-radius:18px; padding:26px; color:#fff; box-shadow:0 16px 40px rgba(0,0,0,0.8); text-align:left;">' +
|
||||||
|
'<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:18px;">' +
|
||||||
|
'<h3 id="yaktube-admin-modal-title" style="margin:0; font-size:18px; color:#ff8f37;">⚙️ Sunucu Yöneticisi Girişi</h3>' +
|
||||||
|
'<button id="yaktube-admin-modal-close" class="yaktube-voice-modal-close-btn" aria-label="Kapat">✕</button>' +
|
||||||
|
'</div>' +
|
||||||
|
'<p style="font-size:13px; color:#aaa; margin-bottom:16px;">Yerel yönetici (admin) kullanıcı adı ve şifrenizle giriş yaparak PeerTube yönetim paneline erişebilirsiniz.</p>' +
|
||||||
|
'<form id="yaktube-admin-direct-form" style="display:flex; flex-direction:column; gap:12px;">' +
|
||||||
|
'<div style="display:flex; flex-direction:column; gap:4px;">' +
|
||||||
|
'<label for="yaktube-admin-username" style="font-size:13px; font-weight:600; color:#ddd;">Kullanıcı Adı veya E-posta:</label>' +
|
||||||
|
'<input type="text" id="yaktube-admin-username" required style="background:#22222e; border:1px solid #444; border-radius:8px; padding:10px 12px; color:#fff; font-size:14px; outline:none;" />' +
|
||||||
|
'</div>' +
|
||||||
|
'<div style="display:flex; flex-direction:column; gap:4px;">' +
|
||||||
|
'<label for="yaktube-admin-password" style="font-size:13px; font-weight:600; color:#ddd;">Şifre:</label>' +
|
||||||
|
'<input type="password" id="yaktube-admin-password" required style="background:#22222e; border:1px solid #444; border-radius:8px; padding:10px 12px; color:#fff; font-size:14px; outline:none;" />' +
|
||||||
|
'</div>' +
|
||||||
|
'<div id="yaktube-admin-login-error" style="color:#ef4444; font-size:13px; display:none; margin-top:4px;"></div>' +
|
||||||
|
'<button type="submit" id="yaktube-admin-login-submit" style="background:linear-gradient(135deg, #ff8f37 0%, #ff5e3a 100%); color:#fff; border:none; border-radius:8px; padding:12px; font-weight:700; font-size:14px; cursor:pointer; margin-top:6px;">Yönetici Olarak Giriş Yap</button>' +
|
||||||
|
'</form>' +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
document.body.appendChild(modal);
|
||||||
|
|
||||||
|
modal.querySelector('#yaktube-admin-modal-close').addEventListener('click', function () {
|
||||||
|
modal.style.display = 'none';
|
||||||
|
});
|
||||||
|
modal.addEventListener('click', function (e) {
|
||||||
|
if (e.target === modal) modal.style.display = 'none';
|
||||||
|
});
|
||||||
|
|
||||||
|
var form = modal.querySelector('#yaktube-admin-direct-form');
|
||||||
|
var errEl = modal.querySelector('#yaktube-admin-login-error');
|
||||||
|
var uInput = modal.querySelector('#yaktube-admin-username');
|
||||||
|
var pInput = modal.querySelector('#yaktube-admin-password');
|
||||||
|
var sBtn = modal.querySelector('#yaktube-admin-login-submit');
|
||||||
|
|
||||||
|
uInput.focus();
|
||||||
|
|
||||||
|
form.addEventListener('submit', async function (ev) {
|
||||||
|
ev.preventDefault();
|
||||||
|
errEl.style.display = 'none';
|
||||||
|
sBtn.disabled = true;
|
||||||
|
sBtn.innerText = 'Giriş Yapılıyor...';
|
||||||
|
|
||||||
|
try {
|
||||||
|
var clientRes = await fetch('/api/v1/oauth-clients/local');
|
||||||
|
var clientData = await clientRes.json();
|
||||||
|
|
||||||
|
var bodyParams = new URLSearchParams({
|
||||||
|
client_id: clientData.client_id,
|
||||||
|
client_secret: clientData.client_secret,
|
||||||
|
grant_type: 'password',
|
||||||
|
username: uInput.value.trim(),
|
||||||
|
password: pInput.value
|
||||||
|
});
|
||||||
|
|
||||||
|
var tokenRes = await fetch('/api/v1/users/token', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
|
body: bodyParams.toString()
|
||||||
|
});
|
||||||
|
|
||||||
|
var tokenData = await tokenRes.json();
|
||||||
|
if (!tokenRes.ok || !tokenData.access_token) {
|
||||||
|
throw new Error(tokenData.error_description || tokenData.error || 'Kullanıcı adı veya şifre hatalı.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store tokens
|
||||||
|
localStorage.setItem('access_token', tokenData.access_token);
|
||||||
|
localStorage.setItem('refresh_token', tokenData.refresh_token);
|
||||||
|
localStorage.setItem('token_type', tokenData.token_type || 'Bearer');
|
||||||
|
localStorage.setItem('username', uInput.value.trim());
|
||||||
|
|
||||||
|
// Get user details
|
||||||
|
var meRes = await fetch('/api/v1/users/me', {
|
||||||
|
headers: { Authorization: 'Bearer ' + tokenData.access_token }
|
||||||
|
});
|
||||||
|
if (meRes.ok) {
|
||||||
|
var meData = await meRes.json();
|
||||||
|
localStorage.setItem('email', meData.email || '');
|
||||||
|
localStorage.setItem('displayName', meData.displayName || meData.username || '');
|
||||||
|
}
|
||||||
|
|
||||||
|
announce('Yönetici girişi başarılı! Yönetim paneline yönlendiriliyorsunuz.', true);
|
||||||
|
window.location.href = '/admin';
|
||||||
|
} catch (err) {
|
||||||
|
errEl.innerText = err.message;
|
||||||
|
errEl.style.display = 'block';
|
||||||
|
sBtn.disabled = false;
|
||||||
|
sBtn.innerText = 'Yönetici Olarak Giriş Yap';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 2. YakNet SSO Header & Login Flow
|
// 2. YakNet SSO Header & Login Flow
|
||||||
function injectYakNetSSO() {
|
function injectYakNetSSO() {
|
||||||
// 2.1 Header: Place YakNet Account widget in top-right .buttons-container
|
// 2.1 Header: Place YakNet Account widget in top-right .buttons-container
|
||||||
@@ -172,7 +283,16 @@
|
|||||||
var isAuth = !!token && !!uName;
|
var isAuth = !!token && !!uName;
|
||||||
|
|
||||||
if (headerRight) {
|
if (headerRight) {
|
||||||
|
var defaultLoginLink = headerRight.querySelector('my-login-link, a[href*="/login"], .login-button');
|
||||||
var liveWidget = headerRight.querySelector('#yaknet-header-account-widget');
|
var liveWidget = headerRight.querySelector('#yaknet-header-account-widget');
|
||||||
|
|
||||||
|
if (isAuth) {
|
||||||
|
// Logged In: Show YakNet Profile Menu, Hide default login link
|
||||||
|
if (defaultLoginLink) {
|
||||||
|
defaultLoginLink.style.display = 'none';
|
||||||
|
defaultLoginLink.setAttribute('aria-hidden', 'true');
|
||||||
|
}
|
||||||
|
|
||||||
if (!liveWidget) {
|
if (!liveWidget) {
|
||||||
var widgetWrap = document.createElement('div');
|
var widgetWrap = document.createElement('div');
|
||||||
widgetWrap.id = 'yaknet-header-account-widget';
|
widgetWrap.id = 'yaknet-header-account-widget';
|
||||||
@@ -187,21 +307,18 @@
|
|||||||
'redirect-uri="https://yaktube.yakhub.com.tr/plugins/peertube-plugin-auth-yaknet/router/auth-callback" ' +
|
'redirect-uri="https://yaktube.yakhub.com.tr/plugins/peertube-plugin-auth-yaknet/router/auth-callback" ' +
|
||||||
'base-url="https://auth.yakhub.com.tr" ' +
|
'base-url="https://auth.yakhub.com.tr" ' +
|
||||||
'login-url="/login" ' +
|
'login-url="/login" ' +
|
||||||
'authenticated="' +
|
'authenticated="true" ' +
|
||||||
(isAuth ? 'true' : 'false') +
|
|
||||||
'" ' +
|
|
||||||
'user-name="' +
|
'user-name="' +
|
||||||
(isAuth ? displayName.replace(/"/g, '"') : '') +
|
displayName.replace(/"/g, '"') +
|
||||||
'" ' +
|
'" ' +
|
||||||
'user-email="' +
|
'user-email="' +
|
||||||
(isAuth ? emailStr.replace(/"/g, '"') : '') +
|
emailStr.replace(/"/g, '"') +
|
||||||
'" ' +
|
'" ' +
|
||||||
'theme="dark">' +
|
'theme="dark">' +
|
||||||
'</yaknet-account>';
|
'</yaknet-account>';
|
||||||
|
|
||||||
var targetSibling =
|
var targetSibling =
|
||||||
headerRight.querySelector('my-user-menu') ||
|
headerRight.querySelector('my-user-menu') ||
|
||||||
headerRight.querySelector('my-login-link') ||
|
|
||||||
headerRight.querySelector('.user-menu') ||
|
headerRight.querySelector('.user-menu') ||
|
||||||
headerRight.querySelector('.settings-button') ||
|
headerRight.querySelector('.settings-button') ||
|
||||||
headerRight.querySelector('my-user-notifications') ||
|
headerRight.querySelector('my-user-notifications') ||
|
||||||
@@ -212,15 +329,7 @@
|
|||||||
} else {
|
} else {
|
||||||
headerRight.prepend(widgetWrap);
|
headerRight.prepend(widgetWrap);
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultLoginLink = headerRight.querySelector('my-login-link');
|
|
||||||
if (defaultLoginLink) {
|
|
||||||
defaultLoginLink.setAttribute('aria-hidden', 'true');
|
|
||||||
defaultLoginLink.setAttribute('tabindex', '-1');
|
|
||||||
defaultLoginLink.style.display = 'none';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Sync widget attributes dynamically if auth state changed
|
|
||||||
var el = liveWidget.querySelector('yaknet-account');
|
var el = liveWidget.querySelector('yaknet-account');
|
||||||
if (el) {
|
if (el) {
|
||||||
if (el.shadowRoot) {
|
if (el.shadowRoot) {
|
||||||
@@ -242,13 +351,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var expectedAuth = isAuth ? 'true' : 'false';
|
if (el.getAttribute('authenticated') !== 'true' || el.getAttribute('user-name') !== displayName) {
|
||||||
var expectedName = isAuth ? displayName : '';
|
el.setAttribute('authenticated', 'true');
|
||||||
var expectedEmail = isAuth ? emailStr : '';
|
el.setAttribute('user-name', displayName);
|
||||||
if (el.getAttribute('authenticated') !== expectedAuth || el.getAttribute('user-name') !== expectedName) {
|
el.setAttribute('user-email', emailStr);
|
||||||
el.setAttribute('authenticated', expectedAuth);
|
|
||||||
el.setAttribute('user-name', expectedName);
|
|
||||||
el.setAttribute('user-email', expectedEmail);
|
|
||||||
if (typeof el.syncStateFromAttributes === 'function') {
|
if (typeof el.syncStateFromAttributes === 'function') {
|
||||||
el.syncStateFromAttributes();
|
el.syncStateFromAttributes();
|
||||||
el.render();
|
el.render();
|
||||||
@@ -256,6 +362,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Not Logged In: Remove YakNet widget to eliminate duplicate button, keep PeerTube native login button clean
|
||||||
|
if (liveWidget) {
|
||||||
|
liveWidget.remove();
|
||||||
|
}
|
||||||
|
if (defaultLoginLink) {
|
||||||
|
defaultLoginLink.style.display = '';
|
||||||
|
defaultLoginLink.removeAttribute('aria-hidden');
|
||||||
|
|
||||||
|
var loginAnchor =
|
||||||
|
defaultLoginLink.tagName.toLowerCase() === 'a' ? defaultLoginLink : defaultLoginLink.querySelector('a');
|
||||||
|
if (loginAnchor) {
|
||||||
|
loginAnchor.setAttribute('aria-label', 'YakNet ile Giriş Yap');
|
||||||
|
loginAnchor.setAttribute('title', 'YakNet Hesabınız ile Giriş Yapın');
|
||||||
|
var spanText = loginAnchor.querySelector('span');
|
||||||
|
if (spanText) {
|
||||||
|
spanText.textContent = 'YakNet ile Giriş Yap';
|
||||||
|
} else {
|
||||||
|
loginAnchor.textContent = 'YakNet ile Giriş Yap';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2.2 Login Modal / Page
|
// 2.2 Login Modal / Page
|
||||||
@@ -326,11 +455,7 @@
|
|||||||
if (showAdminBtn) {
|
if (showAdminBtn) {
|
||||||
showAdminBtn.addEventListener('click', function (e) {
|
showAdminBtn.addEventListener('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
subElements.forEach(function (el) {
|
openLocalAdminLoginModal();
|
||||||
el.style.display = '';
|
|
||||||
});
|
|
||||||
showAdminBtn.style.display = 'none';
|
|
||||||
announce('Yönetici kullanıcı adı ve şifre giriş formu açıldı.');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -339,8 +464,52 @@
|
|||||||
|
|
||||||
// 3. Intelligent Branding & A11y DOM Auto-Fixer
|
// 3. Intelligent Branding & A11y DOM Auto-Fixer
|
||||||
function autoFixDOM() {
|
function autoFixDOM() {
|
||||||
|
injectAccessiblePlayerBar();
|
||||||
|
|
||||||
|
// Check if on 403 / unauthorized page and provide admin login button
|
||||||
|
var notAuthorizedEl = document.querySelector('my-not-found, .not-found, .forbidden, my-forbidden, .error-page');
|
||||||
|
if (notAuthorizedEl && !document.getElementById('yaktube-403-admin-btn')) {
|
||||||
|
var btn403 = document.createElement('div');
|
||||||
|
btn403.id = 'yaktube-403-admin-btn';
|
||||||
|
btn403.style.margin = '20px auto';
|
||||||
|
btn403.style.textAlign = 'center';
|
||||||
|
btn403.innerHTML =
|
||||||
|
'<button style="background:linear-gradient(135deg, #ff8f37 0%, #ff5e3a 100%); color:#fff; border:none; padding:12px 24px; border-radius:10px; font-weight:700; cursor:pointer; font-size:15px;">🔑 Sunucu Yöneticisi Olarak Giriş Yap (Alt+A)</button>';
|
||||||
|
btn403.querySelector('button').addEventListener('click', openLocalAdminLoginModal);
|
||||||
|
notAuthorizedEl.appendChild(btn403);
|
||||||
|
}
|
||||||
|
|
||||||
injectYakNetSSO();
|
injectYakNetSSO();
|
||||||
|
|
||||||
|
// Replace all login buttons labels and titles
|
||||||
|
document
|
||||||
|
.querySelectorAll(
|
||||||
|
'my-login-link, a[href*="/login"], a[title*="Giriş sayfasına git"], [aria-label*="Giriş sayfasına git"]'
|
||||||
|
)
|
||||||
|
.forEach(function (el) {
|
||||||
|
if (el.getAttribute('title') && el.getAttribute('title').includes('Giriş sayfasına git')) {
|
||||||
|
el.setAttribute('title', 'YakNet ile Giriş Yap');
|
||||||
|
}
|
||||||
|
if (el.getAttribute('aria-label') && el.getAttribute('aria-label').includes('Giriş sayfasına git')) {
|
||||||
|
el.setAttribute('aria-label', 'YakNet ile Giriş Yap');
|
||||||
|
}
|
||||||
|
var anchor = el.tagName.toLowerCase() === 'a' ? el : el.querySelector('a');
|
||||||
|
if (anchor) {
|
||||||
|
anchor.setAttribute('title', 'YakNet ile Giriş Yap');
|
||||||
|
anchor.setAttribute('aria-label', 'YakNet ile Giriş Yap');
|
||||||
|
var spans = anchor.querySelectorAll('span');
|
||||||
|
spans.forEach(function (s) {
|
||||||
|
if (
|
||||||
|
s.textContent.includes('Giriş sayfasına git') ||
|
||||||
|
s.textContent.trim() === 'Giriş' ||
|
||||||
|
s.textContent.trim() === 'Giriş yap'
|
||||||
|
) {
|
||||||
|
s.textContent = 'YakNet ile Giriş Yap';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Aggressively remove generic Framasoft Open-in-App / Play Store banners
|
// Aggressively remove generic Framasoft Open-in-App / Play Store banners
|
||||||
var genericAppBanners = document.querySelectorAll(
|
var genericAppBanners = document.querySelectorAll(
|
||||||
'my-open-app, my-client-app-banner, .open-app-container, .app-banner, [class*="open-app"], [class*="open-in-app"], .mobile-app-banner, my-open-in-app, .app-promotion, a[href*="play.google.com/store/apps/details?id=app.joinpeertube"], a[href*="f-droid.org"]'
|
'my-open-app, my-client-app-banner, .open-app-container, .app-banner, [class*="open-app"], [class*="open-in-app"], .mobile-app-banner, my-open-in-app, .app-promotion, a[href*="play.google.com/store/apps/details?id=app.joinpeertube"], a[href*="f-droid.org"]'
|
||||||
@@ -379,7 +548,8 @@
|
|||||||
.replace(/PeerTube hakkında/gi, 'YakTube Hakkında')
|
.replace(/PeerTube hakkında/gi, 'YakTube Hakkında')
|
||||||
.replace(/PeerTube'a katılın/gi, "YakTube'a Katılın")
|
.replace(/PeerTube'a katılın/gi, "YakTube'a Katılın")
|
||||||
.replace(/PeerTube örneği/gi, 'YakTube Sunucusu')
|
.replace(/PeerTube örneği/gi, 'YakTube Sunucusu')
|
||||||
.replace(/PeerTube/g, 'YakTube');
|
.replace(/PeerTube/g, 'YakTube')
|
||||||
|
.replace(/Giriş sayfasına git/gi, 'YakNet ile Giriş Yap');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -576,7 +746,7 @@
|
|||||||
|
|
||||||
setInterval(autoFixDOM, 1000);
|
setInterval(autoFixDOM, 1000);
|
||||||
|
|
||||||
// 3. Keyboard Shortcuts Modal & Quick Info Engine (v1.4.0)
|
// 3. Screen-Reader & Turkish Q Optimized Shortcuts & Player Bar (v1.4.1)
|
||||||
function toggleShortcutsModal() {
|
function toggleShortcutsModal() {
|
||||||
var modal = document.getElementById('yaktube-shortcuts-dialog');
|
var modal = document.getElementById('yaktube-shortcuts-dialog');
|
||||||
if (modal) {
|
if (modal) {
|
||||||
@@ -597,27 +767,27 @@
|
|||||||
modal.setAttribute('aria-modal', 'true');
|
modal.setAttribute('aria-modal', 'true');
|
||||||
modal.setAttribute('aria-labelledby', 'yaktube-shortcuts-title');
|
modal.setAttribute('aria-labelledby', 'yaktube-shortcuts-title');
|
||||||
modal.innerHTML =
|
modal.innerHTML =
|
||||||
'<div class="yaktube-modal-card" style="max-width: 560px; background:#1e1e24; border-radius:18px; padding:24px; color:#fff; box-shadow:0 16px 40px rgba(0,0,0,0.8);">' +
|
'<div class="yaktube-modal-card" style="max-width: 600px; background:#1e1e24; border-radius:18px; padding:24px; color:#fff; box-shadow:0 16px 40px rgba(0,0,0,0.8);">' +
|
||||||
'<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:16px;">' +
|
'<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:16px;">' +
|
||||||
'<h3 id="yaktube-shortcuts-title" style="margin:0; font-size:18px; color:#ff8f37;">⌨️ Video Oynatıcı & Gezinme Kısayolları</h3>' +
|
'<h3 id="yaktube-shortcuts-title" style="margin:0; font-size:18px; color:#ff8f37;">⌨️ Klavye Kısayolları (Ekran Okuyucu Uyumlu)</h3>' +
|
||||||
'<button id="yaktube-shortcuts-close" class="yaktube-voice-modal-close-btn" aria-label="Kapat">✕</button>' +
|
'<button id="yaktube-shortcuts-close" class="yaktube-voice-modal-close-btn" aria-label="Kapat">✕</button>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
|
'<div style="font-size:12px; color:#aaa; margin-bottom:14px;">💡 <b>Ekran Okuyucu Notu:</b> Sanal imleç (Browse mode) açıkken kısayolları <b>Alt</b> tuşuyla birlikte kullanabilir veya video oynatıcı butonlarından faydalanabilirsiniz.</div>' +
|
||||||
'<table class="yaktube-shortcuts-table" style="width:100%; border-collapse:collapse; font-size:13px;">' +
|
'<table class="yaktube-shortcuts-table" style="width:100%; border-collapse:collapse; font-size:13px;">' +
|
||||||
'<thead><tr style="border-bottom:1px solid rgba(255,255,255,0.1); text-align:left; color:#aaa;"><th style="padding:6px 0;">Kısayol</th><th style="padding:6px 0;">İşlev</th></tr></thead>' +
|
'<thead><tr style="border-bottom:1px solid rgba(255,255,255,0.1); text-align:left; color:#aaa;"><th style="padding:6px 0;">Kısayol (Evrensel / Tek Tuş)</th><th style="padding:6px 0;">İşlev</th></tr></thead>' +
|
||||||
'<tbody>' +
|
'<tbody>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Space</span> veya <span class="yaktube-kbd">K</span></td><td>Oynat / Duraklat</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + K</span> veya <span class="yaktube-kbd">Space</span></td><td>Oynat / Duraklat</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">J</span> / <span class="yaktube-kbd">L</span></td><td>10 saniye geri / ileri sar</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + J</span> veya <span class="yaktube-kbd">J</span></td><td>10 saniye geri sar</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Sol</span> / <span class="yaktube-kbd">Sağ Ok</span></td><td>5 saniye geri / ileri sar</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + L</span> veya <span class="yaktube-kbd">L</span></td><td>10 saniye ileri sar</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Yukarı</span> / <span class="yaktube-kbd">Aşağı Ok</span></td><td>Sesi %5 artır / azalt</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + Yukarı / Aşağı</span></td><td>Sesi %5 artır / azalt</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">M</span></td><td>Sesi Kapat / Aç (Mute)</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + M</span> veya <span class="yaktube-kbd">M</span></td><td>Sesi Kapat / Aç (Mute)</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">F</span></td><td>Tam Ekran</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + T</span> veya <span class="yaktube-kbd">T</span></td><td>Sinema / Tiyatro Modu</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">T</span></td><td>Sinema / Tiyatro Modu</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + I</span> veya <span class="yaktube-kbd">I</span></td><td>Hızlı Video Bilgisi & İstatistikler</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">C</span></td><td>Altyazıları Aç / Kapat</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + C</span> veya <span class="yaktube-kbd">C</span></td><td>Altyazıları Aç / Kapat</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">I</span></td><td>Hızlı Video Bilgisi & İstatistikler</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + .</span> / <span class="yaktube-kbd">Alt + ,</span></td><td>Oynatma hızını artır / azalt</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">></span> / <span class="yaktube-kbd"><</span> (Shift+.)</td><td>Oynatma hızını artır / azalt</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + S</span> veya <span class="yaktube-kbd">/</span> (Shift+7)</td><td>Arama penceresini aç</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">0 - 9</span></td><td>Videonun %0 - %90 noktasına atla</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + V</span> veya <span class="yaktube-kbd">Shift + V</span></td><td>Sesli aramayı başlat</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">/</span></td><td>Arama penceresini aç</td></tr>' +
|
'<tr><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + H</span> veya <span class="yaktube-kbd">F1</span> veya <span class="yaktube-kbd">?</span></td><td>Bu kılavuzu aç / kapat</td></tr>' +
|
||||||
'<tr><td style="padding:8px 0;"><span class="yaktube-kbd">Shift + V</span></td><td>Sesli aramayı başlat</td></tr>' +
|
|
||||||
'</tbody>' +
|
'</tbody>' +
|
||||||
'</table>' +
|
'</table>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
@@ -668,8 +838,8 @@
|
|||||||
var curTime = formatTime(video.currentTime);
|
var curTime = formatTime(video.currentTime);
|
||||||
var totalTime = formatTime(video.duration || 0);
|
var totalTime = formatTime(video.duration || 0);
|
||||||
var remaining = formatTime((video.duration || 0) - video.currentTime);
|
var remaining = formatTime((video.duration || 0) - video.currentTime);
|
||||||
var speed = video.playbackRate + 'x';
|
var speed = (video.playbackRate || 1) + 'x';
|
||||||
var volume = Math.round(video.volume * 100) + '%';
|
var volume = Math.round((video.volume || 1) * 100) + '%';
|
||||||
var quality = video.videoHeight ? video.videoHeight + 'p' : 'Otomatik';
|
var quality = video.videoHeight ? video.videoHeight + 'p' : 'Otomatik';
|
||||||
|
|
||||||
// Visual Toast
|
// Visual Toast
|
||||||
@@ -726,7 +896,111 @@
|
|||||||
|
|
||||||
var speedSteps = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
var speedSteps = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
||||||
|
|
||||||
// 4. Global Keydown Listener (Pro Video Player Engine)
|
function adjustPlaybackSpeed(increase) {
|
||||||
|
var video = getVideoElement();
|
||||||
|
if (!video) return;
|
||||||
|
var curSpeed = video.playbackRate || 1;
|
||||||
|
if (increase) {
|
||||||
|
var nextIdx = speedSteps.findIndex(function (s) {
|
||||||
|
return s > curSpeed;
|
||||||
|
});
|
||||||
|
video.playbackRate = nextIdx !== -1 ? speedSteps[nextIdx] : 2;
|
||||||
|
announce('Oynatma hızı ' + video.playbackRate + ' katına çıkarıldı.');
|
||||||
|
} else {
|
||||||
|
var prevSteps = speedSteps.filter(function (s) {
|
||||||
|
return s < curSpeed;
|
||||||
|
});
|
||||||
|
video.playbackRate = prevSteps.length > 0 ? prevSteps[prevSteps.length - 1] : 0.25;
|
||||||
|
announce('Oynatma hızı ' + video.playbackRate + ' katına düşürüldü.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3.1. Injects Accessible Player Action Bar under the Watch Video
|
||||||
|
function injectAccessiblePlayerBar() {
|
||||||
|
if (!window.location.pathname.includes('/videos/watch/')) return;
|
||||||
|
var video = getVideoElement();
|
||||||
|
if (!video) return;
|
||||||
|
|
||||||
|
var targetContainer = document.querySelector(
|
||||||
|
'my-video-watch, .video-watch, .watch-container, #yaktube-ondemand-container'
|
||||||
|
);
|
||||||
|
if (!targetContainer) return;
|
||||||
|
|
||||||
|
var existingBar = document.getElementById('yaktube-player-action-bar');
|
||||||
|
if (existingBar) return;
|
||||||
|
|
||||||
|
var bar = document.createElement('div');
|
||||||
|
bar.id = 'yaktube-player-action-bar';
|
||||||
|
bar.className = 'yaktube-player-action-bar';
|
||||||
|
bar.setAttribute('role', 'toolbar');
|
||||||
|
bar.setAttribute('aria-label', 'Erişilebilir Video Kontrolleri');
|
||||||
|
|
||||||
|
bar.innerHTML =
|
||||||
|
'<span class="yaktube-player-bar-label">⚡ Oynatıcı Kontrolleri:</span>' +
|
||||||
|
'<button id="yaktube-bar-rewind-btn" class="yaktube-player-action-btn" aria-label="10 Saniye Geri Sar (Alt+J)">⏪ 10sn Geri</button>' +
|
||||||
|
'<button id="yaktube-bar-play-btn" class="yaktube-player-action-btn" aria-label="Oynat veya Duraklat (Alt+K)">⏯️ Oynat/Duraklat</button>' +
|
||||||
|
'<button id="yaktube-bar-forward-btn" class="yaktube-player-action-btn" aria-label="10 Saniye İleri Sar (Alt+L)">⏩ 10sn İleri</button>' +
|
||||||
|
'<button id="yaktube-bar-speed-btn" class="yaktube-player-action-btn" aria-label="Oynatma Hızını Değiştir (Alt+.)">⚡ Hız</button>' +
|
||||||
|
'<button id="yaktube-bar-theater-btn" class="yaktube-player-action-btn" aria-label="Sinema Modunu Aç/Kapat (Alt+T)">🎭 Sinema</button>' +
|
||||||
|
'<button id="yaktube-bar-info-btn" class="yaktube-player-action-btn" aria-label="Video Bilgisi ve İstatistikleri (Alt+I)">📊 Bilgi</button>' +
|
||||||
|
'<button id="yaktube-bar-help-btn" class="yaktube-player-action-btn" aria-label="Kısayol Kılavuzu (Alt+H veya F1)">⌨️ Kısayollar</button>';
|
||||||
|
|
||||||
|
var playerWrap =
|
||||||
|
document.querySelector('.player-container, .video-player-container, .player-wrapper, my-video-watch .player') ||
|
||||||
|
targetContainer;
|
||||||
|
if (playerWrap && playerWrap.nextSibling) {
|
||||||
|
playerWrap.parentNode.insertBefore(bar, playerWrap.nextSibling);
|
||||||
|
} else {
|
||||||
|
targetContainer.prepend(bar);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attach button actions
|
||||||
|
bar.querySelector('#yaktube-bar-rewind-btn').addEventListener('click', function () {
|
||||||
|
if (video) {
|
||||||
|
video.currentTime = Math.max(0, video.currentTime - 10);
|
||||||
|
announce('10 saniye geri sarıldı. Konum: ' + formatTime(video.currentTime));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
bar.querySelector('#yaktube-bar-play-btn').addEventListener('click', function () {
|
||||||
|
if (video) {
|
||||||
|
if (video.paused) {
|
||||||
|
video.play();
|
||||||
|
announce('Video oynatılıyor.');
|
||||||
|
} else {
|
||||||
|
video.pause();
|
||||||
|
announce('Video duraklatıldı.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
bar.querySelector('#yaktube-bar-forward-btn').addEventListener('click', function () {
|
||||||
|
if (video) {
|
||||||
|
video.currentTime = Math.min(video.duration || 99999, video.currentTime + 10);
|
||||||
|
announce('10 saniye ileri sarıldı. Konum: ' + formatTime(video.currentTime));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
bar.querySelector('#yaktube-bar-speed-btn').addEventListener('click', function () {
|
||||||
|
adjustPlaybackSpeed(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
bar.querySelector('#yaktube-bar-theater-btn').addEventListener('click', function () {
|
||||||
|
document.body.classList.toggle('yaktube-theater-mode');
|
||||||
|
var isT = document.body.classList.contains('yaktube-theater-mode');
|
||||||
|
announce(isT ? 'Sinema modu açıldı.' : 'Sinema modundan çıkıldı.');
|
||||||
|
});
|
||||||
|
|
||||||
|
bar.querySelector('#yaktube-bar-info-btn').addEventListener('click', function () {
|
||||||
|
showQuickVideoInfo();
|
||||||
|
});
|
||||||
|
|
||||||
|
bar.querySelector('#yaktube-bar-help-btn').addEventListener('click', function () {
|
||||||
|
toggleShortcutsModal();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Global Keydown Listener (Screen-Reader & Turkish Q Optimized)
|
||||||
window.addEventListener('keydown', function (e) {
|
window.addEventListener('keydown', function (e) {
|
||||||
if (e.key === 'Escape') {
|
if (e.key === 'Escape') {
|
||||||
var shortcutsModal = document.getElementById('yaktube-shortcuts-dialog');
|
var shortcutsModal = document.getElementById('yaktube-shortcuts-dialog');
|
||||||
@@ -747,7 +1021,15 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.key === '?' || (e.shiftKey && e.key === '/')) {
|
// Admin Login: Alt+A
|
||||||
|
if (e.altKey && (e.key === 'a' || e.key === 'A') && !isInputFocused()) {
|
||||||
|
e.preventDefault();
|
||||||
|
openLocalAdminLoginModal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Help Dialog: Alt+H, F1 or '?' key
|
||||||
|
if ((e.altKey && (e.key === 'h' || e.key === 'H')) || e.key === 'F1' || e.key === '?') {
|
||||||
if (!isInputFocused()) {
|
if (!isInputFocused()) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
toggleShortcutsModal();
|
toggleShortcutsModal();
|
||||||
@@ -755,6 +1037,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Search Open: Alt+S, Ctrl+K or '/' key (Turkish Q Shift+7)
|
||||||
|
if (
|
||||||
|
((e.altKey && (e.key === 's' || e.key === 'S')) ||
|
||||||
|
(e.ctrlKey && (e.key === 'k' || e.key === 'K')) ||
|
||||||
|
e.key === '/') &&
|
||||||
|
!isInputFocused()
|
||||||
|
) {
|
||||||
|
e.preventDefault();
|
||||||
|
openFullSearchModal('', false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Voice Search Open: Alt+V or Shift+V
|
||||||
|
if (
|
||||||
|
((e.altKey && (e.key === 'v' || e.key === 'V')) || (e.shiftKey && (e.key === 'v' || e.key === 'V'))) &&
|
||||||
|
!isInputFocused()
|
||||||
|
) {
|
||||||
|
e.preventDefault();
|
||||||
|
openFullSearchModal('', true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (isInputFocused()) {
|
if (isInputFocused()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -763,9 +1067,10 @@
|
|||||||
if (!video) return;
|
if (!video) return;
|
||||||
|
|
||||||
var key = e.key.toLowerCase();
|
var key = e.key.toLowerCase();
|
||||||
|
var alt = e.altKey;
|
||||||
|
|
||||||
// Play / Pause (Space / K)
|
// Play / Pause (Alt+K, Space or K)
|
||||||
if (key === ' ' || key === 'k') {
|
if (key === ' ' || key === 'k' || (alt && key === 'k')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (video.paused) {
|
if (video.paused) {
|
||||||
video.play();
|
video.play();
|
||||||
@@ -775,44 +1080,44 @@
|
|||||||
announce('Video duraklatıldı.');
|
announce('Video duraklatıldı.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Seek 10s Back / Forward (J / L)
|
// Seek 10s Back / Forward (Alt+J / Alt+L or J / L)
|
||||||
else if (key === 'j') {
|
else if (key === 'j' || (alt && key === 'j')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
video.currentTime = Math.max(0, video.currentTime - 10);
|
video.currentTime = Math.max(0, video.currentTime - 10);
|
||||||
announce('10 saniye geri sarıldı. Konum: ' + formatTime(video.currentTime));
|
announce('10 saniye geri sarıldı. Konum: ' + formatTime(video.currentTime));
|
||||||
} else if (key === 'l') {
|
} else if (key === 'l' || (alt && key === 'l')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
video.currentTime = Math.min(video.duration || 99999, video.currentTime + 10);
|
video.currentTime = Math.min(video.duration || 99999, video.currentTime + 10);
|
||||||
announce('10 saniye ileri sarıldı. Konum: ' + formatTime(video.currentTime));
|
announce('10 saniye ileri sarıldı. Konum: ' + formatTime(video.currentTime));
|
||||||
}
|
}
|
||||||
// Seek 5s Back / Forward (Left / Right Arrow)
|
// Seek 5s Back / Forward (ArrowLeft / ArrowRight or Alt+Left/Right)
|
||||||
else if (e.key === 'ArrowLeft') {
|
else if (e.key === 'ArrowLeft' || (alt && e.key === 'ArrowLeft')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
video.currentTime = Math.max(0, video.currentTime - 5);
|
video.currentTime = Math.max(0, video.currentTime - 5);
|
||||||
announce('5 saniye geri sarıldı. Konum: ' + formatTime(video.currentTime));
|
announce('5 saniye geri sarıldı. Konum: ' + formatTime(video.currentTime));
|
||||||
} else if (e.key === 'ArrowRight') {
|
} else if (e.key === 'ArrowRight' || (alt && e.key === 'ArrowRight')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
video.currentTime = Math.min(video.duration || 99999, video.currentTime + 5);
|
video.currentTime = Math.min(video.duration || 99999, video.currentTime + 5);
|
||||||
announce('5 saniye ileri sarıldı. Konum: ' + formatTime(video.currentTime));
|
announce('5 saniye ileri sarıldı. Konum: ' + formatTime(video.currentTime));
|
||||||
}
|
}
|
||||||
// Volume Up / Down (Up / Down Arrow)
|
// Volume Up / Down (ArrowUp / ArrowDown or Alt+Up/Down)
|
||||||
else if (e.key === 'ArrowUp') {
|
else if (e.key === 'ArrowUp' || (alt && e.key === 'ArrowUp')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
video.volume = Math.min(1, video.volume + 0.05);
|
video.volume = Math.min(1, (video.volume || 1) + 0.05);
|
||||||
announce('Ses seviyesi yüzde ' + Math.round(video.volume * 100));
|
announce('Ses seviyesi yüzde ' + Math.round(video.volume * 100));
|
||||||
} else if (e.key === 'ArrowDown') {
|
} else if (e.key === 'ArrowDown' || (alt && e.key === 'ArrowDown')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
video.volume = Math.max(0, video.volume - 0.05);
|
video.volume = Math.max(0, (video.volume || 1) - 0.05);
|
||||||
announce('Ses seviyesi yüzde ' + Math.round(video.volume * 100));
|
announce('Ses seviyesi yüzde ' + Math.round(video.volume * 100));
|
||||||
}
|
}
|
||||||
// Mute (M)
|
// Mute (Alt+M or M)
|
||||||
else if (key === 'm') {
|
else if (key === 'm' || (alt && key === 'm')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
video.muted = !video.muted;
|
video.muted = !video.muted;
|
||||||
announce(video.muted ? 'Ses kapatıldı (Sessiz).' : 'Ses açıldı.');
|
announce(video.muted ? 'Ses kapatıldı (Sessiz).' : 'Ses açıldı.');
|
||||||
}
|
}
|
||||||
// Fullscreen (F)
|
// Fullscreen (Alt+F or F)
|
||||||
else if (key === 'f') {
|
else if (key === 'f' || (alt && key === 'f')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement) {
|
||||||
var container = video.closest('.video-js') || video.parentElement || video;
|
var container = video.closest('.video-js') || video.parentElement || video;
|
||||||
@@ -823,20 +1128,20 @@
|
|||||||
announce('Tam ekrandan çıkıldı.');
|
announce('Tam ekrandan çıkıldı.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Theater Mode (T)
|
// Theater Mode (Alt+T or T)
|
||||||
else if (key === 't') {
|
else if (key === 't' || (alt && key === 't')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
document.body.classList.toggle('yaktube-theater-mode');
|
document.body.classList.toggle('yaktube-theater-mode');
|
||||||
var isTheater = document.body.classList.contains('yaktube-theater-mode');
|
var isTheater = document.body.classList.contains('yaktube-theater-mode');
|
||||||
announce(isTheater ? 'Sinema modu açıldı.' : 'Sinema modundan çıkıldı.');
|
announce(isTheater ? 'Sinema modu açıldı.' : 'Sinema modundan çıkıldı.');
|
||||||
}
|
}
|
||||||
// Quick Video Info (I)
|
// Quick Video Info (Alt+I or I)
|
||||||
else if (key === 'i') {
|
else if (key === 'i' || (alt && key === 'i')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
showQuickVideoInfo();
|
showQuickVideoInfo();
|
||||||
}
|
}
|
||||||
// Subtitles (C)
|
// Subtitles (Alt+C or C)
|
||||||
else if (key === 'c') {
|
else if (key === 'c' || (alt && key === 'c')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var tracks = video.textTracks;
|
var tracks = video.textTracks;
|
||||||
if (tracks && tracks.length > 0) {
|
if (tracks && tracks.length > 0) {
|
||||||
@@ -847,31 +1152,13 @@
|
|||||||
announce('Bu videoda altyazı bulunmuyor.');
|
announce('Bu videoda altyazı bulunmuyor.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Speed Controls (< and > / Shift+, and Shift+.)
|
// Speed Controls (Alt+. / Alt+, or > / <)
|
||||||
else if (e.key === '>' || (e.shiftKey && e.key === '.')) {
|
else if ((alt && (e.key === '.' || e.key === '>')) || e.key === '>') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var curSpeed = video.playbackRate || 1;
|
adjustPlaybackSpeed(true);
|
||||||
var nextIdx = speedSteps.findIndex(function (s) {
|
} else if ((alt && (e.key === ',' || e.key === '<')) || e.key === '<') {
|
||||||
return s > curSpeed;
|
|
||||||
});
|
|
||||||
if (nextIdx !== -1) {
|
|
||||||
video.playbackRate = speedSteps[nextIdx];
|
|
||||||
} else {
|
|
||||||
video.playbackRate = 2;
|
|
||||||
}
|
|
||||||
announce('Oynatma hızı ' + video.playbackRate + ' katına çıkarıldı.');
|
|
||||||
} else if (e.key === '<' || (e.shiftKey && e.key === ',')) {
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var curSpeed = video.playbackRate || 1;
|
adjustPlaybackSpeed(false);
|
||||||
var prevSteps = speedSteps.filter(function (s) {
|
|
||||||
return s < curSpeed;
|
|
||||||
});
|
|
||||||
if (prevSteps.length > 0) {
|
|
||||||
video.playbackRate = prevSteps[prevSteps.length - 1];
|
|
||||||
} else {
|
|
||||||
video.playbackRate = 0.25;
|
|
||||||
}
|
|
||||||
announce('Oynatma hızı ' + video.playbackRate + ' katına düşürüldü.');
|
|
||||||
}
|
}
|
||||||
// Percentage Jumps (0 - 9)
|
// Percentage Jumps (0 - 9)
|
||||||
else if (key >= '0' && key <= '9' && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
else if (key >= '0' && key <= '9' && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
||||||
@@ -1536,6 +1823,145 @@
|
|||||||
var activeVoiceRec = null;
|
var activeVoiceRec = null;
|
||||||
var isVoiceListening = false;
|
var isVoiceListening = false;
|
||||||
|
|
||||||
|
// Dynamic Search History & Trending Helpers
|
||||||
|
function getRecentSearches() {
|
||||||
|
try {
|
||||||
|
var data = localStorage.getItem('yaktube_recent_searches');
|
||||||
|
if (data) {
|
||||||
|
var parsed = JSON.parse(data);
|
||||||
|
if (Array.isArray(parsed) && parsed.length > 0) return parsed;
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
// Default initial recent searches for first-time visitors
|
||||||
|
var defaults = ['Tarkan', 'Barış Manço', 'Yapay Zeka', 'Canlı Haber'];
|
||||||
|
try {
|
||||||
|
localStorage.setItem('yaktube_recent_searches', JSON.stringify(defaults));
|
||||||
|
} catch (e) {}
|
||||||
|
return defaults;
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveRecentSearch(query) {
|
||||||
|
if (!query || query.trim().length < 2) return;
|
||||||
|
var q = query.trim();
|
||||||
|
try {
|
||||||
|
var list = getRecentSearches();
|
||||||
|
list = list.filter(function (item) {
|
||||||
|
return item.toLowerCase() !== q.toLowerCase();
|
||||||
|
});
|
||||||
|
list.unshift(q);
|
||||||
|
if (list.length > 8) list = list.slice(0, 8);
|
||||||
|
localStorage.setItem('yaktube_recent_searches', JSON.stringify(list));
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearRecentSearches() {
|
||||||
|
try {
|
||||||
|
localStorage.removeItem('yaktube_recent_searches');
|
||||||
|
} catch (e) {}
|
||||||
|
renderDynamicSearchChips();
|
||||||
|
announce('Arama geçmişi temizlendi.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var popularTrendingQueries = [
|
||||||
|
{ title: '🎵 Türkçe Pop', q: 'Türkçe Pop' },
|
||||||
|
{ title: '🎸 Anadolu Rock', q: 'Anadolu Rock' },
|
||||||
|
{ title: '🤖 Yapay Zeka', q: 'Yapay Zeka' },
|
||||||
|
{ title: '💻 Yazılım Dersleri', q: 'Yazılım Dersleri' },
|
||||||
|
{ title: '🎧 Sesli Kitap & Radyo Tiyatrosu', q: 'Sesli Kitap' },
|
||||||
|
{ title: '📺 Canlı Haber', q: 'Canlı Haber' },
|
||||||
|
{ title: '🌍 Bilim & Belgesel', q: 'Bilim Belgeseli' },
|
||||||
|
{ title: '🎼 Akustik Canlı Performans', q: 'Akustik Canlı' },
|
||||||
|
{ title: '🎙️ Podcast & Söyleşi', q: 'Podcast Türkçe' }
|
||||||
|
];
|
||||||
|
|
||||||
|
// Auto capture search query from URL into recent searches
|
||||||
|
function captureUrlSearchQuery() {
|
||||||
|
try {
|
||||||
|
var params = new URLSearchParams(window.location.search);
|
||||||
|
var q = params.get('search') || params.get('q');
|
||||||
|
if (q && q.trim().length >= 2) {
|
||||||
|
saveRecentSearch(q.trim());
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
captureUrlSearchQuery();
|
||||||
|
window.addEventListener('popstate', captureUrlSearchQuery);
|
||||||
|
|
||||||
|
function renderDynamicSearchChips() {
|
||||||
|
var modal = document.getElementById('yaktube-full-search-modal');
|
||||||
|
if (!modal) return;
|
||||||
|
|
||||||
|
var container = modal.querySelector('#yaktube-modal-dynamic-chips-section');
|
||||||
|
if (!container) return;
|
||||||
|
|
||||||
|
var recent = getRecentSearches();
|
||||||
|
var html = '';
|
||||||
|
|
||||||
|
// 1. Recent searches section (if any)
|
||||||
|
if (recent.length > 0) {
|
||||||
|
html +=
|
||||||
|
'<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">' +
|
||||||
|
'<div class="yaktube-modal-section-title" style="margin-bottom: 0;">🕒 Son Aramalarınız</div>' +
|
||||||
|
'<button id="yaktube-clear-recent-btn" style="background: transparent; border: none; color: #ff8f37; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline;" aria-label="Arama geçmişini temizle">Geçmişi Temizle</button>' +
|
||||||
|
'</div>' +
|
||||||
|
'<div class="yaktube-modal-chips-grid" style="margin-bottom: 18px;">';
|
||||||
|
|
||||||
|
recent.forEach(function (term) {
|
||||||
|
var safeTerm = term.replace(/"/g, '"');
|
||||||
|
html +=
|
||||||
|
'<button class="yaktube-modal-chip yaktube-recent-chip" data-query="' +
|
||||||
|
safeTerm +
|
||||||
|
'" aria-label="Son arama: ' +
|
||||||
|
safeTerm +
|
||||||
|
'">🕒 ' +
|
||||||
|
safeTerm +
|
||||||
|
'</button>';
|
||||||
|
});
|
||||||
|
html += '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Popular & Trending searches section
|
||||||
|
html +=
|
||||||
|
'<div class="yaktube-modal-section-title">🔥 Hızlı ve Popüler Aramalar</div>' +
|
||||||
|
'<div class="yaktube-modal-chips-grid">';
|
||||||
|
|
||||||
|
popularTrendingQueries.forEach(function (item) {
|
||||||
|
var safeQ = item.q.replace(/"/g, '"');
|
||||||
|
html +=
|
||||||
|
'<button class="yaktube-modal-chip" data-query="' +
|
||||||
|
safeQ +
|
||||||
|
'" aria-label="Popüler arama: ' +
|
||||||
|
safeQ +
|
||||||
|
'">' +
|
||||||
|
item.title +
|
||||||
|
'</button>';
|
||||||
|
});
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
container.innerHTML = html;
|
||||||
|
|
||||||
|
// Attach click events
|
||||||
|
container.querySelectorAll('.yaktube-modal-chip').forEach(function (chip) {
|
||||||
|
chip.addEventListener('click', function () {
|
||||||
|
var query = chip.getAttribute('data-query');
|
||||||
|
var inp = modal.querySelector('#yaktube-modal-input');
|
||||||
|
if (inp) inp.value = query;
|
||||||
|
if (typeof window.__yaktube_execute_search__ === 'function') {
|
||||||
|
window.__yaktube_execute_search__(query);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var clearBtn = container.querySelector('#yaktube-clear-recent-btn');
|
||||||
|
if (clearBtn) {
|
||||||
|
clearBtn.addEventListener('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
clearRecentSearches();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function createFullSearchModal() {
|
function createFullSearchModal() {
|
||||||
var existingModal = document.getElementById('yaktube-full-search-modal');
|
var existingModal = document.getElementById('yaktube-full-search-modal');
|
||||||
if (existingModal) return existingModal;
|
if (existingModal) return existingModal;
|
||||||
@@ -1564,17 +1990,7 @@
|
|||||||
'<div id="yaktube-modal-voice-transcript" class="yaktube-modal-voice-transcript">Lütfen aramak istediğiniz videoyu söyleyin...</div>' +
|
'<div id="yaktube-modal-voice-transcript" class="yaktube-modal-voice-transcript">Lütfen aramak istediğiniz videoyu söyleyin...</div>' +
|
||||||
'<button id="yaktube-modal-mic-pulse" class="yaktube-modal-mic-pulse-btn" aria-label="Mikrofonu durdur">🎙️</button>' +
|
'<button id="yaktube-modal-mic-pulse" class="yaktube-modal-mic-pulse-btn" aria-label="Mikrofonu durdur">🎙️</button>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="yaktube-modal-section-title">🔥 Hızlı ve Popüler Aramalar</div>' +
|
'<div id="yaktube-modal-dynamic-chips-section"></div>' +
|
||||||
'<div class="yaktube-modal-chips-grid">' +
|
|
||||||
'<button class="yaktube-modal-chip" data-query="Tarkan">🎵 Tarkan</button>' +
|
|
||||||
'<button class="yaktube-modal-chip" data-query="Barış Manço">🎸 Barış Manço</button>' +
|
|
||||||
'<button class="yaktube-modal-chip" data-query="Python Dersleri">💻 Python Dersleri</button>' +
|
|
||||||
'<button class="yaktube-modal-chip" data-query="Yapay Zeka">🤖 Yapay Zeka</button>' +
|
|
||||||
'<button class="yaktube-modal-chip" data-query="Sesli Kitap">🎧 Sesli Kitap</button>' +
|
|
||||||
'<button class="yaktube-modal-chip" data-query="Canlı Haber">📺 Canlı Haber</button>' +
|
|
||||||
'<button class="yaktube-modal-chip" data-query="Gitar Dersi">🎼 Gitar Dersi</button>' +
|
|
||||||
'<button class="yaktube-modal-chip" data-query="Bilim Belgeseli">🌍 Bilim Belgeseli</button>' +
|
|
||||||
'</div>' +
|
|
||||||
'<div class="yaktube-modal-hint-footer">' +
|
'<div class="yaktube-modal-hint-footer">' +
|
||||||
'<span>💡 <b>Enter</b> ile ara, <b>Shift+V</b> ile sesli ara</span>' +
|
'<span>💡 <b>Enter</b> ile ara, <b>Shift+V</b> ile sesli ara</span>' +
|
||||||
'<span><b>Escape</b> ile kapat</span>' +
|
'<span><b>Escape</b> ile kapat</span>' +
|
||||||
@@ -1624,11 +2040,14 @@
|
|||||||
function executeSearch(query) {
|
function executeSearch(query) {
|
||||||
var q = (query || inp.value || '').trim();
|
var q = (query || inp.value || '').trim();
|
||||||
if (q) {
|
if (q) {
|
||||||
|
saveRecentSearch(q);
|
||||||
announce('"' + q + '" için arama yapılıyor...', true);
|
announce('"' + q + '" için arama yapılıyor...', true);
|
||||||
closeFullSearchModal();
|
closeFullSearchModal();
|
||||||
window.location.href = '/search/videos?search=' + encodeURIComponent(q);
|
window.location.href = '/search/videos?search=' + encodeURIComponent(q);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
window.__yaktube_execute_search__ = executeSearch;
|
||||||
|
renderDynamicSearchChips();
|
||||||
|
|
||||||
submitBtn.addEventListener('click', function () {
|
submitBtn.addEventListener('click', function () {
|
||||||
executeSearch();
|
executeSearch();
|
||||||
@@ -1668,6 +2087,7 @@
|
|||||||
var modal = createFullSearchModal();
|
var modal = createFullSearchModal();
|
||||||
modal.classList.add('yaktube-modal-open');
|
modal.classList.add('yaktube-modal-open');
|
||||||
modal.style.display = 'flex';
|
modal.style.display = 'flex';
|
||||||
|
renderDynamicSearchChips();
|
||||||
|
|
||||||
var inp = modal.querySelector('#yaktube-modal-input');
|
var inp = modal.querySelector('#yaktube-modal-input');
|
||||||
var clearBtn = modal.querySelector('#yaktube-modal-clear-btn');
|
var clearBtn = modal.querySelector('#yaktube-modal-clear-btn');
|
||||||
@@ -2479,7 +2899,12 @@
|
|||||||
headerButtons.prepend(installBtn);
|
headerButtons.prepend(installBtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isYakTubeInstance() {
|
||||||
|
return window.location.hostname.includes('yaktube.yakhub.com.tr') || getInstanceName() === 'YakTube';
|
||||||
|
}
|
||||||
|
|
||||||
function injectApkDownloadButton() {
|
function injectApkDownloadButton() {
|
||||||
|
if (!isYakTubeInstance()) return;
|
||||||
// 1. If inside APK: NEVER show APK button
|
// 1. If inside APK: NEVER show APK button
|
||||||
if (isInsideYakTubeApp) {
|
if (isInsideYakTubeApp) {
|
||||||
var existBtnApp = document.getElementById('yaktube-apk-download-btn');
|
var existBtnApp = document.getElementById('yaktube-apk-download-btn');
|
||||||
@@ -2524,6 +2949,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function injectSidebarApkLink() {
|
function injectSidebarApkLink() {
|
||||||
|
if (!isYakTubeInstance()) return;
|
||||||
// If inside APK: NEVER show in sidebar
|
// If inside APK: NEVER show in sidebar
|
||||||
if (isInsideYakTubeApp) {
|
if (isInsideYakTubeApp) {
|
||||||
var existLink = document.getElementById('yaktube-sidebar-apk-link');
|
var existLink = document.getElementById('yaktube-sidebar-apk-link');
|
||||||
@@ -2571,3 +2997,132 @@
|
|||||||
});
|
});
|
||||||
checkAndInjectWatchPageComments();
|
checkAndInjectWatchPageComments();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// 5. Background Play (Screen-Off / Minimize) & MediaSession Lock-Screen Controls
|
||||||
|
(function initBackgroundPlaybackEngine() {
|
||||||
|
var videoState = {
|
||||||
|
hasPlayed: false,
|
||||||
|
pausedByUser: false,
|
||||||
|
pausedAt: null
|
||||||
|
};
|
||||||
|
|
||||||
|
function attachVideoListeners(video) {
|
||||||
|
if (!video || video.hasAttribute('data-yaktube-bgplay-hooked')) return;
|
||||||
|
video.setAttribute('data-yaktube-bgplay-hooked', 'true');
|
||||||
|
|
||||||
|
video.addEventListener('play', function () {
|
||||||
|
videoState.hasPlayed = true;
|
||||||
|
videoState.pausedByUser = false;
|
||||||
|
updateMediaSessionMetadata(video);
|
||||||
|
});
|
||||||
|
|
||||||
|
video.addEventListener('pause', function () {
|
||||||
|
videoState.pausedAt = Date.now();
|
||||||
|
// If document is visible when paused, it was paused manually by the user
|
||||||
|
if (!document.hidden) {
|
||||||
|
videoState.pausedByUser = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
video.addEventListener('ended', function () {
|
||||||
|
videoState.hasPlayed = false;
|
||||||
|
videoState.pausedByUser = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
video.addEventListener('timeupdate', function () {
|
||||||
|
updateMediaSessionPosition(video);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleVisibilityChange() {
|
||||||
|
if (!document.hidden) return; // Screen is active
|
||||||
|
|
||||||
|
var video = getVideoElement();
|
||||||
|
if (!video) return;
|
||||||
|
|
||||||
|
// If user hasn't played or deliberately paused, do not auto-resume
|
||||||
|
if (!videoState.hasPlayed || videoState.pausedByUser) return;
|
||||||
|
|
||||||
|
var now = Date.now();
|
||||||
|
if (videoState.pausedAt && now - videoState.pausedAt > 1500 && videoState.pausedByUser) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resume playback when screen locks or tab switches
|
||||||
|
setTimeout(function () {
|
||||||
|
if (video.paused && !videoState.pausedByUser) {
|
||||||
|
video.play().catch(function () {});
|
||||||
|
}
|
||||||
|
}, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('visibilitychange', handleVisibilityChange, false);
|
||||||
|
document.addEventListener('webkitvisibilitychange', handleVisibilityChange, false);
|
||||||
|
|
||||||
|
// MediaSession API Integration (Lock Screen, Bluetooth, Smart Watches)
|
||||||
|
function updateMediaSessionMetadata(video) {
|
||||||
|
if (!('mediaSession' in navigator)) return;
|
||||||
|
|
||||||
|
var titleEl = document.querySelector('h1.video-title, .video-name, my-video-watch h1, .title');
|
||||||
|
var title = titleEl ? titleEl.textContent.trim() : 'YakTube Video';
|
||||||
|
var authorEl = document.querySelector('.actor-name, .channel-name, .video-channel-name, a.actor-link');
|
||||||
|
var artist = authorEl ? authorEl.textContent.trim() : 'YakTube';
|
||||||
|
|
||||||
|
var artwork = [];
|
||||||
|
var thumbEl = document.querySelector('meta[property="og:image"]');
|
||||||
|
if (thumbEl && thumbEl.content) {
|
||||||
|
artwork.push({ src: thumbEl.content, sizes: '512x512', type: 'image/jpeg' });
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
navigator.mediaSession.metadata = new MediaMetadata({
|
||||||
|
title: title,
|
||||||
|
artist: artist,
|
||||||
|
album: 'YakTube',
|
||||||
|
artwork: artwork
|
||||||
|
});
|
||||||
|
|
||||||
|
navigator.mediaSession.setActionHandler('play', function () {
|
||||||
|
video.play();
|
||||||
|
announce('Video oynatılıyor.');
|
||||||
|
});
|
||||||
|
navigator.mediaSession.setActionHandler('pause', function () {
|
||||||
|
videoState.pausedByUser = true;
|
||||||
|
video.pause();
|
||||||
|
announce('Video duraklatıldı.');
|
||||||
|
});
|
||||||
|
navigator.mediaSession.setActionHandler('seekbackward', function (details) {
|
||||||
|
var skipTime = details.seekOffset || 10;
|
||||||
|
video.currentTime = Math.max(0, video.currentTime - skipTime);
|
||||||
|
announce(skipTime + ' saniye geri sarıldı.');
|
||||||
|
});
|
||||||
|
navigator.mediaSession.setActionHandler('seekforward', function (details) {
|
||||||
|
var skipTime = details.seekOffset || 10;
|
||||||
|
video.currentTime = Math.min(video.duration || 99999, video.currentTime + skipTime);
|
||||||
|
announce(skipTime + ' saniye ileri sarıldı.');
|
||||||
|
});
|
||||||
|
navigator.mediaSession.setActionHandler('stop', function () {
|
||||||
|
videoState.pausedByUser = true;
|
||||||
|
video.pause();
|
||||||
|
});
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateMediaSessionPosition(video) {
|
||||||
|
if (!('mediaSession' in navigator) || !navigator.mediaSession.setPositionState) return;
|
||||||
|
if (isNaN(video.duration) || isNaN(video.currentTime) || video.duration <= 0) return;
|
||||||
|
try {
|
||||||
|
navigator.mediaSession.setPositionState({
|
||||||
|
duration: video.duration,
|
||||||
|
playbackRate: video.playbackRate || 1,
|
||||||
|
position: Math.min(video.currentTime, video.duration)
|
||||||
|
});
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auto-hook active video elements
|
||||||
|
setInterval(function () {
|
||||||
|
var video = getVideoElement();
|
||||||
|
if (video) attachVideoListeners(video);
|
||||||
|
}, 1000);
|
||||||
|
})();
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
# NLnet Foundation / NGI Zero Grant Application Dossier
|
|
||||||
## Project: YakTube (Accessible & Lightweight ActivityPub Media Engine)
|
|
||||||
|
|
||||||
> **Belge Amacı:** Bu dosya, 3 Eylül 2026 tarihinde açılacak olan **NLnet NGI Zero Commons Trust / Digital Accessibility** hibe çağrısı için hazırlanmış resmi İngilizce başvuru taslağıdır. Formdaki sorulara göre kopyala-yapıştır yapmaya hazır şekilde yapılandırılmıştır.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 1. General & Contact Information / Genel ve İletişim Bilgileri
|
|
||||||
|
|
||||||
* **Project Name (Proje Adı):**
|
|
||||||
`YakTube: Accessible, Lightweight & Decentralized ActivityPub Media Engine`
|
|
||||||
* **Applicant / Contact Person (Başvuran Kişi):**
|
|
||||||
`Enes Yakıştır`
|
|
||||||
* **Email Address (E-posta):**
|
|
||||||
`[email protected]`
|
|
||||||
* **Country (Ülke):**
|
|
||||||
`Turkey`
|
|
||||||
* **Organization / Community (Organizasyon):**
|
|
||||||
`YakNet (YakHub Open Source Accessibility Initiative)`
|
|
||||||
* **Website / Live Demo URL (Canlı Demo):**
|
|
||||||
`https://yaktube.yakhub.com.tr`
|
|
||||||
* **Source Code Repositories (Açık Kaynak Kod Depoları):**
|
|
||||||
* **On-Demand & A11y Plugin (Primary):** `https://yakhub.com.tr/YakNet/peertube-plugin-yaktube-ondemand`
|
|
||||||
* **On-Demand & A11y Plugin (GitHub Mirror):** `https://github.com/yakistir98/peertube-plugin-yaktube-ondemand`
|
|
||||||
* **YakNet SSO Auth Plugin (Primary):** `https://yakhub.com.tr/YakNet/peertube-plugin-auth-yaknet`
|
|
||||||
* **YakNet SSO Auth Plugin (GitHub Mirror):** `https://github.com/yakistir98/peertube-plugin-auth-yaknet`
|
|
||||||
* **Project License (Açık Kaynak Lisansı):**
|
|
||||||
`AGPLv3 / MIT (OSI-Approved Free & Open Source Licenses)`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 1.1 Verified Banking Details / Resmi Banka ve Ödeme Bilgileri (Hakediş İçin Hazır)
|
|
||||||
* **Bank Name (Banka):** `Yapı ve Kredi Bankası A.Ş. (Yapı Kredi)`
|
|
||||||
* **Account Holder (Hesap Sahibi):** `Enes Yakıştır`
|
|
||||||
* **Currency (Para Birimi):** `EUR (Euro Vadesiz Hesap)`
|
|
||||||
* **IBAN (Euro IBAN):** `TR350006701000000319490793`
|
|
||||||
* **SWIFT / BIC Code:** `YAPITRIS`
|
|
||||||
* **Country:** `Turkey`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 2. Short Project Summary (Abstract) / Proje Kısa Özeti
|
|
||||||
*(Formda "Explain the project in simple terms" kısmına yapıştırılacak İngilizce metin)*
|
|
||||||
|
|
||||||
**English Text:**
|
|
||||||
> "YakTube is a lightweight, screen-reader-first media syndication engine and client built on top of the open-source PeerTube/ActivityPub ecosystem. While commercial video platforms (like YouTube) and existing alternative frontends suffer from heavy JavaScript bloat, dynamic DOM instability, intrusive tracking, and poor screen-reader accessibility, YakTube provides a 100% WCAG 2.1 AAA-compliant, ad-free streaming and on-demand caching bridge. Developed directly by visually impaired engineers, YakTube includes a specialized PeerTube plugin, an on-demand ingestion bridge, and a sub-5MB native mobile client designed for seamless TalkBack and NVDA screen-reader navigation."
|
|
||||||
|
|
||||||
**Türkçe Açıklaması:**
|
|
||||||
YakTube, PeerTube ve ActivityPub ekosistemi üzerinde inşa edilmiş, ekran okuyucu odaklı, hafif bir medya platformu ve istemcisidir. Ticari platformların reklam ve erişilebilirlik engellerini ortadan kaldırarak; görme engelli yazılımcılar tarafından geliştirilmiş %100 WCAG 2.1 AAA uyumlu, reklamsız, 4.5 MB hafif mobil istemcili bir açık kaynak çözümü sunar.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 3. The Challenge / Problem ve Çözülmek İstenen Zorluk
|
|
||||||
*(Formda "What is the problem you are trying to solve?" kısmına yapıştırılacak metin)*
|
|
||||||
|
|
||||||
**English Text:**
|
|
||||||
> "Access to digital multimedia remains one of the greatest barriers for visually impaired, blind, and assistive-technology users worldwide.
|
|
||||||
> 1. **Commercial Monopolies:** Mainstream platforms prioritize visual advertising algorithms, dynamic popups, and non-semantic DOM trees that severely degrade screen-reader experiences (TalkBack, NVDA, VoiceOver).
|
|
||||||
> 2. **Fragility of Scraper Frontends:** Public proxy instances (such as Invidious or Piped) regularly break due to upstream bot-guard countermeasures, lack decentralized ActivityPub federation, and offer zero specialized accessibility audits.
|
|
||||||
> 3. **The Fediverse Accessibility Void:** While PeerTube is the gold standard for decentralized video federation, vanilla instances lack built-in screen-reader ARIA live regions, simplified audio/podcast streaming layouts, and ultra-lightweight mobile clients for low-end devices.
|
|
||||||
>
|
|
||||||
> YakTube directly tackles these issues by engineering an upstream-compatible accessibility layer that empowers blind users to search, cache, stream, and federate media freely without surveillance or assistive barriers."
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 4. Technical Architecture & Innovation / Teknik Çözüm ve İnovasyon
|
|
||||||
*(Formda "What is the proposed solution and technical approach?" kısmına yapıştırılacak metin)*
|
|
||||||
|
|
||||||
**English Text:**
|
|
||||||
> "YakTube delivers a three-tier technical innovation:
|
|
||||||
> 1. **WCAG 2.1 AAA Screen-Reader & Pro Video Player Engine:** Re-architecting the web and client interface with strict semantic HTML5, explicit ARIA live regions, natural hands-free voice search (`Web Speech API`), full-featured YouTube keyboard navigation (`Space/K` play-pause, `J/L` 10s seek, `Left/Right` 5s seek, `T` Theater Mode, `I` Instant Video Stats, `C` Subtitles, `0-9` percentage jumps, `>/<` playback speed steps, `Shift+V`, `/`, `Escape`), and distraction-free audio playback modes.
|
|
||||||
> 2. **On-Demand ActivityPub Syndication Bridge:** A custom Node.js and PeerTube plugin controller that accepts search queries, validates media availability, performs automated channel routing (Music, Podcasts, Tech), and caches streams with an automated pruning lifecycle to conserve bandwidth and storage.
|
|
||||||
> 3. **Sub-5MB Native Mobile Client:** A zero-telemetry, lightweight Android client (`tr.com.yaknet.yaktube`) engineered specifically for TalkBack gesture control, eliminating background memory overhead and providing offline cached listening."
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 5. Upstream Ecosystem Benefit / Ekosisteme ve Açık İnternete Faydası
|
|
||||||
*(Formda "How will this contribute to the open internet / NGI ecosystem?" kısmına yapıştırılacak metin)*
|
|
||||||
|
|
||||||
**English Text:**
|
|
||||||
> "YakTube is not a private silo; all core components are packaged as reusable open-source modules:
|
|
||||||
> - Any existing PeerTube administrator in the global Fediverse can install the `peertube-plugin-yaktube-ondemand` package with a single click to instantly make their instance 100% accessible to visually impaired communities.
|
|
||||||
> - The native Android client source code will be published as an accessible open-source template for ActivityPub media clients.
|
|
||||||
> - Full compliance with the **European Accessibility Act (EAA)** guidelines, providing a reference implementation for inclusive Fediverse software."
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 6. Work Plan, Milestones & Budget Breakdown / Çalışma Planı ve Bütçe
|
|
||||||
*(Talep Edilen Toplam Hibe: **5.000 €** - Geliştirici Ar-Ge Emeği / Developer Labor)*
|
|
||||||
|
|
||||||
#### 📍 Milestone 1: Advanced Screen-Reader Accessibility & WCAG 2.1 AAA Compliance
|
|
||||||
* **Estimated Labor:** 50 Hours (Developer R&D / A11y Engineering)
|
|
||||||
* **Budget Allocation:** **2.000 €**
|
|
||||||
* **Deliverables:**
|
|
||||||
- Full keyboard-only and screen-reader audit (NVDA, TalkBack, Orca).
|
|
||||||
- ARIA live region announcements for player states (buffering, playing, volume, subtitles).
|
|
||||||
- High-contrast accessible theme and automated accessibility regression test suite.
|
|
||||||
|
|
||||||
#### 📍 Milestone 2: Native Lightweight Android Client & Upstream Plugin Packaging
|
|
||||||
* **Estimated Labor:** 50 Hours (Mobile Client & API Integration)
|
|
||||||
* **Budget Allocation:** **2.000 €**
|
|
||||||
* **Deliverables:**
|
|
||||||
- Open-source release of the sub-5MB native Android client on YakHub and GitHub with APK builds.
|
|
||||||
- Complete TalkBack gesture optimization and background playback support.
|
|
||||||
- NPM packaging of `peertube-plugin-yaktube-ondemand` for standard PeerTube installations.
|
|
||||||
|
|
||||||
#### 📍 Milestone 3: Documentation, Fediverse CI/CD & Production Testing
|
|
||||||
* **Estimated Labor:** 25 Hours (DevOps, Documentation & Auditing)
|
|
||||||
* **Budget Allocation:** **1.000 €**
|
|
||||||
* **Deliverables:**
|
|
||||||
- Comprehensive English & Turkish installation and developer documentation on YakHub/GitHub.
|
|
||||||
- Multi-instance ActivityPub federation testing and automated containerized deployment scripts.
|
|
||||||
- Public final milestone report and live release validation.
|
|
||||||
|
|
||||||
* **TOTAL REQUESTED GRANT:** **5.000 €**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 7. Why We Are Uniquely Qualified / Neden Bu Projeyi Biz Başarabiliriz?
|
|
||||||
**English Text:**
|
|
||||||
> "The project lead is a passionate visually impaired software engineer who lives with assistive technology daily. Rather than treating accessibility as an external afterthought, YakTube is built from the ground up through lived experience, practical engineering, and deep commitment to open-source digital sovereignty. A fully functioning live prototype (`yaktube.yakhub.com.tr`) and working APK are already operational, demonstrating technical capability and guaranteed milestone delivery."
|
|
||||||
+8
-4
@@ -1,14 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "peertube-plugin-yaktube-ondemand",
|
"name": "peertube-plugin-yaktube-ondemand",
|
||||||
"version": "1.4.0",
|
"version": "1.4.9",
|
||||||
"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",
|
||||||
|
"staticDirs": {},
|
||||||
|
"translations": {},
|
||||||
"clientScripts": [
|
"clientScripts": [
|
||||||
{
|
{
|
||||||
|
"script": "client.js",
|
||||||
"scopes": [
|
"scopes": [
|
||||||
"common"
|
"common"
|
||||||
],
|
]
|
||||||
"script": "client.js"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"css": [
|
"css": [
|
||||||
@@ -36,8 +39,9 @@
|
|||||||
"author": "Enes Yakıştır <[email protected]>",
|
"author": "Enes Yakıştır <[email protected]>",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/enesyakistir/peertube-plugin-yaktube-ondemand.git"
|
"url": "https://github.com/yakistir98/peertube-plugin-yaktube-ondemand.git"
|
||||||
},
|
},
|
||||||
"homepage": "https://yaktube.yakhub.com.tr",
|
"homepage": "https://yaktube.yakhub.com.tr",
|
||||||
|
"bugs": "https://github.com/yakistir98/peertube-plugin-yaktube-ondemand/issues",
|
||||||
"license": "AGPL-3.0-or-later"
|
"license": "AGPL-3.0-or-later"
|
||||||
}
|
}
|
||||||
@@ -843,3 +843,54 @@ body.yaktube-theater-mode .video-js {
|
|||||||
.yaktube-info-toast-row b {
|
.yaktube-info-toast-row b {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* ACCESSIBLE PLAYER ACTION BAR & SHORTCUTS (v1.4.1) */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
.yaktube-player-action-bar {
|
||||||
|
display: flex !important;
|
||||||
|
flex-wrap: wrap !important;
|
||||||
|
gap: 8px !important;
|
||||||
|
align-items: center !important;
|
||||||
|
background: #181820 !important;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
||||||
|
border-radius: 12px !important;
|
||||||
|
padding: 10px 14px !important;
|
||||||
|
margin: 12px 0 16px 0 !important;
|
||||||
|
width: 100% !important;
|
||||||
|
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-player-bar-label {
|
||||||
|
font-size: 13px !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
color: #ff8f37 !important;
|
||||||
|
margin-right: 6px !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
gap: 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-player-action-btn {
|
||||||
|
background: #252530 !important;
|
||||||
|
color: #f1f1f1 !important;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
||||||
|
border-radius: 8px !important;
|
||||||
|
padding: 6px 12px !important;
|
||||||
|
font-size: 13px !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
cursor: pointer !important;
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
gap: 6px !important;
|
||||||
|
transition: all 0.2s ease !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-player-action-btn:hover,
|
||||||
|
.yaktube-player-action-btn:focus {
|
||||||
|
background: rgba(255, 143, 55, 0.2) !important;
|
||||||
|
border-color: #ff8f37 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user