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

Switch useragent to iOS for compatibility #294

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryao
Copy link
Contributor

@ryao ryao commented Dec 15, 2017

Previously, the user agent used was one of these:

ExoPlayerDemo/1.7.7 (Linux;Android 7.0) ExoPlayerLib/2.2.0
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.35 Safari/537.36

The app claimed to be ExoPlayerDemo when trying to display a preview
when adding a channel while it claimed to be Chrome on Windows when
being used as a Live Channel. Neither choice was compatible with one of
the m3u8 streams that my mother likes to watch.

Without the option to set the User Agent per stream, it seems best to
use a single user agent that is broadly compatible, so lets go with the
iOS 11's useragent from the iPhone:

Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1

A better fix would be to make the user agent user configurable and
change the user agent to be customizable per stream, but this suffices
for my mother's purposes.

Also, the project's license is unclear. I had been very hesitant to
upstream a fix to a project without clarification on the license used by
the project. After some soul searching, I have decided to publish this
patch under the terms of either the Apache 2.0 or MIT licenses. If the
project lead wishes to fix the unclear licensing with a different OSS
license, I would likely be happy to follow suit. However, this fix
itself is so small that I doubt it qualifies for copyright protection,
so the license under which I choose to release it is likely a moot point
unless I start sending more patches.

Signed-off-by: Richard Yao [email protected]

Previously, the user agent used was one of these:

ExoPlayerDemo/1.7.7 (Linux;Android 7.0) ExoPlayerLib/2.2.0
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.35 Safari/537.36

The app claimed to be ExoPlayerDemo when trying to display a preview
when adding a channel while it claimed to be Chrome on Windows when
being used as a Live Channel. Neither choice was compatible with one of
the m3u8 streams that my mother likes to watch.

Without the option to set the User Agent per stream, it seems best to
use a single user agent that is broadly compatible, so lets go with the
iOS 11's useragent from the iPhone:

Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1

A better fix would be to make the user agent user configurable and
change the user agent to be customizable per stream, but this suffices
for my mother's purposes.

Also, the project's license is unclear. I had been very hesitant to
upstream a fix to a project without clarification on the license used by
the project. After some soul searching, I have decided to publish this
patch under the terms of either the Apache 2.0 or MIT licenses. If the
project lead wishes to fix the unclear licensing with a different OSS
license, I would likely be happy to follow suit. However, this fix
itself is so small that I doubt it qualifies for copyright protection,
so the license under which I choose to release it is likely a moot point
unless I start sending more patches.

Signed-off-by: Richard Yao <[email protected]>
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

1 participant