Skip to content

Conversation

@kishandev2509
Copy link
Contributor

@kishandev2509 kishandev2509 commented Jan 2, 2026

Pull Request: Add JioHotstar Deep Link Support

🎯 Summary

Adds jiohotstarHandler to convert JioHotstar web URLs to native app deep links, following the established Spotify/Netflix pattern.

📋 Changes

New Handler: jiohotstarHandler

// Matches: https://www.hotstar.com/in/shows/1260019000
// Generates: 
//   iOS: hotstar://content/1260019000
//   Android: intent://1260019000#Intent;scheme=hotstar;package=in.startv.hotstar;...

Supported patterns:

✅ https://www.hotstar.com/in/shows/1260019000
✅ https://hotstar.com/movies/1270600012
✅ https://jiohotstar.com/play/abc123xyz  
✅ https://www.hotstar.com/live/cricket-match-456

Closes #69

Summary by CodeRabbit

  • New Features

    • Added support for deep links to Jio Hotstar content (shows, movies, live TV, sports).
  • Documentation

    • Updated README with Jio Hotstar examples and iOS/Android results.
    • Added a Jio Hotstar example card to the demo site.
    • Updated Twitch example documentation.
  • Improvements

    • Simplified Twitch Android deep link behavior (removed browser fallback).

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Jio Hotstar platform
packages/core/src/platforms/jioHotstar.ts, packages/core/src/platforms/index.ts, packages/core/src/types.ts
New jioHotstarHandler implementation; 'jioHotstar' added to Platform union; handler exported and included in exported handlers array.
Core handler wiring
packages/core/src/index.ts, packages/core/src/platforms/index.ts
generateDeepLink now iterates the centralized exported handlers array (imported) instead of a locally constructed handlers list.
URL utils & Twitch
packages/core/src/utils.ts, packages/core/src/platforms/twitch.ts
Added exported getUrlWithoutProtocol(url); Twitch handler now imports it and its Android intent string no longer includes browser_fallback_url.
Docs & demo
packages/core/README.md, apps/demo/index.html
README updated (Twitch example adjusted, Jio Hotstar example added); demo index adds a Jio Hotstar example link card.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mdsaban

Poem

🐰 I hopped through code with a tiny cheer,
New Hotstar links now draw so near,
Handlers in order, neat and spry,
URLs trimmed, intents fly high—
Tap the card, the show's right here! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main change: adding a jioHotstar handler. It is concise and specific enough to convey the primary modification.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #69: new jioHotstarHandler with regex pattern matching, content ID extraction from /shows/{id}, /movies/{id}, /play/{id}, support for multiple domains (hotstar.com, jiohotstar.com, startv.hotstar.com), iOS/Android deep link generation, and integration into the handler registry with fallback to web URL.
Out of Scope Changes check ✅ Passed Changes are focused: jioHotstar handler implementation, utility extraction (getUrlWithoutProtocol), Twitch handler refactoring to use the utility, and type/registry updates. The Twitch modification removes browser_fallback_url per the README example, aligning with the new handler pattern.

✏️ Tip: You can configure your own custom Pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b270fe and 3b2bb62.

📒 Files selected for processing (3)
  • packages/core/src/index.ts
  • packages/core/src/platforms/index.ts
  • packages/core/src/types.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/core/src/types.ts
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: tanmoyPaul12
Repo: mdsaban/universal-app-opener PR: 0
File: :0-0
Timestamp: 2026-01-02T21:27:30.363Z
Learning: In the mdsaban/universal-app-opener repository, the Platform type in packages/core/src/types.ts already includes 'github' and 'twitch' platforms in the main branch.
📚 Learning: 2026-01-02T21:27:30.363Z
Learnt from: tanmoyPaul12
Repo: mdsaban/universal-app-opener PR: 0
File: :0-0
Timestamp: 2026-01-02T21:27:30.363Z
Learning: In the mdsaban/universal-app-opener repository, the Platform type in packages/core/src/types.ts already includes 'github' and 'twitch' platforms in the main branch.

