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

Rotating EMVideoView #41

Closed
notsatyarth opened this issue Dec 3, 2015 · 17 comments
Closed

Rotating EMVideoView #41

notsatyarth opened this issue Dec 3, 2015 · 17 comments

Comments

@notsatyarth
Copy link

Is there any way that i can rotate the video view without sufferring from state loss?
I've tried using setRotation and also from xml.
I am show an EMVideoView in a dialog fragment and would like to rotate that by 90 degrees. However I just get a transparent background instead of a video then.
Is there a correct way to rotate ? Is rotation possible?

@notsatyarth notsatyarth changed the title Rotating EMVideoDiew Rotating EMVideoView Dec 3, 2015
@brianwernick
Copy link
Owner

The current demo app correctly handles device rotation when playing a video. Your problem sounds like an issues with the dialog fragment. Possibly related to http://stackoverflow.com/questions/14657490/how-to-properly-retain-a-dialogfragment-through-rotation

@notsatyarth
Copy link
Author

Sorry I was not clear enough.I have a portrait activity where I have am trying to open a Dialog fragment where by rotating the EMVideView by 90,i plan to make it look like landscape.Is that possible?

@brianwernick
Copy link
Owner

Not currently (and I don't plan on adding it in the future since it is a very small edge case). You might be able to do something similar to what is described in http://stackoverflow.com/questions/8586526/rotating-an-android-videoview

@notsatyarth
Copy link
Author

Can i get a reference to the VideoView used here?

@brianwernick
Copy link
Owner

Sorry, I'm not sure what you are asking?

@notsatyarth
Copy link
Author

in EMVideoView can i get a reference to the underlying view to rotate it.Or is it not possible with EMVideoView?

@brianwernick
Copy link
Owner

Oh, you would probably need to modify the exoVideoSurfaceView (https://github.com/brianwernick/ExoMedia/blob/master/library/src/main/java/com/devbrackets/android/exomedia/EMVideoView.java#L239). However, this would require modifications to the layouts referenced in initView which is private. So when I get a little time I will update method availabilities to protected and maybe re-structure a little to help with any custom video layouts like this

@notsatyarth
Copy link
Author

OK thanks,Feel free to close the issue if its out of scope .Thank you 👍 :)

@notsatyarth
Copy link
Author

Also ,I do not want to open an issue for something this trivial hence asking here.But I cannot play webm videos on a Samsung API 17 phone. Is that possible? Or am i doing something wrong. Only audio plays while there is no video.

@brianwernick
Copy link
Owner

Hmm, webm should work :/

I'll see if I can get any webm to play on my devices this weekend (I haven't tested it in a while)

@notsatyarth
Copy link
Author

And if a video does not play,is there a callback that I can receive and choose an alternating format.
Also maybe get a list of the possible formats?

@brianwernick
Copy link
Owner

Sorry; I haven't forgotten about this, I've just been pretty busy with work lately. It looks like it may be closer to the new year when I can get around to any issues :(

@notsatyarth
Copy link
Author

No issues.Thank you for the library :).
Also do let me know if you need any help in maintaining.

@brianwernick
Copy link
Owner

I just tried webm again and it plays without issues on my Nexus devices (and the new emulator) [http://video.webmfiles.org/big-buck-bunny_trailer.webm]

@brianwernick
Copy link
Owner

I'm going to close this as WEBM is currently working (there are updates that will be in 2.5.0 that should fix a few minor playback issues). The method availability changes will be in the next major release (3.0) since I'm making other architectural changes I will wait until then.

@brianwernick
Copy link
Owner

As far as the original Rotation question goes: I have added the ability to manually specify video rotation in the 3.0 branch. See #159

@notsatyarth
Copy link
Author

Thanks a lot!

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