문제

When playing back videos on the Samsung Galaxy S4 the video does not recognize the orientation metadata. It always plays on landscape.

The app also records the video and plays correctly on all other devices while streaming. The S4 plays it fine only if the video is stored in the device but it won't work for streaming.

Using MediaPlayer and SurfaceView on a Fragment, not a VideoView.

Have tried to disable Air View, Air Gesture, Smart Stay, Smart Scroll and Auto Rotate without luck.

Also even stored the orientation hint along with the video to rotate manually the element in the layout, but the SurfaceView when rotated using lockCanvas doesn't work and when rotating its parent element goes black and only plays the audio.

Any suggestions I can try to get this bug fixed? Have you experiencing the same when using the S4? Any help on this will be greatly appreciated. Thanks!

도움이 되었습니까?

해결책 2

Found a workaround for this issue. Try using a TextureView instead a SurfaceView, before playing the video, get the rotation info with MetadataRetriever and adjust the TextureView as needed. It worked on this side.

See the details here: Streaming Video Playback Orientation Issue @ Samsung Developers Forum

다른 팁

I asked this question a few months back and haven't heard anything. I would love to know as well.

https://stackoverflow.com/questions/17950072/galaxy-s4-media-player-ignores-rotation-metadata

Edit: This also occurs on the Galaxy Note 3.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top