Applied to files:

  • packages/core/src/platforms/index.ts
  • packages/core/src/index.ts
🧬 Code graph analysis (1)
packages/core/src/platforms/index.ts (3)
packages/core/src/types.ts (1)
  • DeepLinkHandler (31-48)
packages/core/src/platforms/jioHotstar.ts (1)
  • jioHotstarHandler (4-30)
packages/core/src/platforms/youtube.ts (1)
  • youtubeHandler (31-65)
🔇 Additional comments (3)
packages/core/src/platforms/index.ts (1)

1-54: Well-structured centralization of handlers.

The refactor to export a centralized handlers array alongside individual handler exports is a clean approach. The jioHotstarHandler is correctly integrated, and unknownHandler is appropriately excluded from the array since it serves as the fallback in generateDeepLink.

packages/core/src/index.ts (2)

1-1: Clean import refactor.

Importing the pre-built handlers array from the platforms module reduces duplication and centralizes handler registration. This makes adding new platform handlers (like jioHotstarHandler) a single-point change in platforms/index.ts.


7-18: LGTM!

The generateDeepLink function correctly iterates over the centralized handlers array and falls back to unknownHandler when no match is found. The logic is unchanged from before, just cleaner with the new import structure.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 976d02e and 1ab3296.

⛔ Files ignored due to path filters (1)
  • apps/demo/public/icons/jioHotstar.svg is excluded by !**/*.svg
📒 Files selected for processing (8)
  • apps/demo/index.html
  • packages/core/README.md
  • packages/core/src/index.ts
  • packages/core/src/platforms/index.ts
  • packages/core/src/platforms/jioHotstar.ts
  • packages/core/src/platforms/twitch.ts
  • packages/core/src/types.ts
  • packages/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 getUrlWithoutProtocol utility 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_url parameter, 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_url in the Twitch handler implementation.

apps/demo/index.html (1)

104-112: The icon file jioHotstar.svg exists in the repository at apps/demo/public/icons/jioHotstar.svg, and the reference to /icons/jioHotstar.svg in 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 handlers array improves maintainability without changing the core behavior of generateDeepLink.

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 handlers array 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 generate hotstar://play/{id} deep links is not substantiated. The codebase contains no hotstar://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.hotstar is correct.

Likely an incorrect or invalid review comment.

Comment on lines 195 to 201
### 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'
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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:

  1. Disney+ Hotstar — App Store listing. [App Store]. [1]
  2. 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.ts

Repository: 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:

  1. Verifying the iOS scheme works with actual devices/app
  2. Documenting this as an experimental/internal scheme
  3. Switching to universal links with hotstar.com URLs instead

@mdsaban
Copy link
Owner

mdsaban commented Jan 7, 2026

On which device you've tested it? Android or ios? are all the test URLs working fine?

@mdsaban
Copy link
Owner

mdsaban commented Jan 7, 2026

Also please resolve the conflicts

@kishandev2509
Copy link
Contributor Author

On which device you've tested it? Android or ios? are all the test URLs working fine?

tested on android fully working but dont know about ios.

@kishandev2509 kishandev2509 deleted the jio-hotstar-handler-support branch January 7, 2026 14:24
@kishandev2509 kishandev2509 restored the jio-hotstar-handler-support branch January 7, 2026 14:24
@kishandev2509 kishandev2509 deleted the jio-hotstar-handler-support branch January 7, 2026 14:25
@mdsaban
Copy link
Owner

mdsaban commented Jan 7, 2026

Why this PR was closed @kishandev2509 ?

@kishandev2509
Copy link
Contributor Author

kishandev2509 commented Jan 7, 2026

I used wrong git commands and messed up the branch so i created another pr #80
@mdsaban you can check that pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Jio Hotstar Deeplink Support

2 participants