{"id":17552402,"url":"https://github.com/saschpe/android-exoplayer2-ext-icy","last_synced_at":"2025-10-07T10:28:41.626Z","repository":{"id":136456535,"uuid":"118375319","full_name":"saschpe/android-exoplayer2-ext-icy","owner":"saschpe","description":"ExoPlayer2 Shoutcast Metadata Protocol (ICY) extension","archived":false,"fork":false,"pushed_at":"2019-07-15T13:18:53.000Z","size":271,"stargazers_count":27,"open_issues_count":3,"forks_count":9,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T05:31:42.279Z","etag":null,"topics":["android","android-library","bintray","exoplayer2","icy","shoutcast","streaming"],"latest_commit_sha":null,"homepage":"https://medium.com/google-exoplayer/exoplayer-2-10-whats-new-15d344eaa8b9","language":"Java","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/saschpe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"publiccode":null,"codemeta":null}},"created_at":"2018-01-21T21:26:06.000Z","updated_at":"2022-06-10T01:47:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef0e088e-77fc-4503-afac-6d47536a4746","html_url":"https://github.com/saschpe/android-exoplayer2-ext-icy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saschpe%2Fandroid-exoplayer2-ext-icy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saschpe%2Fandroid-exoplayer2-ext-icy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saschpe%2Fandroid-exoplayer2-ext-icy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saschpe%2Fandroid-exoplayer2-ext-icy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saschpe","download_url":"https://codeload.github.com/saschpe/android-exoplayer2-ext-icy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250543103,"owners_count":21447833,"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","android-library","bintray","exoplayer2","icy","shoutcast","streaming"],"created_at":"2024-10-21T05:04:16.162Z","updated_at":"2025-10-07T10:28:36.594Z","avatar_url":"https://github.com/saschpe.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED / MERGED UPSTREAM\nThis 3rd-party extension moved into ExoPlayer 2.10 directly (see the [2.10 release announcement](https://medium.com/google-exoplayer/exoplayer-2-10-whats-new-15d344eaa8b9)). It remains functional but you might want to port to the official version as I won't continue to maintain this library any further.\n\n# Usage\nWith ExoPlayer 2.10, fetching shoutcast metadata is straightforward:\n\n```kotlin\n// ... exoPlayer instance already created\n\nexoPlayer?.addMetadataOutput {\n    for (i in 0 until it.length()) {\n        val entry = it.get(i)\n        if (entry is IcyHeaders) {\n            Log.debug(\"onMetadata: IcyHeaders $entry\")\n        }\n        if (entry is IcyInfo) {\n            Log.debug(\"onMetadata: IcyInfo $entry\")\n        }\n    }\n}\n\n// The MediaSource represents the media to be played\nval mediaSource = ProgressiveMediaSource\n    .Factory(DefaultDataSourceFactory(applicationContext, userAgent))\n    .createMediaSource(sourceUri)\n\n// exoPlayer?.prepare(mediaSource) ...\n```\n\n\n# ExoPlayer2 Shoutcast Metadata Protocol (ICY) extension\n[![Download](https://api.bintray.com/packages/saschpe/maven/android-exoplayer2-ext-icy/images/download.svg)](https://bintray.com/saschpe/maven/android-exoplayer2-ext-icy/_latestVersion)\n[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n[![Build Status](https://travis-ci.org/saschpe/android-exoplayer2-ext-icy.svg?branch=master)](https://travis-ci.org/saschpe/android-exoplayer2-ext-icy)\n\u003ca href=\"http://www.methodscount.com/?lib=saschpe.android%3Aandroid-exoplayer2-ext-icy%3A2.1.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/Methods and size-core: 100 | deps: 19640 | 25 KB-e91e63.svg\"/\u003e\u003c/a\u003e\n\nThe Shoutcast Metadata Protocol extension provides **IcyHttpDataSource** and \n**IcyHttpDataSourceFactory** which can parse ICY metadata information such as stream name and\ngenre as well as current song information from a music stream.\n\nYou can find the protocol description here:\n\n- https://cast.readme.io/v1.0/docs/icy\n- http://www.smackfu.com/stuff/programming/shoutcast.html\n\n\n## Usage\nTo receive information about the current music stream (such as name and genre, see **IcyHeaders**\n class) as well as current song information (see **IcyMetadata** class), pass an instance of\n **IcyHttpDataSourceFactory** instead of an **DefaultHttpDataSourceFactory** like this (in Kotlin):\n\n```kotlin\n// ... exoPlayer instance already created\n\n// Custom HTTP data source factory which requests Icy metadata and parses it if\n// the stream server supports it\nval client = OkHttpClient.Builder().build()\nval icyHttpDataSourceFactory = IcyHttpDataSourceFactory.Builder(client)\n    .setUserAgent(userAgent)\n    .setIcyHeadersListener { icyHeaders -\u003e\n        Log.d(\"XXX\", \"onIcyHeaders: %s\".format(icyHeaders.toString()))\n    }\n    .setIcyMetadataChangeListener { icyMetadata -\u003e\n        Log.d(\"XXX\", \"onIcyMetaData: %s\".format(icyMetadata.toString()))\n    }\n    .build()\n\n// Produces DataSource instances through which media data is loaded\nval dataSourceFactory = DefaultDataSourceFactory(applicationContext, null, icyHttpDataSourceFactory)\n\n// The MediaSource represents the media to be played\nval mediaSource = ExtractorMediaSource.Factory(dataSourceFactory)\n    .setExtractorsFactory(DefaultExtractorsFactory())\n    .createMediaSource(sourceUri)\n\n// exoPlayer?.prepare(mediaSource) ...\n```\n\n## Download\n```groovy\nimplementation 'saschpe.android:exoplayer2-ext-icy:2.1.0'\n```\n\nSnapshots of the development version are available in [Sonatype's `snapshots` repository][snap].\n\n\n## License\n\n    Copyright 2018 Sascha Peilicke\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 [snap]: https://oss.sonatype.org/content/repositories/snapshots/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaschpe%2Fandroid-exoplayer2-ext-icy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaschpe%2Fandroid-exoplayer2-ext-icy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaschpe%2Fandroid-exoplayer2-ext-icy/lists"}