<!DOCTYPE html>
<html>
<head>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: none;
display: block;
}
</style>
</head>
<body>
<iframe src="Nom_Du_Fichier.pdf" allowfullscreen></iframe>
</body>
</html>
Avec la molette (scroll) de la souris :
let scale = 1;
const scaleStep = 0.1;
const maxScale = 2;
const slideContainer = document.getElementById('slide-window');
slideContainer.style.transition = "transform 0.1s";
slideContainer.addEventListener('wheel', function(event) {
if (event.deltaY < 0) {
if (scale < maxScale) {
scale += scaleStep;
if (scale > maxScale) {
scale = maxScale;
}
}
} else {
if (scale > 1) {
scale -= scaleStep;
if (scale < 1) {
scale = 1;
}
}
}
slideContainer.style.transform = `scale(${scale})`;
event.preventDefault();
}, { passive: false });
Avec la molette (scroll) de la souris et les touches + / - / p / m :
let scale = 1;
const scaleStep = 0.1;
const maxScale = 2;
const slideContainer = document.getElementById('slide-window');
slideContainer.style.transition = "transform 0.1s";
function updateScale() {
slideContainer.style.transform = `scale(${scale})`;
}
slideContainer.addEventListener('wheel', function(event) {
if (event.deltaY < 0) {
if (scale < maxScale) {
scale += scaleStep;
if (scale > maxScale) {
scale = maxScale;
}
}
} else {
if (scale > 1) {
scale -= scaleStep;
if (scale < 1) {
scale = 1;
}
}
}
updateScale();
event.preventDefault();
}, { passive: false });
window.addEventListener('keydown', function(event) {
if (event.key === 'p' || event.key === '+' || event.key === 'NumpadAdd') {
if (scale < maxScale) {
scale += scaleStep;
if (scale > maxScale) {
scale = maxScale;
}
}
} else if (event.key === 'm' || event.key === '-' || event.key === 'NumpadSubtract') {
if (scale > 1) {
scale -= scaleStep;
if (scale < 1) {
scale = 1;
}
}
}
updateScale();
});
📺 Vidéo associée : https://youtu.be/9Hjcmmj-Zrs
var player = GetPlayer();
var texte = player.GetVar("narration");
var utterance = new SpeechSynthesisUtterance(texte);
utterance.lang = 'fr-FR'; // Pour le français
utterance.volume = 1.0; // Volume à 100%
utterance.rate = 1.0; // Débit à 100%
utterance.pitch = 1.0; // Ton à 100%
window.speechSynthesis.speak(utterance);
📺 Vidéo associée : https://youtu.be/1mrYSzGa10w
var player = GetPlayer();
var targetNumber = player.GetVar("scorearrondi");
targetNumber = Math.round(targetNumber);
player.SetVar("scorearrondi", targetNumber);
📺 Vidéo associée : https://youtu.be/5O21xMSyQb8
if ((document.fullScreenElement && document.fullScreenElement !== null) ||
(!document.mozFullScreen && !document.webkitIsFullScreen)) {
if (document.documentElement.requestFullScreen) {
document.documentElement.requestFullScreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullScreen) {
document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
}
📺 Vidéo associée : https://www.youtube.com/watch?v=D63CSMQj_VM