feat: add native Daily.co video calls for Cal Video deep links#66
Draft
feat: add native Daily.co video calls for Cal Video deep links#66
Conversation
- Install @daily-co/react-native-daily-js and peer dependencies - Add @daily-co/config-plugin-rn-daily-js Expo plugin - Create video-call screen with Daily.co CallObject API - Route Cal Video URLs (app.cal.com/video/*) to native video call - Add camera/microphone permission descriptions for iOS - Fall back to browser for non-Cal Video meeting URLs Co-Authored-By: peer@cal.com <peer@cal.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Add iOS universal links (associatedDomains: applinks:app.cal.com) - Add Android intent filters for https://app.cal.com/video/* - Handle incoming deep links in root layout (cold + warm start) - Fix Daily.co subdomain to meetco.daily.co Co-Authored-By: peer@cal.com <peer@cal.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
…mapping The Cal Video URL path (app.cal.com/video/<id>) contains a booking UID, not a Daily room name. Updated the flow: - In-app: meetingUrl from API is already a meetco.daily.co URL, pass directly - Deep links: extract booking UID, pass to video-call screen which fetches the booking via API and resolves the actual Daily.co room URL - Added resolveDailyRoomUrl() async function for booking UID resolution - Removed incorrect getDailyRoomUrl() that mapped UID directly to Daily URL Co-Authored-By: peer@cal.com <peer@cal.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a booking's meeting URL is a Cal Video link, the app now opens a native video call screen powered by Daily.co's React Native SDK instead of opening the browser. The app also registers as a handler for
app.cal.com/video/*URLs via iOS Universal Links and Android App Links, so tapping these URLs outside the app (e.g. in Safari, Chrome, email) can open the native video call directly.Two URL resolution paths:
meetco.daily.co/<room-name>) in the booking'smeetingUrlfield. When tapping "Join", we detect this withisDailyRoomUrl()and pass it straight to the video-call screen.app.cal.com/video/<booking-uid>): The URL path contains a booking UID, not a Daily room name. The deep link handler extracts the UID and passes it as abookingUidparam. The video-call screen then fetches the booking viagetBookingByUid()and resolves the actual Daily.co room URL from the response.Changes:
@daily-co/react-native-daily-jsand peer dependencies (@daily-co/react-native-webrtc,react-native-background-timer,react-native-get-random-values)video-call.tsxscreen with Daily.co CallObject API (join, leave, mic/camera toggle, camera flip, participant video rendering). Accepts either a directurlparam or abookingUidparam with async resolution.utils/cal-video.tswith URL detection and resolution utilities:isDailyRoomUrl()— detects directmeetco.daily.coURLs (from API)isCalVideoWebUrl()/getBookingUidFromCalVideoUrl()— detects and parsesapp.cal.com/video/<uid>URLs (from deep links)resolveDailyRoomUrl()— async function that resolves either URL type to a joinable Daily.co room URL, fetching the booking via API when neededhandleJoinMeetingin all three booking detail screens to route Daily.co URLs to the native screen, falling back to browser for other URLs (Zoom, Google Meet, etc.)_layout.tsx@daily-co/config-plugin-rn-daily-jsExpo plugin and iOS camera/microphone permission descriptionsapplinks:app.cal.comin associated domains entitlement)intentFiltersforhttps://app.cal.com/video/*)getInitialURL) and warm start (addEventListener("url"))Review & Testing Checklist for Human
bookingUidto the video-call screen, which callsgetBookingByUid()to resolve the Daily.co room URL. Confirm the API returnsmeetingUrlwith ameetco.daily.coURL for Cal Video bookings. If the field name or shape differs, the resolution will silently fail and show "No meeting URL provided".RootLayoutContentwhich gates onisAuthenticated. If a deep link arrives when the user is logged out, verify behavior is acceptable (currently it would try to push/video-callbut the user would see the login screen, and the API call to resolve the booking UID would likely fail).https://app.cal.com/.well-known/apple-app-site-association(bundle IDcom.cal.companion, team IDADWKXDJV75). Android App Links needhttps://app.cal.com/.well-known/assetlinks.json. Without these, OS-level deep linking will not activate.@daily-co/react-native-webrtc@124.0.6-daily.1compatibility with Expo SDK 55 / React Native 0.83.1.Recommended test plan:
bun run mobile:iosorbun run mobile:androidhttps://app.cal.com/video/<booking-uid>→ should resolve the booking and join the call natively (requires server-side AASA/assetlinks)Notes
apple-app-site-associationandassetlinks.jsonfiles must be deployed toapp.cal.comfor OS-level deep linking to activate. The client-side configuration is complete in this PR.resolveDailyRoomUrl()incal-video.tsimportsgetBookingByUidfrom the services layer, making this utility file capable of async API calls. This is a deliberate design choice to keep the resolution logic centralized.Link to Devin session: https://app.devin.ai/sessions/780a107626be4877919ffc13b29b1ead
Requested by: @PeerRich