Video Player Generator
`;
}
function generateVideoJsPlayer(videoUrl, posterUrl, width, height, autoplay, controls, loop, muted) {
return `
`;
}
function generateDPlayer(videoUrl, posterUrl, width, height, autoplay, controls, loop, muted) {
return `
`;
}
function copyCode() {
const codeOutput = document.getElementById('codeOutput');
const textArea = document.createElement('textarea');
textArea.value = codeOutput.textContent;
document.body.appendChild(textArea);
textArea.select();
document.execCommand('copy');
document.body.removeChild(textArea);
alert('Code copied to clipboard!');
}
// Tab switching
document.querySelectorAll('.tab-btn').forEach(button => {
button.addEventListener('click', () => {
document.querySelectorAll('.tab-btn').forEach(btn => btn.classList.remove('active'));
button.classList.add('active');
generateCode();
});
});