ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

How can I get the camera angle from SphericalGLSurfaceView?

Open irvine5k opened this issue 2 years ago • 1 comments

I'm trying to build a camera angle indicator for a 360º video, in other words, showing the direction a user is looking at when panning.

image

In Swifty360Player for iOS, I have the [compassAngle], does ExoPlayer has something similar?(https://github.com/abdullahselek/Swifty360Player/blob/master/Swifty360Player/Swifty360CameraController.swift#L171)

irvine5k avatar Aug 27 '22 17:08 irvine5k

Not entirely sure which value you'd need, but it's likely the deviceRoll value here: https://github.com/google/ExoPlayer/blob/ab4d37f499ba49bb3cac7938eb03ebf7133ccfe6/library/core/src/main/java/com/google/android/exoplayer2/video/spherical/SphericalGLSurfaceView.java#L279

There isn't a way to retrieve this value at the moment, but happy to accept PRs if you like to send one.

tonihei avatar Sep 06 '22 11:09 tonihei

@tonihei Hey! Could you please tell how this value will help to find out the angle of the camera? what is the connection between deviceRoll value and direction?

ViolettaKoren avatar Dec 22 '22 12:12 ViolettaKoren