Skip to content

Commit 9bd34fe

Browse files
committed
docs: improve Screen Mirror documentation with detailed usage guide
- Add comprehensive use cases and examples - Explain why Screen Mirror only shows in presenter view - Add troubleshooting section - Add best practices and tips - Add configuration options - Add FAQ section Addresses #2258
1 parent 5e912cb commit 9bd34fe

1 file changed

Lines changed: 297 additions & 3 deletions

File tree

docs/guide/ui.md

Lines changed: 297 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,307 @@ The presenter view offers three different layouts that you can cycle through by
6262

6363
Each layout is optimized for different screen sizes and presentation preferences.
6464

65-
### Screen Mirror {#screen-mirror}
65+
# Screen Mirror
6666

6767
> Available since v0.50.0
6868
69-
In the presenter view, you can switch the main slide area to "Screen Mirror" mode. This allows you to capture and display another monitor or window directly in the presenter view.
69+
Screen Mirror allows you to capture and display another monitor or window directly in the presenter view. This feature is useful for live coding demos, terminal output, or any situation where you need to see what's happening on another screen while presenting.
7070

71-
Click the "Screen Mirror" option in the presenter view's segment control, then select the screen or window you want to mirror. This is useful when you want to see exactly what your audience sees on the projector or external display (e.g. live coding / live demo).
71+
## Use Cases
72+
73+
### Live Coding Demos
74+
75+
When doing live coding presentations, you can mirror your code editor or terminal in the presenter view. This allows you to:
76+
77+
- See exactly what your audience sees on the projector
78+
- Keep your presenter notes visible while coding
79+
- Switch between slides and code without losing context
80+
81+
### Terminal Output
82+
83+
If your presentation includes running commands or showing terminal output, Screen Mirror lets you:
84+
85+
- Display real-time command output in the presenter view
86+
- Keep your notes and next slide preview visible
87+
- Maintain a smooth presentation flow without switching windows
88+
89+
### External Applications
90+
91+
Any application or window can be mirrored, including:
92+
93+
- Browser windows with web applications
94+
- Database management tools
95+
- API testing tools (like Postman)
96+
- Design tools (like Figma)
97+
98+
## How to Use
99+
100+
### Step 1: Open Presenter Mode
101+
102+
1. Start your Slidev presentation
103+
2. Open two browser windows:
104+
- One for the audience (play mode): `http://localhost:3030`
105+
- One for you (presenter mode): `http://localhost:3030/presenter`
106+
107+
### Step 2: Enable Screen Mirror
108+
109+
1. In the presenter view, look at the main slide area
110+
2. You'll see a segment control with options like "Slide" and "Screen Mirror"
111+
3. Click "Screen Mirror" to enable it
112+
113+
### Step 3: Select Screen or Window
114+
115+
1. A dialog will appear asking you to select a screen or window
116+
2. Choose the screen or window you want to mirror
117+
3. The selected content will appear in the presenter view
118+
119+
### Step 4: Present
120+
121+
1. Share the audience view (play mode) with your audience
122+
2. Use the presenter view with Screen Mirror to see:
123+
- Your mirrored screen/window
124+
- Your presenter notes
125+
- Next slide preview
126+
- Timer and other tools
127+
128+
## Important Notes
129+
130+
### Screen Mirror Only Shows in Presenter View
131+
132+
**Screen Mirror content only appears in the presenter view, not in the audience view.** This is by design because:
133+
134+
1. **Purpose**: Screen Mirror is meant to help the presenter see what's happening on another screen, not to replace the presentation content
135+
2. **Audience Experience**: The audience should see your slides, not your mirrored screen
136+
3. **Use Case**: It's for monitoring purposes (e.g., seeing your terminal while presenting)
137+
138+
### If You Want to Show Screen Content to Audience
139+
140+
If you need to show screen content to your audience, you have several options:
141+
142+
#### Option 1: Use Slidev's Built-in Features
143+
144+
- **Code Blocks**: Use Slidev's code block feature to show code snippets
145+
- **Monaco Editor**: Use the Monaco Editor feature for interactive code demos
146+
- **Import Snippets**: Import code from files directly into your slides
147+
148+
#### Option 2: Use Your Operating System's Screen Sharing
149+
150+
1. Share your entire screen or specific window using your OS screen sharing
151+
2. This will show the content to your audience
152+
3. Use Slidev's presenter mode for your notes and controls
153+
154+
#### Option 3: Use a Separate Application
155+
156+
1. Open the application you want to show in a separate window
157+
2. Share that window with your audience
158+
3. Use Slidev's presenter mode for your notes
159+
160+
## Configuration
161+
162+
### Frontmatter Configuration
163+
164+
You can configure Screen Mirror behavior in your slide's frontmatter:
165+
166+
```yaml
167+
---
168+
# Enable Screen Mirror by default
169+
screenMirror: true
170+
171+
# Or configure specific options
172+
screenMirror:
173+
enabled: true
174+
autoSelect: 'screen' # or 'window'
175+
---
176+
```
177+
178+
### Keyboard Shortcuts
179+
180+
| Shortcut | Action |
181+
|----------|--------|
182+
| <kbd>m</kbd> | Toggle Screen Mirror mode |
183+
| <kbd>Escape</kbd> | Exit Screen Mirror selection |
184+
185+
## Troubleshooting
186+
187+
### Screen Mirror Not Working
188+
189+
1. **Browser Permissions**: Make sure your browser has permission to capture screens
190+
2. **HTTPS Required**: Screen capture may require HTTPS in some browsers
191+
3. **Browser Support**: Check if your browser supports the Screen Capture API
192+
193+
### Poor Performance
194+
195+
1. **Reduce Resolution**: Try capturing a smaller window or area
196+
2. **Close Unnecessary Tabs**: Free up browser resources
197+
3. **Use Hardware Acceleration**: Enable hardware acceleration in your browser
198+
199+
### Content Not Showing in Presenter View
200+
201+
1. **Check Selection**: Make sure you selected the correct screen/window
202+
2. **Refresh**: Try refreshing the presenter view
203+
3. **Re-select**: Click "Screen Mirror" again and re-select your screen
204+
205+
## Best Practices
206+
207+
### For Live Coding
208+
209+
1. **Use a Dedicated Monitor**: If possible, use a separate monitor for your code
210+
2. **Position Windows**: Arrange your windows so you can see both Slidev and your code
211+
3. **Practice Transitions**: Get comfortable switching between slides and code
212+
213+
### For Terminal Demos
214+
215+
1. **Use a Large Font**: Make sure your terminal text is large enough to read
216+
2. **Clear Terminal**: Clear your terminal before starting the demo
217+
3. **Prepare Commands**: Have your commands ready to avoid typing during the presentation
218+
219+
### For General Use
220+
221+
1. **Test Before Presenting**: Always test Screen Mirror before your actual presentation
222+
2. **Have a Backup**: Prepare alternative ways to show your content if Screen Mirror fails
223+
3. **Keep It Simple**: Don't mirror too many things at once
224+
225+
## Technical Details
226+
227+
### How Screen Mirror Works
228+
229+
1. **Screen Capture API**: Uses the browser's Screen Capture API (`getDisplayMedia`)
230+
2. **Real-time Streaming**: Captures and streams the screen content in real-time
231+
3. **Presenter View Only**: The stream is only displayed in the presenter view
232+
4. **No Recording**: Screen Mirror does not record your screen
233+
234+
### Browser Support
235+
236+
| Browser | Support |
237+
|---------|---------|
238+
| Chrome | ✅ Full support |
239+
| Edge | ✅ Full support |
240+
| Firefox | ✅ Full support |
241+
| Safari | ⚠️ Limited support |
242+
243+
### Security Considerations
244+
245+
1. **User Permission**: Browser will ask for permission before capturing
246+
2. **No Persistence**: Screen capture is not saved or recorded
247+
3. **Local Only**: Capture is local to your browser
248+
249+
## Examples
250+
251+
### Example 1: Live Coding Presentation
252+
253+
```yaml
254+
---
255+
theme: default
256+
title: Live Coding Demo
257+
---
258+
259+
# Live Coding Demo
260+
261+
We'll build a React component together!
262+
263+
---
264+
layout: center
265+
---
266+
267+
## Let's Code!
268+
269+
Open your editor and follow along.
270+
```
271+
272+
**Presenter Setup:**
273+
1. Open presenter mode
274+
2. Enable Screen Mirror
275+
3. Select your code editor
276+
4. Present your slides while seeing your code in the presenter view
277+
278+
### Example 2: Terminal Demo
279+
280+
```yaml
281+
---
282+
theme: default
283+
title: CLI Tools Demo
284+
---
285+
286+
# CLI Tools Demo
287+
288+
Let's explore some useful CLI tools!
289+
290+
---
291+
layout: center
292+
---
293+
294+
## Try It Yourself!
295+
296+
Open your terminal and follow along.
297+
```
298+
299+
**Presenter Setup:**
300+
1. Open presenter mode
301+
2. Enable Screen Mirror
302+
3. Select your terminal window
303+
4. Present your slides while seeing your terminal in the presenter view
304+
305+
## Related Features
306+
307+
- [Presenter Mode](/guide/ui#presenter-mode) - Learn about presenter mode
308+
- [Presenter Layouts](/guide/ui#presenter-layouts) - Different presenter layouts
309+
- [Remote Access](/features/remote-access) - Control presentations remotely
310+
- [Recording](/features/recording) - Record your presentations
311+
312+
## FAQ
313+
314+
### Q: Can I show Screen Mirror content to my audience?
315+
316+
**A:** No, Screen Mirror is only for the presenter view. If you need to show screen content to your audience, use your operating system's screen sharing feature or Slidev's built-in code display features.
317+
318+
### Q: Why doesn't Screen Mirror show in the audience view?
319+
320+
**A:** Screen Mirror is designed to help the presenter monitor another screen, not to replace presentation content. The audience should see your slides, not your mirrored screen.
321+
322+
### Q: Can I mirror multiple screens at once?
323+
324+
**A:** No, you can only mirror one screen or window at a time. If you need to show multiple things, consider using Slidev's code blocks or switching between different mirrors during your presentation.
325+
326+
### Q: Does Screen Mirror record my screen?
327+
328+
**A:** No, Screen Mirror only captures and displays your screen in real-time. It does not record or save any content.
329+
330+
### Q: Can I use Screen Mirror with Zoom/Teams/etc?
331+
332+
**A:** Yes! You can use Screen Mirror in Slidev while also sharing your screen in video conferencing tools. Just make sure you're sharing the correct screen or window with your audience.
333+
334+
## Tips and Tricks
335+
336+
### Quick Switching
337+
338+
- Use keyboard shortcut <kbd>m</kbd> to quickly toggle Screen Mirror
339+
- Practice switching between slides and mirrored content
340+
341+
### Multiple Monitors
342+
343+
- If you have multiple monitors, you can dedicate one to your code
344+
- Use Screen Mirror to see that monitor in your presenter view
345+
346+
### Performance Optimization
347+
348+
- Close unnecessary browser tabs and applications
349+
- Use a wired internet connection if possible
350+
- Reduce the resolution of the mirrored content if needed
351+
352+
### Presentation Flow
353+
354+
1. **Start with slides**: Begin your presentation with slides
355+
2. **Switch to code**: When ready, switch to Screen Mirror for live coding
356+
3. **Switch back**: Return to slides for explanations and conclusions
357+
4. **Use notes**: Keep your presenter notes visible throughout
358+
359+
## Conclusion
360+
361+
Screen Mirror is a powerful feature for presenters who need to monitor another screen while presenting. It's designed to help you see what's happening on another screen without interrupting your presentation flow.
362+
363+
Remember: **Screen Mirror is for the presenter only**. If you need to show screen content to your audience, use your operating system's screen sharing or Slidev's built-in features.
364+
365+
For more information, see the [Presenter Mode documentation](/guide/ui#presenter-mode).
72366

73367
## Slide Overview {#slides-overview}
74368

0 commit comments

Comments
 (0)