-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Airplay plugins #73
Comments
+1. Provides a place for useful non-core contributions to go. Could distribute these in a third gem, airplay-plugins, from the same git repo. |
Since Ruby modules and classes are open, the plugin can just register itself. Maybe provide media type and url hooks? I'm thinking of client code like this: require 'airplay'
require 'airplay/plugins/youtube'
airplay.play 'youtube://youtubeurl' |
I tend to hate automagic stuff but I have to say that this solutions seems pretty clean. |
I'm not totally sold on the protocol part. There are times when that's a good indicator, like |
Yep. It's a tough call. Maybe leaving it like an explicit load is enough for now. require "airplay"
module Airplay::Plugins::Youtube
def play(url, options = {})
# Fetches the mp4 version of the video
"correct_mp4_url"
end
end
Airplay.plugin Airplay::Plugins::Youtube
Airplay["Apple TV"].play("http://youtube.com...") Or something like that. |
Sure, but how does the plugin know to capture that call to Maybe plugins get to register a play hook that can do a regex against the url? If calling the plugin simply monkey-patched in a new version of |
A middleware callstack. Every registered plugin that has a
Again... thinking out loud here 😃 |
Yes, that's what I'm thinking, too! This would also solve the transcoding problem. A plugin could match on known-incompatible media urls, set up a transcode chain, and pass an IO handle or alternate local service port to the next in the stack. |
😂 Awesome. I love being in the same page!. |
I was thinking about adding a plugin system for
airplay
.Something like:
Or something like that.
The idea is to allow a middleware stack to be executed. The plugins can implement their own
play
andview
to allow operations like get the source youtube video or apply a filter to the image.This could open the door for customizations in the flow and a prettier
CLI
.What do you guys think?
The text was updated successfully, but these errors were encountered: