<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="files/fullscreeen.js"></script>
<title>Fenêtre USB Schema</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
overflow: hidden;
background: url('files/FOND D\'ÉCRAN JUGE.png') no-repeat center center fixed;
background-size: cover;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.desktop {
width: 100%;
height: 100%;
position: relative;
}
.window {
display: none;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 600px;
background: white;
border-radius: 8px 8px 0 0;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.window.active {
display: block;
animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.window::before {
content: '';
position: absolute;
top: -100%;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 100%;
pointer-events: none;
}
.window.active::before {
animation: fadeInBackground 0.2s ease-out;
}
@keyframes slideIn {
0% {
opacity: 0;
transform: translate(-50%, -50%) scale(0.8);
}
60% {
opacity: 1;
transform: translate(-50%, -50%) scale(1.05);
}
100% {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
}
@keyframes fadeInBackground {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.title-bar {
background: linear-gradient(180deg, #4a90e2 0%, #2e5f9e 100%);
color: white;
padding: 8px 12px;
border-radius: 8px 8px 0 0;
display: flex;
justify-content: space-between;
align-items: center;
cursor: move;
}
.title-text {
font-size: 13px;
font-weight: 600;
}
.close-btn {
background: #d32f2f;
color: white;
border: none;
width: 20px;
height: 20px;
border-radius: 3px;
cursor: pointer;
font-size: 14px;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
}
.close-btn:hover {
background: #b71c1c;
}
.tab-bar {
background: #f0f0f0;
padding: 6px 12px 0 12px;
border-bottom: 1px solid #ccc;
}
.tab {
display: inline-block;
padding: 6px 16px;
background: white;
border: 1px solid #ccc;
border-bottom: 1px solid white;
border-radius: 4px 4px 0 0;
font-size: 12px;
position: relative;
bottom: -1px;
}
.content {
padding: 20px;
}
.usb-box {
border: 1px solid #ccc;
border-radius: 4px;
padding: 15px;
margin-bottom: 15px;
}
.usb-header {
display: flex;
align-items: center;
}
.usb-icon {
width: 40px;
height: 40px;
margin-right: 12px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.usb-name {
font-size: 15px;
font-weight: 600;
}
.eject-btn {
margin-left: auto;
padding: 6px 16px;
background: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
}
.eject-btn:hover {
background: #e0e0e0;
}
.recordings-box {
border: 1px solid #ccc;
border-radius: 4px;
padding: 15px;
}
.recordings-title {
font-size: 14px;
font-weight: 600;
margin-bottom: 15px;
color: #333;
}
.recording-item {
display: flex;
align-items: flex-start;
padding: 8px 0;
margin-bottom: 8px;
transition: background 0.2s;
}
.recording-item:hover {
background: transparent;
}
.play-icon {
width: 40px;
height: 40px;
background: linear-gradient(135deg, #87ceeb 0%, #5eb3d6 100%);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
cursor: pointer;
transition: transform 0.2s;
flex-shrink: 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.play-icon:hover {
transform: scale(1.05);
}
.play-icon::before {
content: '▶';
color: white;
font-size: 16px;
margin-left: 2px;
}
.play-icon.playing::before {
content: '❚❚';
margin-left: 0;
font-size: 14px;
}
.recording-info {
flex: 1;
}
.recording-name {
font-size: 13px;
font-weight: 400;
margin-bottom: 2px;
color: #000;
}
.recording-duration {
font-size: 12px;
color: #666;
font-weight: 400;
}
.player-container {
margin-top: 8px;
display: none;
}
.player-container.active {
display: block;
}
.progress-bar {
width: 100%;
height: 60px;
background: #f0f0f0;
border-radius: 4px;
position: relative;
overflow: hidden;
cursor: pointer;
}
.waveform {
display: flex;
align-items: center;
justify-content: space-around;
height: 100%;
padding: 0 5px;
}
.wave-bar {
width: 3px;
background: #90caf9;
border-radius: 2px;
transition: all 0.1s;
}
.wave-bar.active {
background: #1976d2;
}
.progress-overlay {
position: absolute;
top: 0;
left: 0;
height: 100%;
background: rgba(25, 118, 210, 0.1);
width: 0%;
transition: width 0.1s linear;
}
.time-info {
display: flex;
justify-content: space-between;
margin-top: 4px;
font-size: 10px;
color: #666;
}
</style>
</head>
<body>
<div class="desktop">
<div class="window" id="window">
<div class="title-bar" id="titleBar">
<span class="title-text">Périphérique Externe</span>
<button class="close-btn" onclick="closeWindow()">×</button>
</div>
<div class="tab-bar">
<div class="tab">Périphérique USB</div>
</div>
<div class="content">
<div class="usb-box">
<div class="usb-header">
<div class="usb-icon">
<img src="files/pngegg.png" alt="USB" width="32" height="32">
</div>
<div class="usb-name">CLÉ USB (DGSI Confidentiel)</div>
<button class="eject-btn">Éjecter...</button>
</div>
</div>
<div class="recordings-box">
<div class="recordings-title">Écoutes téléphoniques Alex Cerruti (+33 6 39 98 11 25)</div>
<!-- Recording 1 -->
<div class="recording-item">
<div class="play-icon" onclick="togglePlay(0)"></div>
<div class="recording-info">
<div class="recording-name">ENREGISTREMENT_AUDIO_06/08/2025_07:30</div>
<div class="recording-duration">5 secondes (00:05)</div>
<div class="player-container" id="player-0">
<div class="progress-bar" onclick="seek(event, 0)">
<div class="progress-overlay" id="progress-0"></div>
<div class="waveform" id="waveform-0"></div>
</div>
<div class="time-info">
<span id="current-time-0">00:00</span>
<span id="total-time-0">00:05</span>
</div>
</div>
</div>
</div>
<!-- Recording 2 -->
<div class="recording-item">
<div class="play-icon" onclick="togglePlay(1)"></div>
<div class="recording-info">
<div class="recording-name">ENREGISTREMENT_AUDIO_06/08/2025_17:47</div>
<div class="recording-duration">7 secondes (00:07)</div>
<div class="player-container" id="player-1">
<div class="progress-bar" onclick="seek(event, 1)">
<div class="progress-overlay" id="progress-1"></div>
<div class="waveform" id="waveform-1"></div>
</div>
<div class="time-info">
<span id="current-time-1">00:00</span>
<span id="total-time-1">00:07</span>
</div>
</div>
</div>
</div>
<!-- Recording 3 -->
<div class="recording-item">
<div class="play-icon" onclick="togglePlay(2)"></div>
<div class="recording-info">
<div class="recording-name">ENREGISTREMENT_AUDIO_07/08/2025_14:57</div>
<div class="recording-duration">17 secondes (00:17)</div>
<div class="player-container" id="player-2">
<div class="progress-bar" onclick="seek(event, 2)">
<div class="progress-overlay" id="progress-2"></div>
<div class="waveform" id="waveform-2"></div>
</div>
<div class="time-info">
<span id="current-time-2">00:00</span>
<span id="total-time-2">00:17</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
const durations = [5, 7, 17]; // Durées en secondes
const players = [null, null, null];
const intervals = [null, null, null];
// Rendre la fenêtre déplaçable
let isDragging = false;
let currentX;
let currentY;
let initialX;
let initialY;
let xOffset = 0;
let yOffset = 0;
const windowElement = document.getElementById('window');
const titleBar = document.getElementById('titleBar');
titleBar.addEventListener('mousedown', dragStart);
document.addEventListener('mousemove', drag);
document.addEventListener('mouseup', dragEnd);
function dragStart(e) {
if (e.target === titleBar || e.target.classList.contains('title-text')) {
initialX = e.clientX - xOffset;
initialY = e.clientY - yOffset;
isDragging = true;
}
}
function drag(e) {
if (isDragging) {
e.preventDefault();
currentX = e.clientX - initialX;
currentY = e.clientY - initialY;
xOffset = currentX;
yOffset = currentY;
setTranslate(currentX, currentY, windowElement);
}
}
function dragEnd(e) {
isDragging = false;
}
function setTranslate(xPos, yPos, el) {
el.style.transform = `translate(calc(-50% + ${xPos}px), calc(-50% + ${yPos}px))`;
}
// Générer les waveforms
function generateWaveform(index) {
const waveform = document.getElementById(`waveform-${index}`);
const barCount = 50;
for (let i = 0; i < barCount; i++) {
const bar = document.createElement('div');
bar.className = 'wave-bar';
const height = Math.random() * 40 + 10;
bar.style.height = height + 'px';
waveform.appendChild(bar);
}
}
// Initialiser les waveforms
for (let i = 0; i < 3; i++) {
generateWaveform(i);
}
// Ouvrir/fermer la fenêtre
document.addEventListener('keydown', function(e) {
if (e.code === 'Space') {
e.preventDefault();
const windowElement = document.getElementById('window');
if (!windowElement.classList.contains('active')) {
windowElement.classList.add('active');
}
}
});
function closeWindow() {
const windowElement = document.getElementById('window');
windowElement.classList.remove('active');
// Arrêter tous les lecteurs
for (let i = 0; i < 3; i++) {
if (players[i]) {
stopPlayer(i);
}
}
}
function togglePlay(index) {
const player = document.getElementById(`player-${index}`);
const playIcon = player.previousElementSibling.previousElementSibling;
if (!players[index]) {
// Démarrer la lecture
players[index] = {
currentTime: 0,
duration: durations[index],
playing: true
};
player.classList.add('active');
playIcon.classList.add('playing');
intervals[index] = setInterval(() => {
updateProgress(index);
}, 100);
} else if (players[index].playing) {
// Pause
players[index].playing = false;
playIcon.classList.remove('playing');
clearInterval(intervals[index]);
} else {
// Reprendre
players[index].playing = true;
playIcon.classList.add('playing');
intervals[index] = setInterval(() => {
updateProgress(index);
}, 100);
}
}
function stopPlayer(index) {
if (players[index]) {
clearInterval(intervals[index]);
players[index] = null;
const player = document.getElementById(`player-${index}`);
const playIcon = player.previousElementSibling.previousElementSibling;
const progress = document.getElementById(`progress-${index}`);
const currentTime = document.getElementById(`current-time-${index}`);
player.classList.remove('active');
playIcon.classList.remove('playing');
progress.style.width = '0%';
currentTime.textContent = '00:00';
// Réinitialiser les barres de waveform
const bars = document.querySelectorAll(`#waveform-${index} .wave-bar`);
bars.forEach(bar => bar.classList.remove('active'));
}
}
function updateProgress(index) {
if (!players[index]) return;
players[index].currentTime += 0.1;
if (players[index].currentTime >= players[index].duration) {
stopPlayer(index);
return;
}
const percentage = (players[index].currentTime / players[index].duration) * 100;
const progress = document.getElementById(`progress-${index}`);
const currentTime = document.getElementById(`current-time-${index}`);
progress.style.width = percentage + '%';
currentTime.textContent = formatTime(players[index].currentTime);
// Mettre à jour les barres de waveform
const bars = document.querySelectorAll(`#waveform-${index} .wave-bar`);
const activeIndex = Math.floor((percentage / 100) * bars.length);
bars.forEach((bar, i) => {
if (i <= activeIndex) {
bar.classList.add('active');
} else {
bar.classList.remove('active');
}
});
}
function seek(event, index) {
if (!players[index]) return;
const progressBar = event.currentTarget;
const rect = progressBar.getBoundingClientRect();
const x = event.clientX - rect.left;
const percentage = x / rect.width;
players[index].currentTime = percentage * players[index].duration;
updateProgress(index);
}
function formatTime(seconds) {
const mins = Math.floor(seconds / 60);
const secs = Math.floor(seconds % 60);
return `${String(mins).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
}
</script>
</body>
</html>
function requestFullScreen() {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
}
function exitFullScreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
}
document.addEventListener('keyup', function(event) {
if (event.key == '1') {
location.reload();
return;
}
if (event.key == '2') {
requestFullScreen();
return;
}
})
function iOS() {
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod'
].includes(navigator.platform)
// iPad on iOS 13 detection
|| (navigator.userAgent.includes("Mac") && "ontouchend" in document)
}
document.addEventListener('DOMContentLoaded', function(event) {
console.log('Enable fullscreen');
// test ios
if (iOS()) { return; }
var b = document.createElement('input');
b.setAttribute('type', 'button');
b.setAttribute('value', 'Plein-Ecran');
b.style.position = 'absolute';
b.style['z-index'] = 100000000;
b.style['font-size'] = '1.3em';
b.style.top = '20vh';
b.style.right = '10vw';
b.style.width = '33%';
b.style.position = 'fixed';
b.style['background-color'] = '#4CAF50';
b.style['border'] = 'none';
b.style['color'] = '#F0F0F0';
b.style['border-radius'] = '5vw';
b.style['padding'] = '2vw';
b.onclick = function (e) {
requestFullScreen();
}
document.body.appendChild(b);
var r = document.createElement('input');
r.setAttribute('type', 'button');
r.setAttribute('value', 'Recharger');
r.style.position = 'absolute';
r.style['z-index'] = 100000000;
r.style['font-size'] = '1.3em';
r.style.top = '20vh';
r.style.left = '10vw';
r.style.width = '33%';
r.style.position = 'fixed';
r.style['background-color'] = '#f44336';
r.style['border'] = 'none';
r.style['color'] = '#F0F0F0';
r.style['border-radius'] = '5vw';
r.style['padding'] = '2vw';
r.onclick = function (e) {
location.reload();
}
document.body.appendChild(r);
function check_visibility() {
var isFullScreen = document.webkitIsFullScreen || document.fullscreen || document.mozFullScreen /*|| (1 >= outerHeight - innerHeight)*/;
//isFullScreen = isFullScreen || !window.screenTop || !window.screenY;
//isFullScreen = isFullScreen || Math.abs(screen.width - window.innerWidth) < 10;
//console.log('oo', document.fullscreen)
// var isFullScreen = !( Math.abs(screen.width - window.innerWidth) > 10 || window.screenTop || window.screenY );
//console.log(isFullScreen, screen.width, window.innerWidth);
if (isFullScreen) {
b.style.display = 'none';
r.style.display = 'none';
//c.style.display = 'none';
} else {
b.style.display = 'inline-block';
r.style.display = 'inline-block';
//c.style.display = 'inline-block';
}
}
check_visibility();
document.addEventListener('webkitfullscreenchange', function(e) {
check_visibility(); }, false);
document.addEventListener('mozfullscreenchange', function(e) {
check_visibility(); }, false);
document.addEventListener('fullscreenchange', function(e) {
check_visibility(); }, false);
document.addEventListener('msfullscreenchange', function () {
check_visibility(); }, false);
window.addEventListener('resize', function(){
check_visibility();
});
});
function requestFullScreen() {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
}
function exitFullScreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
}
document.addEventListener('keyup', function(event) {
if (event.key == '1') {
location.reload();
return;
}
if (event.key == '2') {
requestFullScreen();
return;
}
})
function iOS() {
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod'
].includes(navigator.platform)
// iPad on iOS 13 detection
|| (navigator.userAgent.includes("Mac") && "ontouchend" in document)
}
document.addEventListener('DOMContentLoaded', function(event) {
console.log('Enable fullscreen');
// test ios
if (iOS()) { return; }
var b = document.createElement('input');
b.setAttribute('type', 'button');
b.setAttribute('value', 'Plein-Ecran');
b.style.position = 'absolute';
b.style['z-index'] = 100000000;
b.style['font-size'] = '1.3em';
b.style.top = '20vh';
b.style.right = '10vw';
b.style.width = '33%';
b.style.position = 'fixed';
b.style['background-color'] = '#4CAF50';
b.style['border'] = 'none';
b.style['color'] = '#F0F0F0';
b.style['border-radius'] = '5vw';
b.style['padding'] = '2vw';
b.onclick = function (e) {
requestFullScreen();
}
document.body.appendChild(b);
var r = document.createElement('input');
r.setAttribute('type', 'button');
r.setAttribute('value', 'Recharger');
r.style.position = 'absolute';
r.style['z-index'] = 100000000;
r.style['font-size'] = '1.3em';
r.style.top = '20vh';
r.style.left = '10vw';
r.style.width = '33%';
r.style.position = 'fixed';
r.style['background-color'] = '#f44336';
r.style['border'] = 'none';
r.style['color'] = '#F0F0F0';
r.style['border-radius'] = '5vw';
r.style['padding'] = '2vw';
r.onclick = function (e) {
location.reload();
}
document.body.appendChild(r);
function check_visibility() {
var isFullScreen = document.webkitIsFullScreen || document.fullscreen || document.mozFullScreen /*|| (1 >= outerHeight - innerHeight)*/;
//isFullScreen = isFullScreen || !window.screenTop || !window.screenY;
//isFullScreen = isFullScreen || Math.abs(screen.width - window.innerWidth) < 10;
//console.log('oo', document.fullscreen)
// var isFullScreen = !( Math.abs(screen.width - window.innerWidth) > 10 || window.screenTop || window.screenY );
//console.log(isFullScreen, screen.width, window.innerWidth);
if (isFullScreen) {
b.style.display = 'none';
r.style.display = 'none';
//c.style.display = 'none';
} else {
b.style.display = 'inline-block';
r.style.display = 'inline-block';
//c.style.display = 'inline-block';
}
}
check_visibility();
document.addEventListener('webkitfullscreenchange', function(e) {
check_visibility(); }, false);
document.addEventListener('mozfullscreenchange', function(e) {
check_visibility(); }, false);
document.addEventListener('fullscreenchange', function(e) {
check_visibility(); }, false);
document.addEventListener('msfullscreenchange', function () {
check_visibility(); }, false);
window.addEventListener('resize', function(){
check_visibility();
});
});