mirror of
https://github.com/koel/koel.git
synced 2026-04-25 00:36:03 +03:00
[GH-ISSUE #935] Chromecast Backend - Working Proposal #602
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#602
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kellertobias on GitHub (Mar 17, 2019).
Original GitHub issue: https://github.com/koel/koel/issues/935
Hey guys.
I have written a simple Chromecast Backend for Koel (At the moment, there is no UI for that).
The backend requires to run in the same network as the chromecast (as the Streaming ocntrol happens via mDNS).
The application logs in to the Koel api and fetches the playlists. Then you can select one playlist to play. The playback will loop the given playback on the given chromecast.
https://gist.github.com/kellertobias/66825b25e7f3435aec5f09255caa3c6a
Would be cool if something like that could be part of the main application.
@kellertobias commented on GitHub (Mar 29, 2019):
I now have written a simple library that is able to queue a list of songs in a playback queue for chromecast. I am trying to integrate it with koel.
@kellertobias commented on GitHub (Mar 30, 2019):
@phanan I've finished my chromecast implementation. It is based on the last release (v3.7.2) and can't do all the things koel can do; but you can shuffle a playlist, play, pause, next and prev. And it shows which song is currently playing. And because I use the google queue instead of the koel queue, you can also close the browser window while playing.
It is client only and my code is kind of hacky (I am usually writing react with coffeescript and am not familiar with vue), but works. As it uses the default media receiver in the chromecast, you dont need a google developer account and you also can do multi room audio with it out of the box.
I have written a wrapper around the most critical chromecast functions. Check out http://cc.music.kellertobi.de/js/sender.js (or http://cc.music.kellertobi.de/source/sender.coffee for the source).
after Initializing the cast framework and loading the player, you can use it
(in the index.html)
In the vue code, I basically have done the following:
components/shared/song-list-controls.vue: Add a button that triggers the cast-dialog by callingcastPlayer.connect()components/site-footer/index.vue, I added in thecreatedmethod some code that registers an update handler (see Update Handler below) - dont forget to import configservices/playback.jsI hooked every function that handles the queue (pause, resume, playNext, etc) to call the castPlayer method if the cast is castingplayback.jsI hooked the command that plays a queue (see hook queue below)Update Handler (sorry for the bad code style; Have written this while learning vue, struggling with JS (vs Coffee) and f**ing with the chromecast api)
hook queue (add before the Vue.nextTick)
@phanan commented on GitHub (Apr 7, 2019):
@kellertobias Thanks for the great work! Unfortunately I'm not familiar with Chromecast and its development, so I'm afraid I won't be able to provide any feedback. I'm leaving this issue open though, so that whoever interested in the topic can join force :)
@warpdesign commented on GitHub (Jan 21, 2022):
I stumbled upon this issue and am wondering what's missing to make a PR to add Chromecast support to Koel?
@kellertobias Do you have a branch with your code changes? (your sender links appear to be broken
@kellertobias commented on GitHub (Jan 21, 2022):
nope. using Apple Music in the meantime.
@warpdesign commented on GitHub (Jan 21, 2022):
That's too bad. Would you have some source code left somewhere so that I don't have to restart from scratch?
@kellertobias commented on GitHub (Jan 21, 2022):
Nope. I have changed my git server twice in the meantime and that is an old project that never went with.