MarkTheArtist commited on
Commit
628c548
·
verified ·
1 Parent(s): 6bd1368

I'd like it to run full screen if possible. Once it starts I walk the dialog box that shows you too.Select files.I'd like that to go away until the screen is pressed and held for more than one second - Follow Up Deployment

Browse files
Files changed (2) hide show
  1. index.html +32 -2
  2. prompts.txt +2 -1
index.html CHANGED
@@ -39,6 +39,11 @@
39
  gap: 15px;
40
  align-items: center;
41
  z-index: 10;
 
 
 
 
 
42
  }
43
  .file-input {
44
  display: none;
@@ -112,8 +117,25 @@
112
  }
113
  });
114
 
115
- clickArea.addEventListener('click', () => {
116
- if (files.length > 0) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  currentFileIndex = (currentFileIndex + 1) % files.length;
118
  playFile(currentFileIndex);
119
  }
@@ -132,6 +154,14 @@
132
  console.error('Autoplay prevented:', e);
133
  });
134
  status.textContent = `Playing ${index + 1}/${files.length}: ${file.name}`;
 
 
 
 
 
 
 
 
135
  });
136
 
137
  videoPlayer.addEventListener('ended', () => {
 
39
  gap: 15px;
40
  align-items: center;
41
  z-index: 10;
42
+ transition: opacity 0.3s ease;
43
+ }
44
+ .controls.hidden {
45
+ opacity: 0;
46
+ pointer-events: none;
47
  }
48
  .file-input {
49
  display: none;
 
117
  }
118
  });
119
 
120
+ let longPressTimer;
121
+ const controls = document.querySelector('.controls');
122
+
123
+ clickArea.addEventListener('mousedown', () => {
124
+ longPressTimer = setTimeout(() => {
125
+ controls.classList.toggle('hidden');
126
+ }, 1000);
127
+ });
128
+
129
+ clickArea.addEventListener('mouseup', () => {
130
+ clearTimeout(longPressTimer);
131
+ });
132
+
133
+ clickArea.addEventListener('mouseleave', () => {
134
+ clearTimeout(longPressTimer);
135
+ });
136
+
137
+ clickArea.addEventListener('click', (e) => {
138
+ if (e.target === clickArea && files.length > 0) {
139
  currentFileIndex = (currentFileIndex + 1) % files.length;
140
  playFile(currentFileIndex);
141
  }
 
154
  console.error('Autoplay prevented:', e);
155
  });
156
  status.textContent = `Playing ${index + 1}/${files.length}: ${file.name}`;
157
+ controls.classList.add('hidden');
158
+
159
+ // Try to enter fullscreen automatically
160
+ if (videoPlayer.requestFullscreen) {
161
+ videoPlayer.requestFullscreen().catch(e => {
162
+ console.log('Fullscreen error:', e);
163
+ });
164
+ }
165
  });
166
 
167
  videoPlayer.addEventListener('ended', () => {
prompts.txt CHANGED
@@ -1 +1,2 @@
1
- Create a site that will allow you to select multiple files and then play each mpeg file over and over without stopping, when you click on screen it will go to the next file. Totally client processing.
 
 
1
+ Create a site that will allow you to select multiple files and then play each mpeg file over and over without stopping, when you click on screen it will go to the next file. Totally client processing.
2
+ I'd like it to run full screen if possible. Once it starts I walk the dialog box that shows you too.Select files.I'd like that to go away until the screen is pressed and held for more than one second