How iina/iina works
IINA is a modern macOS video and music player built around mpv. The principal workflow is: a user, command-line client, or browser extension supplies a media URL; IINA creates or selects a player window, loads media through PlayerCore and MPVController, renders video or audio, and exposes playback state through UI, playlists, subtitles, history, and system controls. The graph also preserves documented plugin, settings, picture-in-picture, music-mode, and browser-integration capabilities. Some connections are inferred from explicit module responsibilities and README capabilities; unsampled implementation details are omitted.
Components 24
Entry Integrations
- Command Line
iina-cli/main.swift - Safari Extension
OpenInIINA/SafariExtensionHandler.swift - Chrome Extension
browser/Chrome_Open_In_IINA/background.js
Application Shell
- App Delegate
iina/AppDelegate.swift - Main Window
iina/MainWindowController.swift - Menu Controller
iina/MenuController.swift
Playback Engine
- Player Core
iina/PlayerCore.swift - MPV Controller
iina/MPVController.swift - mpv Core
deps/include/mpv/client.h - Video View
iina/VideoView.swift
Media Features
- Playlist Controller
iina/PlaylistViewController.swift - Subtitle Matcher
iina/AutoFileMatcher.swift - Online Subtitles
iina/OpenSubClient.swift - History Controller
iina/HistoryController.swift - History Window
iina/HistoryWindowController.swift - Preferences
iina/Preference.swift - Picture In Picture
iina/MainWindowController.swift - Music Mode
iina/MiniPlayerWindowController.swift
Extensions State
- Plugin Manager
iina/PluginManager.swift - Plugin Instance
iina/JavascriptPluginInstance.swift - JavaScript API
iina/JavascriptAPI.swift - Now Playing
iina/NowPlayingInfoManager.swift
Other components
- Mac User
- macOS Media Controls
Connections 25
- Mac User → Main Window: opens media
- Command Line → App Delegate: launches IINA
- Safari Extension → App Delegate: opens URL
- Chrome Extension → App Delegate: opens URL
- App Delegate → Main Window: creates window
- Main Window → Player Core: controls playback
- Menu Controller → Player Core: dispatches commands
- Player Core → MPV Controller: controls player
- MPV Controller → mpv Core: creates and observes
- mpv Core → MPV Controller: emits events
- Main Window → Video View: hosts rendering
- Player Core → Video View: updates playback
- Player Core → Playlist Controller: updates playlist
- Player Core → Subtitle Matcher: matches subtitles
- Player Core → Online Subtitles: searches subtitles
- History Window → History Controller: reads and removes
- Player Core → History Controller: records playback
- Main Window → Picture In Picture: enters PIP
- Main Window → Music Mode: shows music mode
- Preferences → Player Core: configures options
- Plugin Manager → Plugin Instance: loads plugins
- Plugin Instance → JavaScript API: uses API
- JavaScript API → Player Core: controls playback
- Player Core → Now Playing: updates metadata
- Now Playing → macOS Media Controls: publishes controls