Curtain Call · README
Open the application Open the guideCurtain Call: Final Application
CSC4130 Final Project · Undergraduate Team 6 · Chenkai Li, Hehan Li, Rukai Xiao, Jianheng Xu, Shangheng Zheng
Curtain Call is a mobile web application for watching short videos before sleep. You choose how long to watch tonight. When that time arrives, the clip that is playing may finish, the feed pauses, and you decide whether to end the session or add five more minutes.
1. Access and setup
Online (recommended for reviewers). Open https://xmq168-curtain-call.static.hf.space/ in a current browser on a phone or a computer. Nothing needs to be installed, and no account is required.
| Page | Online address |
|---|---|
| Application | https://xmq168-curtain-call.static.hf.space/ |
| Guide with rehearsal links | https://xmq168-curtain-call.static.hf.space/guide.html |
| This README as a web page | https://xmq168-curtain-call.static.hf.space/readme.html |
Requirements. A current browser with JavaScript and MP4 (H.264) video: Chrome, Edge, Safari or Firefox. All clips, images and replies are part of the application.
Offline from the submission. The CurtainCall folder of the submitted ZIP contains the same application.
- On a computer: install Node.js 18 or later (no npm packages are needed), open a terminal in the
CurtainCallfolder, the folder that containsserve.cjs, and runnode serve.cjs. Open http://127.0.0.1:8000/ and keep the terminal open while you use the application; Ctrl+C stops it. If port 8000 is in use, runCURTAIN_PORT=8080 node serve.cjson macOS or Linux, or$env:CURTAIN_PORT=8080; node serve.cjsin Windows PowerShell. - On a phone in the same Wi-Fi network: run
node serve.cjs --lanon the computer and open the Same Wi-Fi phone address that the terminal prints. If the phone cannot reach it, the network probably blocks traffic between devices; connect both devices to a personal hotspot instead. - Without Node.js: open
app/index.htmldirectly in Chrome or Edge. The application runs offline in the same way; only seeking inside a clip may be limited in some browsers.
2. Target device
- Primary: a touch smartphone held in portrait orientation. The interface is designed for 390 × 844 and works from 320 × 568 and in landscape orientation.
- Also supported for review: a desktop browser. The application appears in a phone-sized frame, and the mouse and keyboard replace touch.
- Needs: JavaScript, browser storage for preferences and progress, and MP4 (H.264) playback. Sound is optional.
3. Context of use
- Who: people who watch short videos in bed to relax, mostly university students in a dormitory or at home, who already want to stop at a time of their own choosing.
- When and where: at night, lying in bed with a phone, often tired and with little attention to spare.
- What they can accomplish: choose tonight's viewing time; watch clips and, if they like, ask the robot companion about a clip; at the chosen time let the current clip finish, then end the session or confirm five more minutes; keep a usual plan that tonight's choice does not overwrite.
4. Supported task flows
| Task | Steps | Expected result |
|---|---|---|
| T1 Finish on time | Choose 15 min and tap Start. Watch. When the reminder appears, let the clip finish, then choose End this session. | Playback and the timer stop. The completion screen says so; View session details shows the time spent. |
| T2 Chat and continue | Choose 20 min and start. Tap Want to talk about this clip?, pick a question or type one, then Close chat. At time-up choose 5 more minutes, check 20 + 5 = 25, and Confirm · 25 min total. At the next time-up, end the session. | Cancelling keeps 20 minutes. Confirming keeps the same clip, the conversation and any unsent text. The summary shows one extension. |
| T3 Keep a usual plan | Open Reminders (bottom bar or gear icon). Choose 30 min, Gentle and Brief, check the preview, and tap Save as my usual plan. Back on Tonight's plan, choose 20 min, start, and end the session. | The card Your usual plan still reads 30 min · gentle · brief, and the summary confirms that tonight's 20 minutes did not change it. |
Other paths: End (top right) finishes a session early after a confirmation. If you reach the last of the 69 clips before your time is up, a card shows the remaining time and offers Replay this collection or End this session.
5. Operating instructions
Screens. The bottom bar switches between Tonight's plan (start screen) and Reminders (usual plan). During a session you see the video feed; at time-up, a reminder over the clip and then the decision screen; after ending, the completion screen.
| Action | Phone | Computer |
|---|---|---|
| Choose tonight's duration | Tap 15, 20 or 30 min, drag the ruler, or type “20 minutes” or “half an hour” and tap ↑ | Click, or type in the field and press Enter |
| Start the session | Tap Start · N min | Click it, or Tab to it and press Enter |
| Next or previous clip | Swipe up or down, or tap Next | Scroll over the video, press ↓ or ↑, or click Next |
| Pause or play | Tap the video | Click the video, or Tab to it and press Enter |
| Move within a clip | Drag the progress bar | Drag the progress bar |
| Talk about a clip | Tap Want to talk about this clip?, then a suggested question or your own text (up to 160 characters) | Same, with the keyboard |
| See the session or end early | Tap the time chip (top left) or End (top right) | Click them |
| Like or comment | Buttons on the right of the video | Same |
| Close a sheet | ×, Close chat or Got it, drag the sheet down by its handle, or tap outside it | Same, or press Escape |
Before time-up. In the last three minutes of the plan, or the last fifth of a shorter plan, the feed moves on to calm clips, those with little motion and quiet sound. The line under the timer then reads Calmer clips from here.
What happens at time-up
- A reminder appears over the playing clip with End now and 5 more minutes. The clip may finish, and no new clip starts. Show choices skips the rest of the clip.
- When the clip ends, the decision screen offers End this session and 5 more minutes. View time breakdown shows the plan and any time used to finish the clip.
- 5 more minutes shows the current, extra and total minutes. Nothing changes until you tap Confirm; Cancel extension keeps the plan.
- End this session stops playback and the timer.
Good to know
- The timer counts real time, including chat, settings, pauses and time spent in another app or tab.
- Refreshing or reopening the page restores the session with the clip paused. If the plan ran out more than 30 minutes before you return, a new plan starts instead.
- Progress and preferences stay in this browser only, so each phone or browser keeps its own session.
- If a clip cannot load, choose Retry this clip. Your plan keeps running.
- Some browsers start video only after a tap. If playback does not start, tap the video.
- How timing and reminders work on the start screen repeats these rules inside the application.
6. Rehearsal mode for reviewers and the class demonstration
Real sessions last 15 to 30 minutes. To try time-up without waiting, open the guide and choose a rehearsal task. Rehearsal sessions add demonstration controls (on a phone, tap Demo tools at the top):
- Fast-forward 5 min simulates five minutes passing. It does not extend your plan.
- Jump to time-up moves the clock to the end of the plan.
- Reset this task starts the rehearsal again after a confirmation.
Rehearsal sessions are stored separately from everyday use, so they never change a real session. Direct links:
- T1: https://xmq168-curtain-call.static.hf.space/index.html?task=T1&review=1&demo=1
- T2: https://xmq168-curtain-call.static.hf.space/index.html?task=T2&review=1&demo=1
- T2 in the presentation view, used in the class demonstration: https://xmq168-curtain-call.static.hf.space/index.html?task=T2&review=1&demo=1&stage=1. It looks like the everyday application, with the bedroom and curtain backdrop on a wide screen, and keeps the demonstration controls in a small panel at the bottom left.
- T3: https://xmq168-curtain-call.static.hf.space/index.html?task=T3&review=1&demo=1
- Companion ending: https://xmq168-curtain-call.static.hf.space/index.html?task=T1&review=1&demo=1&ending=companion
- Soft-light ending: https://xmq168-curtain-call.static.hf.space/index.html?task=T1&review=1&demo=1&ending=light
With the local server, the same links start with http://127.0.0.1:8000/ instead.
7. Simulated content and limits
- The feed contains 69 local clips with a total length of 31 minutes 2 seconds: ten short clips from our prototype and 59 excerpts of public-domain National Park Service footage. The guide lists all sources. Nineteen clips are marked calm: their average motion and average loudness, measured with FFmpeg, are both below the median of the collection.
- The robot's replies and other viewers' comments are scripted. Comments you add stay in this browser.
- There are no accounts, no server-side data and no notifications outside the page. Reminders appear only while the page is open, and device sleep can pause video.
8. Files
| Path | Contents |
|---|---|
app/ |
The application: index.html, guide.html, readme.html (this README as a web page), park-films.js, endings.css and media/ |
serve.cjs |
Local server using Node.js built-in modules only; supports seeking in video |
tests/ |
Automated checks for developers, run against the local server with Playwright installed: node tests/flows.cjs http://127.0.0.1:8000/ (ten task flows) and node tests/mobile.cjs http://127.0.0.1:8000/ (25 phone-viewport accessibility checks, also needs axe-core) |