Skills

DLNA Casting Provider

Connects DLNA casting through a casting SPI or a local loopback test receiver.

Install

npx skills add CarGuo/GSYVideoPlayer --skill gsy-cast-and-loopback -g -a claude-code -y
Repository
CarGuo/GSYVideoPlayer21.5k
Category
Mobile
Updated
26d ago
License
Apache-2.0
Context cost
Lightabout 1,408 tokens
Runs scripts
No, instructions only

What it does

使用内核层投屏 SPI(CastCapability + CastProvider)接入 DLNA,或做本地 loopback 回环模拟被投屏端。

gsy-cast-and-loopback

顶层架构

CastCapability (单例)  ← 主线程 API 入口
  ├─ registerProvider(CastProvider)
  ├─ startDiscovery(Context) / stopDiscovery()
  ├─ getAvailableDevices(): List<CastDevice>
  ├─ connect(device, ConnectCallback) : CastSession(异步)
  ├─ addListener(CastListener)
  └─ disconnect()

对齐 Media3 Player 语义:CastCapability ≈ Player 池、activeSession ≈ 当前 Player、CastProvider ≈ 渲染后端、CastListener/SessionListener ≈ Player.Listener。见 CastCapability 与 CastProvider 的头 JavaDoc。

核心 API

CastCapability

Read the whole SKILL.md on GitHub

More in Mobile