Mirror your iPad or iPhone to your Mac over AirPlay. Share the window in your lesson, freeze the page while you check the answers and draw on it from your Mac.
Download for Mac · Set up a lesson · Direct link measurements
TutorMirror runs on macOS 14 (Sonoma) or later, on Apple Silicon and Intel.
-
Download
TutorMirror.zipfrom the latest release. Unzip it and drag TutorMirror.app into Applications. -
Open TutorMirror. If macOS blocks the first launch, go to System Settings › Privacy & Security and click Open Anyway. You can also remove the quarantine attribute in Terminal.
xattr -dr com.apple.quarantine /Applications/TutorMirror.app
-
Click Allow if macOS asks for access to your local network. The welcome screen walks you through the first connection. To open it again, use Help › Welcome to TutorMirror.
- Open TutorMirror on your Mac.
- On your iPad or iPhone, open Control Center › Screen Mirroring and choose TutorMirror. If your device asks for a four-digit code, enter the one shown on the Mac.
- In Meet, Zoom or Teams, choose the TutorMirror window when you share your screen. The window has no title bar. The drawing toolbar, freeze and blank badges, lag meter and mouse pointer stay on your side of the call. Sharing your whole desktop can expose your menu bar, including the FROZEN status.
Click the mirror window to use these shortcuts. You can also freeze, blank and draw from the View menu or the TutorMirror icon in the menu bar.
| Action | Shortcut | What your student sees |
|---|---|---|
| Freeze the picture | F | The last frame. Press F again to go live. |
| Blank the window | B | A “One moment…” screen. Press B again to show the picture. |
| Draw on the picture | D | Your marks. Press X to clear them. |
| Zoom in or out | = / - |
A closer view of the page. Press 0 to reset. |
| Adjust the crop | ⌘K | The page with the selected edges removed. |
| Save or copy the board | ⌘S / ⌘C | The same shared picture. |
| Show the lag meter | ⌘L | The same shared picture. |
| Enter full screen | ⌃⌘F | The mirror fills the display, with black bars where needed. |
Freeze holds the frame while you flip pages, rotate, lock or disconnect the iPad. TutorMirror keeps decoding new frames while the iPad is sending, so the picture is ready when you go live again.
Drawing, zoom, crop and snapshots
- Drawing. Draw with the mouse or trackpad. The toolbar has five colours and lets you switch between pen (P), highlighter (H), arrow (A) and box (R). Delete undoes the last mark. Press D or Esc to stop drawing. The marks stay on the page until you clear them with X, so you can annotate a frozen frame and clear it before going live.
- Zoom. Pinch or hold ⌘ and scroll to zoom around the pointer. Drag or scroll with two fingers to pan. Double-click or press 0 to return to the whole page.
- Crop. In View › Crop, choose Hide Status Bar to remove the clock and battery, or Hide Status Bar and Toolbar to take off the top of the note app as well. Use Adjust Crop… (⌘K) to fit the crop to your app. TutorMirror remembers the crop.
- Snapshots. ⌘S saves the visible board, including drawings and crop, as a PNG in Pictures › TutorMirror. File › Show Snapshots Folder opens it. Use ⌘C to paste the same picture into the call chat.
Window layout and mouse pointer
Drag the picture to move the window when drawing and zoom are off. Drag an edge to resize it. Use ⌘W to close it or ⌘M to minimise it. The window keeps its size when the image changes shape, including when you rotate the iPad, enter Split View or use Goodnotes presentation mode. Full screen and window managers such as Rectangle can fill the display. View › Fit Window to Picture trims the black bars.
You can still click, draw and drag the window with the private pointer, including when Meet or Zoom is in front. The regular pointer returns over other windows. To use the pointer to point things out to a student, turn off View › Hide Pointer from Students.
The iPad can send video straight to the Mac over AWDL, the peer-to-peer Wi-Fi link used by AirDrop. Builds from the current source enable the direct link by default and still listen on your local network. If you previously chose a connection mode, TutorMirror keeps that setting.
In the 0.4.3 download, enable the direct link under View › Connect Directly to iPad (Beta). Use the same menu item to switch to Wi-Fi through your router. The app reopens when you switch.
The first direct connection uses a four-digit pairing code. TutorMirror shows it on the Mac in a window that screen sharing leaves out. It saves the receiver identity so the iPad can connect again without asking for a code.
I wrote in Goodnotes on the same iPad Pro and MacBook Pro, in the same room on the same day. With the direct link and router both available, median Wi-Fi delay per frame dropped from 22 ms to 2 ms, and the hitch I used to see about once a second went away.
| Router only (0.3.5) | Direct only | Router + direct | |
|---|---|---|---|
| Frames per second received / shown | 31 / 30 | 58 / 58 | 60 / 60 |
| Wi-Fi delay per frame, median / slowest 5% | 22 / 85 ms | 2 / 6.5 ms | 2 / 6.4 ms |
| Two-second stretches with a frame held up by at least 40 ms | 92% | 0% | 0% |
More about the test
| Router only (0.3.5) | Direct only | Router + direct | |
|---|---|---|---|
| Time measured while writing | 72 s | 44 s | 84 s |
| Video sent by the iPad | H.264 | H.265 | H.265 |
| Network part of the longest gap in each 2 s, median | 84 ms | 5 ms | 8 ms |
| Mac side (decode + on screen), median | 22 ms | 17 ms | 18 ms |
A typical stroke showed up about 25 ms sooner and the slowest frames showed up about 80 ms sooner. The iPad sent about twice as many frames. Some of that gain may come from its switch to H.265. I also pinged the router 10 times a second during each run. There were 1.3 to 1.4 pings over 30 ms per second with the direct link, compared with 2.1 through the router.
These were short runs without a video call. In one attempt, the iPad sat on
“Connecting…” for a minute or two before it connected. The iPad skips
clock-sync replies over the direct link, so the lag meter shows - for
Wi-Fi round trip. See docs/direct-link.md for the full
measurements and how they were taken. The video pipeline
explains the changes to decoding and drawing.
How the direct link works
Via the router, each frame goes from iPad to router to Mac. About once a second, macOS switches its Wi-Fi away from the router’s channel for AWDL traffic. A frame can wait up to 100 ms for it to switch back. Over AWDL, the iPad sends once, straight to the Mac.
- Bonjour advertises on AWDL with
kDNSServiceFlagsIncludeAWDL, and the listeners and sockets accept the connection usingincludePeerToPeerandSO_RECV_ANYIF. - iOS requires an on-screen pairing code over AWDL. TutorMirror implements AirPlay’s SRP-6a pairing and keeps the keys for the next connection.
- My first AWDL connection showed a blank picture because the iPad wanted to
send H.265 and TutorMirror only offered H.264. With the direct link on,
TutorMirror advertises
0x5A7FFEE6,0x400in place of0x5A7FFEE6,0x0(bit 42, ScreenMultiCodec), and the decoder accepts H.265.
I write on my iPad in Goodnotes and share it from my Mac in Meet. In the app I used before, the handwriting would show up noticeably behind the pen. The student could also see me flip to the answer key or set up the next question.
I forked VirtualMirror, rewrote how the video gets to the screen and added a way to freeze the page.
TutorMirror uses VirtualMirror's AirPlay connection code and a different video pipeline. Asking for 60 fps instead of 30 halves the time between frames when the iPad can keep up.
| TutorMirror | VirtualMirror | |
|---|---|---|
| Requested frame rate | 60 fps | 30 fps |
| Requested picture size | 2732×1536 (2048×1536 on a 4:3 iPad) | 1920×1080 (1440×1080 on a 4:3 iPad) |
| Colour conversion | Metal draws the raw YUV | Converts each frame to BGRA |
| Drawing | The decoder hands the newest frame straight to Metal | The decoder sends frames through the main thread and SwiftUI to a display layer |
| Network packets | Decrypted in place into the decoder's buffer | Copied several times per frame |
On my iPad Pro and MacBook Pro setup with a 120 Hz monitor and 5 GHz Wi-Fi, a frame takes about 3 to 4 ms to decode and about 16 ms to get on screen. The Wi-Fi round trip via the router is around 11 ms. A slow network can add more delay than decoding and drawing together. The direct link cuts the network part.
I tested with an iPad Pro running Goodnotes. Other iPads and iPhones use the same protocol, and the window fits portrait and landscape video. Goodnotes can put just the page on the Mac while keeping its toolbar on the iPad. TutorMirror advertises a wide display so Goodnotes keeps the sides of the page. The app keeps the Mac and its display awake while mirroring. Support is limited to screen mirroring. That excludes app casting from YouTube, audio-only AirPlay from Music and 4K video.
TutorMirror mirrors one device at a time. While an iPad is mirroring, other devices see “unable to connect” and you see a private notice about who tried. The same iPad can reconnect after a lock, rotation or Wi-Fi interruption. A different device can connect once the current one stops mirroring or goes quiet for a few seconds. View › Let Other Devices Take Over lets another device take over right away.
Use View › Rename Receiver… to change the name in the Screen Mirroring list. To hear audio from the mirrored iPad, turn on View › Play iPad Audio. If both receivers show up and you only use TutorMirror, you can turn off the Mac's built-in AirPlay Receiver under System Settings › General › AirDrop & Handoff.
Command-line settings
Reconnect the iPad after changing the stream settings. Reopen the app after changing the connection mode.
defaults write local.tutormirror maxFPS -int 120 # ask for 120 fps (most devices still send 60)
defaults write local.tutormirror streamWidth -int 3640 # ask for a bigger picture
defaults write local.tutormirror streamHeight -int 2048
defaults write local.tutormirror peerToPeer -int 2 # direct link only, never the router (reopen the app)
defaults delete local.tutormirror # back to defaultsCheck that Wi-Fi is on. For a connection through the router, put both devices on the same network. On the Mac, check that TutorMirror is allowed under System Settings › Privacy & Security › Local Network. Try View › Restart Receiver. If the direct connection sticks on “Connecting…”, give it a moment or select the receiver again. You can switch the direct link off in the View menu if it keeps giving you trouble.
With a router connection, AWDL can hold up frames for about 100 ms. Open the
lag meter with ⌘L. The delayed line compares each frame with the fastest
recent one. The hiccup line splits the longest gap between frames into
“iPad idle” and “held up”. In the router-only test, AWDL accounted for almost
all of the gap and added around 22 ms to a typical frame.
This command shows the lag figures for the last ten minutes.
log show --last 10m --predicate 'subsystem == "local.tutormirror" AND category == "Lag"'The direct link gets around this and leaves AirDrop, Handoff and Universal Clipboard available. If you're testing router-only mirroring and can go without those features for a while, you can disable AWDL.
sudo ifconfig awdl0 down # "up" brings it back, and so does a restartEthernet should also get around it, though I haven't tested that. If something breaks on your device, open an issue.
Since 0.2.0, TutorMirror checks GitHub for updates at startup and every few hours. When you accept an update, it replaces the app, keeps your settings and reopens. If it finds a new version during a lesson, it waits until you stop mirroring before asking. Use TutorMirror › Check for Updates… to check manually or use the same menu to turn automatic checks off.
If you're on 0.1.x, install the latest download once to get the updater. Click Allow if macOS asks for local network access again after an update. Releases 0.4.1 to 0.4.3 may show a one-time direct-link introduction. You can also open it from Help › What's New: Direct Link to iPad.
Install Xcode or the Xcode command line tools.
git clone https://github.com/t7acct/tutor-mirror.git
cd tutor-mirror
./build.sh --run./build.sh --installbuilds the app, copies it to Applications and opens it../build.sh --releasemakes a zip for both Apple Silicon and Intel../build.sh --test --runopens a separate “TutorMirror Test” app with its own settings, ports and receiver name. You can run it alongside the regular app../release.sh "notes"publishes the version inResources/Info.plistas a GitHub release that the in-app updater can find.
TutorMirror is based on
VirtualMirror by Souris.CLOUD,
forked from commit
4d69798.
VirtualMirror builds on UxPlay,
RPiPlay and
shairplay.
See ACKNOWLEDGMENTS-VirtualMirror.md for the full credits. TutorMirror
adapts the protocol code and replaces the video and app code in
Sources/Video and Sources/App.
GPL-3.0, the same licence as the projects it builds on. See LICENSE.
AirPlay, iPad and iPhone are Apple trademarks. Apple is unaffiliated with
TutorMirror.
