let players = {}
document.addEventListener('DOMContentLoaded', (event) => {
	let headers = dgtn(`h2`);
	Object.values(headers).forEach((header) => {
		header.innerHTML += `<a class='post-nav-link' aria-hidden='true' href='#${header.id}'>#</a>`;
	});
	players = Array.from(dgcn('plyr')).map(p => new Plyr(p, {
		iconUrl: '/assets/plyr/plyr.svg',
		controls: ['play-large', 'play', 'current-time', 'progress', 'download', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen'],
		quality: {
			default: p.dataset.default,
			options: [4320, 2880, 2160, 1440, 1080, 720, 576, 506, 480, 360, 240]
		},
		i18n: {
			qualityBadge: {
				506: 'SD',
			}
		}
	}));
});