-
Notifications
You must be signed in to change notification settings - Fork 65
added jio hotstar handler #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added jio hotstar handler #70
Conversation
📝 WalkthroughWalkthroughAdds Jio Hotstar deep-link support and related plumbing: new platform handler and export, Platform type update, centralized handlers export used by generateDeepLink, URL utility addition, Twitch Android intent simplification, README and demo example updates. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller as Caller
participant Core as Core.generateDeepLink
participant Handlers as Handlers[] (jioHotstarHandler, ...)
participant Platform as Platform Targets (iOS / Android / Web)
Note over Caller,Core: Caller requests deep link resolution
Caller->>Core: generateDeepLink(input URL)
Core->>Handlers: iterate handlers -> call match(url)
alt handler matches (e.g., jioHotstarHandler)
Handlers->>Core: match true + build(result)
Core->>Platform: return platform-specific URIs + webUrl
Platform->>Caller: resolved deep link object
else no handler matches
Core->>Caller: return unknown handler result (webUrl fallback)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom Pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2026-01-02T21:27:30.363ZApplied to files:
🧬 Code graph analysis (1)packages/core/src/platforms/index.ts (3)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/core/src/utils.ts (1)
36-37: Consider adding input validation for robustness.The utility works for valid URL strings but lacks defensive checks. Consider validating the input to handle edge cases.
🔎 Suggested improvement with input validation
-export const getUrlWithoutProtocol = (url: string) => - url.replace(/^https?:\/\//, '').replace(/^www\./, ''); +export const getUrlWithoutProtocol = (url: string): string => { + if (!url || typeof url !== 'string') { + return ''; + } + return url.replace(/^https?:\/\//, '').replace(/^www\./, ''); +};
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
apps/demo/public/icons/jioHotstar.svgis excluded by!**/*.svg
📒 Files selected for processing (8)
apps/demo/index.htmlpackages/core/README.mdpackages/core/src/index.tspackages/core/src/platforms/index.tspackages/core/src/platforms/jioHotstar.tspackages/core/src/platforms/twitch.tspackages/core/src/types.tspackages/core/src/utils.ts
🧰 Additional context used
🧬 Code graph analysis (1)
packages/core/src/platforms/jioHotstar.ts (3)
packages/core/src/platforms/index.ts (1)
jioHotstarHandler(20-20)packages/core/src/types.ts (1)
DeepLinkHandler(28-45)packages/core/src/utils.ts (1)
getUrlWithoutProtocol(36-37)
🔇 Additional comments (8)
packages/core/src/types.ts (1)
13-13: LGTM!The addition of 'jioHotstar' to the Platform union type is correct and follows the existing naming pattern.
packages/core/src/platforms/twitch.ts (2)
2-2: LGTM!The import of the centralized
getUrlWithoutProtocolutility aligns with the broader refactoring to eliminate duplicate helper functions across platform handlers.
50-50: Verify the removal of browser_fallback_url is intentional.The Android intent no longer includes the
browser_fallback_urlparameter, which provided a graceful fallback when the Twitch app is not installed. This behavioral change could impact user experience by showing an error instead of opening the web URL when the app is unavailable.Please confirm this removal is intentional and document the rationale if it improves the user experience or resolves a specific issue.
packages/core/README.md (1)
192-193: Documentation correctly reflects the code change.The updated Twitch example is consistent with the removal of
browser_fallback_urlin the Twitch handler implementation.apps/demo/index.html (1)
104-112: The icon filejioHotstar.svgexists in the repository atapps/demo/public/icons/jioHotstar.svg, and the reference to/icons/jioHotstar.svgin the HTML is correctly configured for Vite's public directory serving. No action needed.packages/core/src/index.ts (1)
1-1: LGTM! Clean refactor to centralized handler management.The import refactoring and usage of the centralized
handlersarray improves maintainability without changing the core behavior ofgenerateDeepLink.Also applies to: 9-14
packages/core/src/platforms/index.ts (1)
6-6: LGTM! Proper integration of jioHotstarHandler.The new handler is correctly imported, exported, and included in the centralized
handlersarray with proper alphabetical ordering.Also applies to: 20-20, 32-45
packages/core/src/platforms/jioHotstar.ts (1)
10-29: Custom URI schemes for Hotstar are undocumented and not officially supported.The assumption that
/play/URLs should generatehotstar://play/{id}deep links is not substantiated. The codebase contains nohotstar://play/scheme, and web research confirms Hotstar/JioHotstar do not expose documented custom URI schemes.Broader concern: The implementation uses custom schemes (
hotstar://content/for iOS and intent URIs for Android) that are not officially documented by Hotstar. According to mobile app deep-linking best practices, Hotstar should be using Universal Links (iOS) and Android App Links (web URLs) instead. The custom schemes may be unreliable or unsupported.The Android package name
in.startv.hotstaris correct.Likely an incorrect or invalid review comment.
| ### Jio Hotstar | ||
|
|
||
| ```typescript | ||
| const result = generateDeepLink('https://www.hotstar.com/in/movies/sholay/1271513578/watch'); | ||
| // result.ios: 'hotstar://content/1271513578' | ||
| // result.android: 'intent://content/1271513578#Intent;scheme=hotstar;package=in.startv.hotstar;end' | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
official Android package name JioHotstar Hotstar app
💡 Result:
The official Android package name for the Hotstar / JioHotstar app is: in.startv.hotstar. [1][2]
Sources:
[1] APKMirror app listing (JioHotstar).
[2] APK4Fun package info (JioHotstar).
🌐 Web query:
official iOS URL scheme JioHotstar Hotstar app
💡 Result:
I couldn't find any public / officially documented iOS custom URL scheme for JioHotstar (Disney+ Hotstar). The app exposes standard web/universal links (hotstar.com / disneyplushotstar URLs) and there’s no published scheme like "hotstar://" in developer or App Store documentation. See the app listing and Apple guidance on app URL schemes / contacting developers. [1][2]
Sources:
- Disney+ Hotstar — App Store listing. [App Store]. [1]
- Apple Shortcuts / URL schemes guidance (recommends contacting app developers for their scheme). [2]
🏁 Script executed:
find . -name "*jioHotstar*" -o -name "*hotstar*" | grep -E "\.(ts|js|tsx|jsx)$"Repository: mdsaban/universal-app-opener
Length of output: 115
🏁 Script executed:
cat -n ./packages/core/src/platforms/jioHotstar.tsRepository: mdsaban/universal-app-opener
Length of output: 1217
The Android package name is correct, but the iOS URL scheme is undocumented and may not work.
The Android package in.startv.hotstar is confirmed as correct. However, the iOS scheme hotstar://content/{contentId} is not officially documented. Web search shows no published custom URL scheme in the App Store or developer documentation; the app supports only standard web/universal links (hotstar.com / disneyplushotstar URLs).
The implementation in jioHotstar.ts (lines 17, 25) generates this undocumented scheme, making the deep links potentially non-functional on iOS. Consider either:
- Verifying the iOS scheme works with actual devices/app
- Documenting this as an experimental/internal scheme
- Switching to universal links with
hotstar.comURLs instead
|
On which device you've tested it? Android or ios? are all the test URLs working fine? |
|
Also please resolve the conflicts |
tested on android fully working but dont know about ios. |
|
Why this PR was closed @kishandev2509 ? |
Pull Request: Add JioHotstar Deep Link Support
🎯 Summary
Adds
jiohotstarHandlerto convert JioHotstar web URLs to native app deep links, following the established Spotify/Netflix pattern.📋 Changes
New Handler:
jiohotstarHandlerSupported patterns:
Closes #69
Summary by CodeRabbit
New Features
Documentation
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.