RestockPilot: The Café Restocking Agent That Can't Overspend
Official PayPal AI Hackathon 2026 Video Media Subsystem incorporating Noembed oEmbed metadata resolution, YouTube Privacy-Enhanced Mode (youtube-nocookie.com), and graceful restriction fallback boundaries.
Reverse-Engineered 3-Tier Pipeline
Extracts the video ID (v=JPJOOVRnrSQ) from watch, shortlink, and embed URLs.
Asynchronously fetches canonical metadata strictly over HTTPS from noembed.com/embed to avoid Chrome mixed content blocks.
Constructs sandboxed iframe pointing to youtube-nocookie.com with timestamp seek, captions, and fallback safeguards.
Direct automated retrieval of youtube.com/watch endpoints blocks headless bots with HTTP 429/403 or blank JS hydration shells. As documented in the Blueprint, client applications must never parse raw YouTube HTML directly; they must resolve metadata through the normalized Noembed oEmbed protocol and playback through YouTube Privacy-Enhanced Embeds.
Compliance & Best Practices
- Privacy Mode: Prevents third-party cookie tracking prior to user playback via
youtube-nocookie.com. - Autoplay Policy: Autoplayed embedded videos do not artificially increment YouTube view counts.
- Child-Directed Sites: Self-designation via Google developer tools is mandatory if serving children under COPPA.
- Firewall Allowlist: Enterprise corporate networks must allowlist
youtube.com,youtube-nocookie.com, andnoembed.com.
PayPal Hackathon Alignment
This media module powers the video submission and demonstration of RestockPilot for the PayPal AI Hackathon 2026, showcasing a café restocking agent with deterministic spending policy and human-in-the-loop PayPal approval.
Code Integration Contract
Easily embed in any React/Next.js page:
<VideoPlaylistPlayer
url="https://youtube.com/..."
startTimeSeconds={30}
captionLanguage="en"
showControls={true}
/>