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

Integrate ExoPlayer with Anvil layouts? #91

Open
DavidMihola opened this issue Dec 9, 2016 · 1 comment
Open

Integrate ExoPlayer with Anvil layouts? #91

DavidMihola opened this issue Dec 9, 2016 · 1 comment

Comments

@DavidMihola
Copy link

Hi,

one reason that has kept me from trying Anvil out more is that almost everything I've worked on in the last year has included video playback with Google's ExoPlayer.

In case you are not familiar with it, ExoPlayer does not provide any Views itself but is instead attached to either a SurfaceView or a TextureView into which it then renders the video frames.

Do you have any ideas how one would integrate this in an Anvil layout? Is there a way to do it directly or do you think we'd need to wrap ExoPlayer and it's SurfaceView in some View of our own and then use that in Anvil?

Thanks for any suggestions!

David

@I60R
Copy link

I60R commented Dec 29, 2016

override fun view() {
    textureView {
        val view: TextureView = Anvil.currentView()
        // instanceOfPlayer.renderInto(view)       <—— should work
    }
}

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

No branches or pull requests

2 participants