{"id":13908630,"url":"https://github.com/MostafaAnter/VideoPlayerInsideRecyclerView","last_synced_at":"2025-07-18T07:31:48.473Z","repository":{"id":50379994,"uuid":"271619531","full_name":"MostafaAnter/VideoPlayerInsideRecyclerView","owner":"MostafaAnter","description":"Integrate RecyclerView with ExoPlayer — The clean way — and customization","archived":false,"fork":false,"pushed_at":"2023-02-12T11:09:59.000Z","size":188,"stargazers_count":127,"open_issues_count":3,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-25T17:46:25.405Z","etag":null,"topics":["autoplay","exoplayer2","facebook","instagram","recyclerview","tiktok"],"latest_commit_sha":null,"homepage":"","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/MostafaAnter.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-06-11T18:28:49.000Z","updated_at":"2024-09-29T08:31:59.000Z","dependencies_parsed_at":"2023-02-16T20:46:05.369Z","dependency_job_id":null,"html_url":"https://github.com/MostafaAnter/VideoPlayerInsideRecyclerView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MostafaAnter/VideoPlayerInsideRecyclerView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostafaAnter%2FVideoPlayerInsideRecyclerView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostafaAnter%2FVideoPlayerInsideRecyclerView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostafaAnter%2FVideoPlayerInsideRecyclerView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostafaAnter%2FVideoPlayerInsideRecyclerView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MostafaAnter","download_url":"https://codeload.github.com/MostafaAnter/VideoPlayerInsideRecyclerView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostafaAnter%2FVideoPlayerInsideRecyclerView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265720612,"owners_count":23817271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["autoplay","exoplayer2","facebook","instagram","recyclerview","tiktok"],"created_at":"2024-08-06T23:02:52.627Z","updated_at":"2025-07-18T07:31:48.158Z","avatar_url":"https://github.com/MostafaAnter.png","language":"Kotlin","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# VideoPlayerInsideRecyclerView\nIntegrate RecyclerView with ExoPlayer — The clean way — and customization\nthis is the implementation of that article [meduim article](https://medium.com/mindorks/working-with-exoplayer-the-clean-way-and-customization-fac81e5d39ba)\n\n\u003cimg src=\"https://media.giphy.com/media/ibAOpHOHg9w8Wfabuy/giphy.gif\" width=\"300\"\u003e\n\n# Demo\n\n[Youtube video](https://youtu.be/KynEZzerD8M)\n\n# Tips\n\n### for smooth scrolling and avoiding players overlaps use `TextureView` nested of `SurfaceView`\n\nNote, `TextureView` can only be used in a hardware accelerated window. When rendered in software, TextureView will draw nothing. so after   set surface type\n \n\n    \u003ccom.google.android.exoplayer2.ui.PlayerView android:id=\"@+id/player_view\"\n     app:surface_type=\"texture_view\"\n     android:layout_width=\"match_parent\"\n     android:layout_height=\"match_parent\"/\u003e\n\nyou need to make sure that hardware acceleration is enabled, go to manifest file and ad this line\n\n- At application level: `\u003capplication android:hardwareAccelerated=\"true\" ...\u003e`\n\n\n### implement `onViewRecycled` inside your adapter then call player.release to release player when item is recycled\n\n    override fun onViewRecycled(holder: RecyclerView.ViewHolder) {\n        val position = holder.adapterPosition\n            releaseRecycledPlayers(position)\n        super.onViewRecycled(holder)\n    }\n    \n    \n    \n    \n    \n# Licence\n\n    Copyright @2020 by Mostafa Anter\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMostafaAnter%2FVideoPlayerInsideRecyclerView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMostafaAnter%2FVideoPlayerInsideRecyclerView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMostafaAnter%2FVideoPlayerInsideRecyclerView/lists"}