{"id":13549434,"url":"https://github.com/alexmercerind/mpris_service","last_synced_at":"2025-04-22T18:17:45.042Z","repository":{"id":103705133,"uuid":"459979068","full_name":"alexmercerind/mpris_service","owner":"alexmercerind","description":"🎹 D-Bus MPRIS for GNU/Linux.","archived":false,"fork":false,"pushed_at":"2023-02-27T12:31:46.000Z","size":68,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T17:35:48.870Z","etag":null,"topics":["d-bus","dart","harmonoid","mpris"],"latest_commit_sha":null,"homepage":"https://github.com/harmonoid","language":"Dart","has_issues":false,"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/alexmercerind.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-02-16T11:40:33.000Z","updated_at":"2024-09-21T19:11:04.000Z","dependencies_parsed_at":"2024-01-16T18:40:32.931Z","dependency_job_id":"971f18ce-c0e5-473b-8316-68a0ca806b61","html_url":"https://github.com/alexmercerind/mpris_service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmercerind%2Fmpris_service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmercerind%2Fmpris_service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmercerind%2Fmpris_service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmercerind%2Fmpris_service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexmercerind","download_url":"https://codeload.github.com/alexmercerind/mpris_service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250296275,"owners_count":21407037,"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":["d-bus","dart","harmonoid","mpris"],"created_at":"2024-08-01T12:01:21.849Z","updated_at":"2025-04-22T18:17:45.011Z","avatar_url":"https://github.com/alexmercerind.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# [package:mpris_service](https://github.com/alexmercerind/mpris_service)\n\nA package to integrate [Media Player Remote Interfacing Specification (MPRIS)](https://specifications.freedesktop.org/mpris-spec/latest/) in Dart.\n\u003cbr\u003e\u003c/br\u003e\n\n![Screenshot from 2022-12-26 07 23 01](https://user-images.githubusercontent.com/28951144/209481093-a067d628-0911-484c-9684-0924e834613a.jpeg)\n\nThis package makes use of [`package:dbus`](https://pub.dev/packages/dbus) internally. Following interfaces have been implemented:\n\n- [org.mpris.MediaPlayer2](https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html)\n- [org.mpris.MediaPlayer2.Player](https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html)\n\n## Example\n\n```dart\nfinal instance = await MPRIS.create(\n  busName: 'org.mpris.MediaPlayer2.harmonoid',\n  identity: 'Harmonoid',\n  desktopEntry: '/usr/share/applications/harmonoid',\n);\ninstance.setEventHandler(\n  MPRISEventHandler(\n    playPause: () async {\n      print('Play/Pause');\n      instance.playbackStatus =\n          instance.playbackStatus == MPRISPlaybackStatus.playing\n              ? MPRISPlaybackStatus.paused\n              : MPRISPlaybackStatus.playing;\n    },\n    play: () async {\n      print('Play');\n      instance.playbackStatus = MPRISPlaybackStatus.playing;\n    },\n    pause: () async {\n      print('Pause');\n      instance.playbackStatus = MPRISPlaybackStatus.paused;\n    },\n    next: () async {\n      print('Next');\n    },\n    previous: () async {\n      print('Previous');\n    },\n  ),\n);\ninstance.metadata = MPRISMetadata(\n  Uri.parse('https://music.youtube.com/watch?v=Gr6g3-6VQoE'),\n  length: Duration(minutes: 3, seconds: 15),\n  artUrl: Uri.parse(\n    'https://lh3.googleusercontent.com/jvgMIjgbvnqnwLwjtqNa0euo9WStdIxrJnpQURgbwuPazT2OpZUdYPZe1gss2fK39oC8ITofFmeGxKY',\n  ),\n  album: 'Collage',\n  albumArtist: ['The Chainsmokers'],\n  artist: ['The Chainsmokers', 'Phoebe Ryan'],\n  discNumber: 1,\n  title: 'All We Know',\n  trackNumber: 2,\n);\n```\n\n## License\n\nCopyright © 2021 \u0026 onwards, Hitesh Kumar Saini \u003c\u003csaini123hitesh@gmail.com\u003e\u003e\n\nThis project \u0026 the work under this repository is governed by MIT license that can be found in the [LICENSE](./LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmercerind%2Fmpris_service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexmercerind%2Fmpris_service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmercerind%2Fmpris_service/lists"}