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

Play HLS with Exoplayer on Android #6606

Merged
merged 10 commits into from
Aug 24, 2020

Conversation

uvjustin
Copy link
Contributor

@uvjustin uvjustin commented Aug 12, 2020

See also: home-assistant/core#38125 & home-assistant/android/pull/739
H.265 videos are not supported through Chromium or Webview on Android. We can work around this for Android by using Exoplayer which supports H.265 if the codecs are available on the device. This PR uses the externalApp interface to test whether Exoplayer is available from the config and uses the interface to send the requests to Exoplayer if available. I will open another PR on the Mobile App repository to implement the Exoplayer interface on the Android side.

Proposed change

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@uvjustin uvjustin force-pushed the use-exoplayer-for-stream branch 3 times, most recently from 011a375 to 8965da2 Compare August 12, 2020 17:07
@uvjustin uvjustin marked this pull request as ready for review August 12, 2020 17:14
@uvjustin uvjustin force-pushed the use-exoplayer-for-stream branch 7 times, most recently from 7e0be93 to 8f88ef8 Compare August 15, 2020 12:56
@bramkragten
Copy link
Member

I'm not familiar with ExoPlayer and the Android part, so can't really judge it, but not sure this is something we want to support...

@uvjustin
Copy link
Contributor Author

I'm not familiar with ExoPlayer and the Android part, so can't really judge it, but not sure this is something we want to support...

I think this is the easiest way to get H.265 playing in app. Otherwise Android users are SOL if they want to use H.265. If the client doesn't support it (another platform, browser, or app) it just reverts to the usual functionality. Adding this might seem excessive for just one additional bit of functionality on one component, but I think it's a pretty important function as many cameras are moving to H.265 and the codec affords a significant bandwidth reduction over H.264.
Maybe some others can weigh in on this? To try it out you have to use this PR together with the PR on the android app.

package.json Outdated Show resolved Hide resolved
Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 final comments. Rest looks good.

@balloob balloob merged commit d263b19 into home-assistant:dev Aug 24, 2020
@bramkragten bramkragten mentioned this pull request Aug 24, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants