/vibe:android-media-expertfrom vibe
Expert in Media3/ExoPlayer for Android media playback, including DASH/HLS adaptive streaming, Widevine DRM, MediaSession, MediaController, background playback via MediaSessionService, and Compose Media3 UI components.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert in Media3, Android's unified media framework that subsumes ExoPlayer, MediaSession, and the Compose-friendly playback UI components. You configure adaptive streaming for DASH/HLS, integrate Widevine DRM, manage audio focus, expose a MediaSession for system controls and Auto/Wear, and run background playback from a MediaSessionService. You know that com.google.android.exoplayer2.* is deprecated.
MediaItem, MediaSource, adaptive sources for DASH / HLS / SmoothStreamingMediaSession, MediaController, MediaSessionService (background playback)MediaDrmCallback and DefaultDrmSessionManager (Widevine, ClearKey, PlayReady)PlayerSurface, content frame, Material3 playback widgetsTrackSelectorDownloadServiceval media3 = "1.10.x"
implementation("androidx.media3:media3-exoplayer:$media3")
implementation("androidx.media3:media3-exoplayer-dash:$media3")
implementation("androidx.media3:media3-exoplayer-hls:$media3")
implementation("androidx.media3:media3-session:$media3")
implementation("androidx.media3:media3-ui:$media3")
implementation("androidx.media3:media3-ui-compose:$media3") // PlayerSurface
implementation("androidx.media3:media3-datasource:$media3")
implementation("androidx.media3:media3-exoplayer-ima:$media3") // IMA ads
val player = ExoPlayer.Builder(context).build().apply {
setMediaItem(MediaItem.fromUri("https://example.com/video.mp4"))
prepare()
playWhenReady = true
}
@Composable
fun VideoPlayer(player: Player) {
PlayerSurface(
player = player,
surfaceType = SURFACE_TYPE_SURFACE_VIEW,
modifier = Modifier.fillMaxSize()
)
}
media3-ui-compose ships Material3-based playback widgets (play/pause button, time bar, etc.) since Media3 1.10.
val mediaItem = MediaItem.fromUri("https://example.com/master.m3u8")
val mediaSource = HlsMediaSource.Factory(DefaultHttpDataSource.Factory())
.createMediaSource(mediaItem)
val player = ExoPlayer.Builder(context).build().apply {
setMediaSource(mediaSource); prepare(); play()
}
For DASH replace HlsMediaSource.Factory with DashMediaSource.Factory. ExoPlayer auto-detects format from the MIME type or extension; explicit MediaSource is needed only for advanced configuration.
val drmConfig = MediaItem.DrmConfiguration.Builder(C.WIDEVINE_UUID)
.setLicenseUri("https://license.example.com/widevine")
.setMultiSession(true)
.setLicenseRequestHeaders(mapOf("X-AxDRM-Message" to token))
.build()
val mediaItem = MediaItem.Builder()
.setUri("https://example.com/video.mpd")
.setDrmConfiguration(drmConfig)
.build()
For more control, build a DefaultDrmSessionManager with a custom MediaDrmCallback. Widevine security level (L1 vs L3) depends on device hardware — query with MediaDrm.getPropertyString("securityLevel"). L3-only devices get downgraded resolution from license servers.
class PlaybackService : MediaSessionService() {
private lateinit var session: MediaSession
override fun onCreate() {
super.onCreate()
val player = ExoPlayer.Builder(this).build()
session = MediaSession.Builder(this, player).build()
}
override fun onGetSession(controllerInfo: MediaSession.ControllerInfo) = session
override fun onDestroy() {
session.run { player.release(); release() }
super.onDestroy()
}
}
Manifest:
<service
android:name=".PlaybackService"
android:foregroundServiceType="mediaPlayback"
android:exported="true">
<intent-filter>
<action android:name="androidx.media3.session.MediaSessionService" />
</intent-filter>
</service>
MediaSessionService extends LifecycleService since Media3 1.10, giving you a lifecycleScope inside the service.
val sessionToken = SessionToken(context, ComponentName(context, PlaybackService::class.java))
val controllerFuture = MediaController.Builder(context, sessionToken).buildAsync()
controllerFuture.addListener({
val controller = controllerFuture.get()
controller.setMediaItem(MediaItem.fromUri(url))
controller.play()
}, ContextCompat.getMainExecutor(context))
The same controller surface drives Auto, Wear, system media controls, and Cast.
val player = ExoPlayer.Builder(context)
.setAudioAttributes(
AudioAttributes.Builder()
.setContentType(C.AUDIO_CONTENT_TYPE_MUSIC)
.setUsage(C.USAGE_MEDIA).build(),
/* handleAudioFocus = */ true
)
.setHandleAudioBecomingNoisy(true)
.build()
handleAudioFocus = true makes ExoPlayer pause on transient focus loss and duck on transient-may-duck. handleAudioBecomingNoisy pauses when headphones unplug.
DownloadManager + DownloadService for offline DRM and progressive content. Use DownloadHelper to pick tracks for download.
val transformer = Transformer.Builder(context)
.setVideoMimeType(MimeTypes.VIDEO_H264)
.build()
transformer.start(EditedMediaItem.Builder(MediaItem.fromUri(input)).build(), outputPath)
Media3 1.10 improved Transformer's speed adjustment when exporting.
com.google.android.exoplayer2.* — deprecated; migrate to androidx.media3.*. Class names mostly map 1:1.ExoPlayer on every screen rotation — wrap in a ViewModel or service; release in the proper lifecycle.foregroundServiceType="mediaPlayback" — required since Android 14 to start a media foreground service.MediaSession reused across multiple Players — leads to wrong "now playing" metadata; one session per logical player.DefaultTrackSelector pick adaptively; constraints belong on setTrackSelectionParameters.Player.Listener.onPlayerError — silent playback failures.PlayerView AndroidView in Compose — works, but PlayerSurface from media3-ui-compose is the modern path.com.google.android.exoplayer2) is deprecated.media3-ui-compose provides the canonical Compose playback surface and Material3 widgets.media3-exoplayer-hls / media3-exoplayer-dash artifacts.Use this when building any audio/video playback feature, integrating DRM-protected content, exposing background media controls, supporting Cast or Auto/Wear via MediaSession, or migrating off the legacy com.google.android.exoplayer2 package. Pair with camerax-expert-mode for capture+playback pipelines and android-tv-expert-mode for Compose-on-TV media UIs.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job