{"id":45164175,"url":"https://github.com/dsa28s/compose-video","last_synced_at":"2026-02-20T06:30:36.203Z","repository":{"id":65641776,"uuid":"594415245","full_name":"dsa28s/compose-video","owner":"dsa28s","description":"Video UI Component for Jetpack Compose (Powered by androidx.media3)","archived":false,"fork":false,"pushed_at":"2024-11-06T16:17:22.000Z","size":38226,"stargazers_count":251,"open_issues_count":30,"forks_count":32,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-06T17:27:37.189Z","etag":null,"topics":["compose","exoplayer","jetpack","player","video"],"latest_commit_sha":null,"homepage":"https://dsa28s.github.io/compose-video/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsa28s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-28T13:40:39.000Z","updated_at":"2024-11-06T16:17:26.000Z","dependencies_parsed_at":"2024-08-06T13:39:19.598Z","dependency_job_id":null,"html_url":"https://github.com/dsa28s/compose-video","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dsa28s/compose-video","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsa28s%2Fcompose-video","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsa28s%2Fcompose-video/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsa28s%2Fcompose-video/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsa28s%2Fcompose-video/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsa28s","download_url":"https://codeload.github.com/dsa28s/compose-video/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsa28s%2Fcompose-video/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29643263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T05:21:04.652Z","status":"ssl_error","status_checked_at":"2026-02-20T05:21:04.238Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compose","exoplayer","jetpack","player","video"],"created_at":"2026-02-20T06:30:36.115Z","updated_at":"2026-02-20T06:30:36.194Z","avatar_url":"https://github.com/dsa28s.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# compose-video \u003cimg src=\"https://img.shields.io/github/v/release/dsa28s/compose-video.svg?label=latest\"/\u003e\n\n## `VideoPlayer` Component for Jetpack Compose\n\nThis library is a video player component available in Android Jetpack Compose. \u003cbr /\u003e\nBased on [androidx.media3]((https://github.com/google/ExoPlayer)) Package.\n\nIn addition to the basic functions of Exoplayer, it supports full screen, PIP, ChromeCast, and more.\nAll formats supported by ExoPlayer are playable, and DRM content is also supported.\n\n### Installation\n\nThe easiest way to get started using VideoPlayer component is to add it as a gradle dependency in the build.gradle file\nof your app module.\n\n```gradle\nimplementation 'io.sanghun:compose-video:1.2.0'\nimplementation 'androidx.media3:media3-exoplayer:1.1.0' // [Required] androidx.media3 ExoPlayer dependency\nimplementation 'androidx.media3:media3-session:1.1.0' // [Required] MediaSession Extension dependency\nimplementation 'androidx.media3:media3-ui:1.1.0' // [Required] Base Player UI\n\nimplementation 'androidx.media3:media3-exoplayer-dash:1.1.0' // [Optional] If your media item is DASH\nimplementation 'androidx.media3:media3-exoplayer-hls:1.1.0' // [Optional] If your media item is HLS (m3u8..)\n```\n\nor if your project using `build.gradle.kts`\n\n```kotlin\nimplementation(\"io.sanghun:compose-video:1.2.0\")\nimplementation(\"androidx.media3:media3-exoplayer:1.1.0\") // [Required] androidx.media3 ExoPlayer dependency\nimplementation(\"androidx.media3:media3-session:1.1.0\") // [Required] MediaSession Extension dependency\nimplementation(\"androidx.media3:media3-ui:1.1.0\") // [Required] Base Player UI\n\nimplementation(\"androidx.media3:media3-exoplayer-dash:1.1.0\") // [Optional] If your media item is DASH\nimplementation(\"androidx.media3:media3-exoplayer-hls:1.1.0\") // [Optional] If your media item is HLS (m3u8..)\n```\n\n### Preview 📸\n\n| \u003cimg src=\"https://github.com/dsa28s/compose-video/raw/main/artwork/compose-video-player.png\" width=\"200px\"\u003e | \u003cimg src=\"https://github.com/dsa28s/compose-video/raw/main/artwork/fullscreen.gif\" width=\"200px\"\u003e | \u003cimg src=\"https://github.com/dsa28s/compose-video/raw/main/artwork/pip.gif\" width=\"200px\"\u003e |\n|:--:|:--:|:--:|\n| **VideoPlayer** | **Full Screen** | **PIP** |\n\n### Usage\n\n```kotlin\nVideoPlayer(\n    mediaItems = listOf(\n        VideoPlayerMediaItem.RawResourceMediaItem(\n            resourceId = R.raw.movie1,\n        ),\n        VideoPlayerMediaItem.AssetFileMediaItem(\n            assetPath = \"videos/test.mp4\"\n        ),\n        VideoPlayerMediaItem.StorageMediaItem(\n            storageUri = \"content://xxxxx\"\n        ),\n        VideoPlayerMediaItem.NetworkMediaItem(\n            url = \"https://storage.googleapis.com/wvmedia/cbcs/h264/tears/tears_aes_cbcs.mpd\",\n            mediaMetadata = MediaMetadata.Builder().setTitle(\"Widevine DASH cbcs: Tears\").build(),\n            mimeType = MimeTypes.APPLICATION_MPD,\n            drmConfiguration = MediaItem.DrmConfiguration.Builder(C.WIDEVINE_UUID)\n                .setLicenseUri(\"https://proxy.uat.widevine.com/proxy?provider=widevine_test\")\n                .build(),\n        )\n    ),\n    handleLifecycle = true,\n    autoPlay = true,\n    usePlayerController = true,\n    enablePip = true,\n    handleAudioFocus = true,\n    controllerConfig = VideoPlayerControllerConfig(\n        showSpeedAndPitchOverlay = false,\n        showSubtitleButton = false,\n        showCurrentTimeAndTotalTime = true,\n        showBufferingProgress = false,\n        showForwardIncrementButton = true,\n        showBackwardIncrementButton = true,\n        showBackTrackButton = true,\n        showNextTrackButton = true,\n        showRepeatModeButton = true,\n        controllerShowTimeMilliSeconds = 5_000,\n        controllerAutoShow = true,\n    ),\n    volume = 0.5f,  // volume 0.0f to 1.0f\n    repeatMode = RepeatMode.NONE,       // or RepeatMode.ALL, RepeatMode.ONE\n    onCurrentTimeChanged = { // long type, current player time (millisec)\n        Log.e(\"CurrentTime\", it.toString())\n    },\n    playerInstance = { // ExoPlayer instance (Experimental)\n        addAnalyticsListener(\n            object : AnalyticsListener {\n                // player logger\n            }\n        )\n    },\n    modifier = Modifier\n        .fillMaxSize()\n        .align(Alignment.Center),\n)\n```\n\n### Enable cache\n\nBy default, the LRU cache is used. To set up a cache for video player common use, call the method below only once when\nthe app starts.\n\n```kotlin\nVideoPlayerCacheManager.initialize(context, 1024 * 1024 * 1024)    // 1GB\n```\n\n### Features\n\n- [x] Migrate Google ExoPlayer -\u003e androidx.media3 Package\n  - Now Google ExoPlayer included in androidx.media3 package\n- [x] Local video play (ex. assets, storage)\n- [x] Network video play (ex. HLS, DASH)\n- [x] Video Player Controller (Default)\n- [ ] Video Player Custom Controller (using Jetpack Compose)\n- [x] Audio Focus\n- [x] Full Screen (With rotate)\n- [x] Repeat\n- [x] Volume Control\n- [x] Select Audio Track\n- [x] Select Video Track\n- [x] SubTitle\n- [ ] Chromecast\n- [ ] Buffering config\n- [x] PIP (Picture In Picture)\n- [x] DRM\n- [ ] Custom Headers\n- [x] Background Play\n- [ ] Rate\n- [ ] Resize Mode\n- [x] Video Caching\n\n### Contributing\n\nThe contribution of new features or bug fixes is always welcome. \u003cbr /\u003e\nPlease submit new issue or pull request anytime.\n\n### License\n\nLicensed under the Apache 2.0 license. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsa28s%2Fcompose-video","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsa28s%2Fcompose-video","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsa28s%2Fcompose-video/lists"}