Skip to content
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

cli: add option to server streams externally without a player #699

Merged
merged 1 commit into from
Jan 25, 2015

Conversation

danielkza
Copy link
Contributor

Add an option to the CLI name --player-external-http, to start an HTTP
server like --player-continuous-http, but without starting a
corresponding player, and streaming to all available interfaces instead
of just the loopback.

This can be useful to stream to devices like smartphones or streaming
boxes, while making use of the better compatibility and performance of
livestreamer.

An accompanying --player-external-http-port option was added to allow
people behind firewalls to add their exceptions only once.

When starting livestreamer in this mode, URLs for the server will be
printed instead of a player being started. Those are detected based
on the IPv4 addresses returned by calling
socket.getaddrinfo(socket.gethostname(), ...), which will work for sure
on UNIX platforms, and should on Windows as well (actual testing
pending), in addition to 127.0.0.1.

Add an option to the CLI name --player-external-http, to start an HTTP
server like --player-continuous-http, but without starting a
corresponding player, and streaming to all available interfaces instead
of just the loopback.

This can be useful to stream to devices like smartphones or streaming
boxes, while making use of the better compatibility and performance of
livestreamer.

An accompanying --player-external-http-port option was added to allow
people behind firewalls to add their exceptions only once.

When starting livestreamer in this mode, URLs for the server will be
printed instead of a player being started. Those are detected based
on the IPv4 addresses returned by calling
socket.getaddrinfo(socket.gethostname(), ...), which will work for sure
on UNIX platforms, and should on Windows as well (actual testing
pending), in addition to 127.0.0.1.
@danielkza
Copy link
Contributor Author

It seems there's something wrong with Travis, it's failing to fetch packages before even starting the tests. Is an apt-get update missing?

chrippa added a commit that referenced this pull request Jan 25, 2015
cli: Add option to server streams externally without a player
@chrippa chrippa merged commit 0a64c32 into chrippa:develop Jan 25, 2015
@chrippa
Copy link
Owner

chrippa commented Jan 25, 2015

Thanks!

@danielkza
Copy link
Contributor Author

Cool, did you get to test it on Windows and/or OS X?

@danielkza
Copy link
Contributor Author

It seems I broke player-continuous-http, I'll push a new commit fixing it (sorry!).

@chrippa
Copy link
Owner

chrippa commented Jan 25, 2015

Cool, did you get to test it on Windows and/or OS X?

No, I don't have access to any machines with those OSes currently. But the socket API should work fine on those OSes.

It seems I broke player-continuous-http, I'll push a new commit fixing it (sorry!).

No problem, I've already got a fix in my local repo that i'll push in a minute.

@danielkza
Copy link
Contributor Author

I pushed a fix as well, it just corrected the default value for the port parameter. I also updated the docstrings for the HTTP functions a bit to match the changes.

edit: Apparently there is no way to update merged pull requests. Annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants