Hot Tub
Hot Tub is a video app for adding sources and opening videos. Protocol Launcher allows you to generate Hot Tub URL scheme links.
Usage
There are two ways to use this library:
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
- Full Import from the root package is convenient but includes all app modules.
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
Select Installation Method
Notes
This module only exposes the custom URL scheme actions listed in Hot Tub's official URL Schemes documentation: source, webview, search, profile, play, notification, and message.
The play helper accepts either video for API-based videos or url for web-based video players. For profiles, Hot Tub documents uploader and accepts creator as an alias on the custom scheme.
The same official page also documents https://hottubapp.io/add/{domain} for source redirects and https://<host>/app?... for universal-link handoff. Handoff helpers require baseUrl because Hot Tub says the host must serve /app and have the associated domain configured.
Add Source
import { addSource } from 'protocol-launcher/hot-tub'
const url = addSource({
url: 'https://api.myvideosite.com',
})Add Source Redirect
import { addSourceRedirect } from 'protocol-launcher/hot-tub'
const url = addSourceRedirect({
domain: 'api.myvideosite.com',
})Open Web Page
import { openWebView } from 'protocol-launcher/hot-tub'
const url = openWebView({
url: 'https://help.example.com',
})Search
import { search } from 'protocol-launcher/hot-tub'
const url = search({
q: 'funny cats',
})Open Uploader Profile
import { openProfile } from 'protocol-launcher/hot-tub'
const url = openProfile({
uploader: 'yanks',
})Handoff Search
import { handoffSearch } from 'protocol-launcher/hot-tub'
const url = handoffSearch({
baseUrl: 'https://hottubapp.io',
q: 'nature documentaries',
})Handoff Profile
import { handoffProfile } from 'protocol-launcher/hot-tub'
const url = handoffProfile({
baseUrl: 'https://hottubapp.io',
uploader: 'yanks',
})Handoff Generic Page
import { handoffOpen } from 'protocol-launcher/hot-tub'
const url = handoffOpen({
baseUrl: 'https://hottubapp.io',
url: 'https://example.com/watch/12345',
})Handoff Favorite
import { handoffFavorite } from 'protocol-launcher/hot-tub'
const url = handoffFavorite({
baseUrl: 'https://hottubapp.io',
url: 'https://example.com/watch/12345',
})Play Video
import { play } from 'protocol-launcher/hot-tub'
const url = play({
video: 'https://www.youtube.com/watch?v=y0sF5xhGreA',
})Play Web Video
import { play } from 'protocol-launcher/hot-tub'
const url = play({
url: 'https://www.youtube.com/watch?v=y0sF5xhGreA',
})Notification
import { notification } from 'protocol-launcher/hot-tub'
const url = notification({
type: 'success',
title: 'Success',
message: 'Video added to playlist!',
})Debug Message
import { message } from 'protocol-launcher/hot-tub'
const url = message({
content: 'Configuration loaded: API v2.1, 15 channels active',
})