Infuse
Infuse is a video player for Apple devices. Protocol Launcher allows you to generate Infuse URL scheme links for playing videos, saving links, downloading media, and opening library items.
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
Infuse x-callback URLs use infuse://x-callback-url/<action>. Firecore documents play and save actions with repeated url entries, optional filename and sub entries, and optional x-success / x-error callbacks. These helpers use xSuccess and xError option names and serialize them to the official query keys. Library links use infuse://movie/... and infuse://series/... with TMDB ID numbers.
Play
Play one or more videos as a temporary playlist.
import { play } from 'protocol-launcher/infuse'
const url = play({
url: [
'https://files.firecore.com/infuse/sample-5s-360p.mp4',
'https://files.firecore.com/infuse/mov_bbb.mp4',
],
filename: ['Inception-2010.mp4', 'Mad-Men-S01-E01.mp4'],
sub: [
'https://files.firecore.com/infuse/example.srt',
'https://files.firecore.com/infuse/example2.srt',
],
xSuccess: 'some-app://success',
xError: 'some-app://error',
})Save
Save one or more video links for later playback. Firecore documents download as 0 for saving the link only or 1 for saving and downloading.
import { save } from 'protocol-launcher/infuse'
const url = save({
url: [
'https://files.firecore.com/infuse/sample-5s-360p.mp4',
'https://files.firecore.com/infuse/mov_bbb.mp4',
],
filename: ['Inception-2010.mp4', 'Mad-Men-S01-E01.mp4'],
sub: [
'https://files.firecore.com/infuse/example1.srt',
'https://files.firecore.com/infuse/example2.srt',
],
download: 0,
xSuccess: 'some-app://success',
xError: 'some-app://error',
})Open Movie
Open an Infuse movie library item by TMDB movie ID.
import { openMovie } from 'protocol-launcher/infuse'
const url = openMovie({
tmdbId: 12345,
})Open Series
Open an Infuse TV series library item by TMDB series ID.
import { openSeries } from 'protocol-launcher/infuse'
const url = openSeries({
tmdbId: 12345,
})Open Season
Open an Infuse TV series season by TMDB series ID and season number.
import { openSeason } from 'protocol-launcher/infuse'
const url = openSeason({
tmdbId: 12345,
seasonNumber: 1,
})Open Episode
Open an Infuse TV series episode by TMDB series ID, season number, and episode number.
import { openEpisode } from 'protocol-launcher/infuse'
const url = openEpisode({
tmdbId: 12345,
seasonNumber: 1,
episodeNumber: 2,
})