Media

From moasq/nanowave · View interactive version

Media is an AI agent skill from the GitHub repository moasq/nanowave. Comprehensive media patterns: video playback, audio/music players, HLS streaming, remote images, AVAudioSession, memory management. Use when implementing any media-related features.

How to use this skill

Skill file

Media

Networking Clarification

Media playback URLs are permitted. The forbidden-patterns networking ban targets REST API clients (URLSession data tasks, custom HTTP clients), not media playback. The following are allowed:

Do not use URLSession for REST API calls, JSON fetching, or custom networking — that ban still applies.

Decision Tree

Pick the right pattern based on what you're building:

| Building | Reference | Key API |

|----------|-----------|---------|

| Video player | video-playback | VideoPlayer, AVPlayer |

| HLS/live streaming | video-playback | AVPlayer + .m3u8 URL |

| Video feed (TikTok-style) | video-playback + media-memory-management | FeedPlayerCoordinator |

| Music/audio player | audio-playback + audio-session | AVAudioPlayer (local) or AVPlayer (streaming) |

| Podcast player | audio-playback + audio-session | AVPlayer + Now Playing + Remote Commands |

| Background audio | audio-session | .playback category + UIBackgroundModes |

| Image gallery/feed | remote-images | KFImage (Kingfisher) |

| Simple remote image | remote-images | AsyncImage |

| Sound effects | audio-playback | AVAudioPlayer with .ambient category |

| Sample content | sample-media-urls | Public URLs, local audio generation |

Platform Capabilities

| Feature | iOS | macOS | tvOS | watchOS | visionOS |

|---------|-----|-------|------|---------|----------|

| Video playback | VideoPlayer | AVPlayerView (NSViewRepresentable) | VideoPlayer | No | VideoPlayer |

| Audio playback | AVAudioPlayer / AVPlayer | AVAudioPlayer / AVPlayer | AVAudioPlayer / AVPlayer | WKAudioFilePlayer | AVAudioPlayer / AVPlayer |

| AVAudioSession | Yes | No (not needed) | Yes | Limited | Yes |

| Background audio | Yes (UIBackgroundModes) | N/A | No | Limited | Yes |

| Now Playing info | Yes | Yes | Limited | No | Yes |

| Remote commands | Yes | Yes | Limited | No | Yes |

| AsyncImage | Yes | Yes | Yes | Yes | Yes |

| Kingfisher | Yes | Yes | Yes | No | Yes |

Recommended Packages

All already in the curated package registry — no new dependencies to add:

Required Info.plist Keys

For background audio playback, add to the target's info section in project.yml:

UIBackgroundModes: ["audio"]

No other Info.plist keys are needed for basic media playback.

Cross-References

References

This skill includes the following reference documents (auto-loaded):

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.