{"id":13907522,"url":"https://github.com/HamidrezaAmz/MagicalExoPlayer","last_synced_at":"2025-07-18T05:32:00.764Z","repository":{"id":36758626,"uuid":"194092193","full_name":"HamidrezaAmz/MagicalExoPlayer","owner":"HamidrezaAmz","description":"The Easiest Way To Play/Stream Video And Audio Using Google ExoPlayer In Your Android Application","archived":false,"fork":false,"pushed_at":"2024-02-14T14:59:46.000Z","size":445,"stargazers_count":340,"open_issues_count":28,"forks_count":77,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-07T23:52:16.843Z","etag":null,"topics":["android","androidvideoplayer","androidx","audio","audioplayer","controller","dash","exoplayer","githubplayer","google","googleexoplayer","hls","mediaplayer","mobile","mp4","player","stream","video","videoplayer"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HamidrezaAmz.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}},"created_at":"2019-06-27T12:34:57.000Z","updated_at":"2024-07-18T09:03:59.000Z","dependencies_parsed_at":"2023-02-15T15:46:26.458Z","dependency_job_id":null,"html_url":"https://github.com/HamidrezaAmz/MagicalExoPlayer","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HamidrezaAmz%2FMagicalExoPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HamidrezaAmz%2FMagicalExoPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HamidrezaAmz%2FMagicalExoPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HamidrezaAmz%2FMagicalExoPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HamidrezaAmz","download_url":"https://codeload.github.com/HamidrezaAmz/MagicalExoPlayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226353715,"owners_count":17611751,"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":["android","androidvideoplayer","androidx","audio","audioplayer","controller","dash","exoplayer","githubplayer","google","googleexoplayer","hls","mediaplayer","mobile","mp4","player","stream","video","videoplayer"],"created_at":"2024-08-06T23:01:58.617Z","updated_at":"2024-11-25T15:32:02.687Z","avatar_url":"https://github.com/HamidrezaAmz.png","language":"Kotlin","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"![GitHub](https://img.shields.io/github/license/hamidrezaamz/MagicalExoPlayer)\n[![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=15)\n[![](https://jitpack.io/v/HamidrezaAmz/MagicalExoPlayer.svg)](https://jitpack.io/#HamidrezaAmz/MagicalExoPlayer)\n[![](https://jitpack.io/v/HamidrezaAmz/MagicalExoPlayer/month.svg)](https://jitpack.io/#HamidrezaAmz/MagicalExoPlayer)\n\n# MagicalExoPlayer\nThe Easiest Way To Play Video Using ExoPlayer In Your Android Application. Add Dependencies Into Your Gadle File, Sync Your Project And Then Just Pass Your Url Or Local Video Address To The Player. MagicalExoPlayer Support **MP4**, **HLS**, **DASH**  And **MP3**. \n\n![mock_up_and_exo_player_2](https://user-images.githubusercontent.com/13493645/63092374-cbef1400-bf76-11e9-8727-734f036692ca.jpg)\n\n## Getting Started\n\nThese instructions will help you to use this library inside your projects\n\n### Prerequisites\n\nThis library was built with **androidX**, so you should migrate into androidX to use this library with out any problem. For migration you can use [Migrating to AndroidX](https://developer.android.com/jetpack/androidx/migrate)\n\n### Installing\n\nStep 1. Add the JitPack repository to your build file,\nAdd it in your root build.gradle at the end of repositories:\n\n```gradle\nallprojects {\n        repositories {\n            maven { url 'https://jitpack.io' }\n        }\n    }\n```\n\nStep 2. Add the dependency\n\n```gradle\ndependencies {\n    implementation 'com.github.HamidrezaAmz:MagicalExoPlayer:X.X.X'\n}\n```\n\n\n### Here we go for implementation\n\nAdd player view into your XML\n```xml\n\u003ccom.potyvideo.library.AndExoPlayerView\n        android:id=\"@+id/andExoPlayerView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\" /\u003e\n```\n\nRefrence to custom-view inside your activity or fragment (I use [butterknife](https://github.com/JakeWharton/butterknife/)), Or you can use **findViewById()**\n```java\n @BindView(R.id.andExoPlayerView)\n AndExoPlayerView andExoPlayerView;\n```\nOr\n```java\n AndExoPlayerView andExoPlayerView = findViewById(R.id.andExoPlayerView);\n```\n\n## Implementation Example\n```java\n andExoPlayerView.setSource(\"URL OR FILE ADDRESS\");\n```\n\n## Custom Attributes\n| Command | Description |\n| --- | --- |\n| `andexo_resize_mode` | Type Of Video Player Size, you can pass **Fill**,**Fit**,**Zoom** |\n| `andexo_full_screen` | Show FullScreen Toggle Button, you can Pass **True**,**False** |\n| `andexo_play_when_ready` | Player Start Playing On Stream Is Ready **True**,**False** |\n| `andexo_aspect_ratio` | In Order To Get The Desired Playerr Size, You Can Pass The Aspect Ratios You Need **ASPECT_1_1**, **ASPECT_16_9**, **ASPECT_4_3**, **ASPECT_MATCH**, **ASPECT_MP3** |\n| `andexo_show_controller` | Show Or Hide Player Controller **True**,**False** |\n| `andexo_loop` | Play video with loop modes **Infinite**,**Finite** |\n\n\n## XML With Custom Attrs.\n```xml\n\u003ccom.potyvideo.library.AndExoPlayerView\n        android:id=\"@+id/andExoPlayerView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:andexo_aspect_ratio=\"aspect_16_9\"\n        app:andexo_full_screen=\"true\"\n        app:andexo_play_when_ready=\"true\"\n        app:andexo_show_controller=\"true\"\n        app:andexo_resize_mode=\"Fit\" /\u003e\n```\n\n\n## TIP\n* If you wan to support full screen, please add this config into your activity in manifest.xml\n```xml\nandroid:configChanges=\"keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode\"\n```\n\nFor example your activity with be something like this\n```xml\n\u003cactivity\n      android:name=\".MainActivity\"\n      android:configChanges=\"keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode\"\u003e\n      \u003cintent-filter\u003e\n          \u003caction android:name=\"android.intent.action.MAIN\" /\u003e\n\n          \u003ccategory android:name=\"android.intent.category.LAUNCHER\" /\u003e\n      \u003c/intent-filter\u003e\n\u003c/activity\u003e\n```\n\n\n* If you want to pass custom headers over your stream url, you can just pass them as a hashmap like this:\n```java\n  HashMap\u003cString , String\u003e extraHeaders = new HashMap\u003c\u003e();\n  extraHeaders.put(\"foo\",\"bar\");\n  andExoPlayerView.setSource(\"STREAM_URL\", extraHeaders);\n```\n\n\n## Other Libraries\n\n* [ExoPlayer](https://github.com/google/ExoPlayer) - Google Player - Version 2.15.0\n\n\n***\n\n## :heart: Support My Projects \nHowever, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it. :coffee: :hamburger: :fries: :apple:\n\n* Starring: You may give a star or share the projects you like.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHamidrezaAmz%2FMagicalExoPlayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHamidrezaAmz%2FMagicalExoPlayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHamidrezaAmz%2FMagicalExoPlayer/lists"}