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

Projects
None yet
2 participants
@danielkza
Contributor

danielkza commented Jan 24, 2015

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.

cli: add option to server streams externally without a player
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

This comment has been minimized.

Show comment
Hide comment
@danielkza

danielkza Jan 24, 2015

Contributor

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?

Contributor

danielkza commented Jan 24, 2015

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

Merge pull request #699 from danielkza/external-http
cli: Add option to server streams externally without a player

@chrippa chrippa merged commit 0a64c32 into chrippa:develop Jan 25, 2015

1 check failed

continuous-integration/travis-ci The Travis CI build could not complete due to an error
Details
@chrippa

This comment has been minimized.

Show comment
Hide comment
@chrippa

chrippa Jan 25, 2015

Owner

Thanks!

Owner

chrippa commented Jan 25, 2015

Thanks!

@danielkza

This comment has been minimized.

Show comment
Hide comment
@danielkza

danielkza Jan 25, 2015

Contributor

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

Contributor

danielkza commented Jan 25, 2015

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

@danielkza

This comment has been minimized.

Show comment
Hide comment
@danielkza

danielkza Jan 25, 2015

Contributor

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

Contributor

danielkza commented Jan 25, 2015

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

@chrippa

This comment has been minimized.

Show comment
Hide comment
@chrippa

chrippa Jan 25, 2015

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@danielkza

danielkza Jan 25, 2015

Contributor

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.

Contributor

danielkza commented Jan 25, 2015

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