tcking / GiraffePlayer2

out of the box android video player(support lazy load, ListView/RecyclerView and hight performance)
Apache License 2.0
377 stars 110 forks source link

Starting player in full screen directly #141

Closed HazimSharif closed 5 years ago

HazimSharif commented 5 years ago

Hello tcking,

So, i decided to move from GiraffiPlayer to GiraffePlayer2, but i have small issue, In old GiraffePlayer I was playing video directly, and there was an option to start directly in full screen ".setFullScreenOnly(true)", So i need to know what is equivalent to this option in GiraffePlayer2 to only play in full screen.

I tied to set PlayerActivity to landscape, it start in lanscape but not full screen, if i click the full screen button it works, and if i click back button it returns to portrait orientation.

Please advise if there is option to start in fullscreen and work only on full screen landscape orientation.

Thank you

HazimSharif commented 5 years ago

Just a note, I saw you mentioned this in readme

case 1: only want to play a video fullscreen just call GiraffePlayer.play(getContext(), new VideoInfo("video url"));,all is done.

Bu this does not work as VideoInfo does not take a string, so I had to define a VideoInfo object and pass it to VideoInfo.

Thanks,

tcking commented 5 years ago
  1. please using version 0.1.25 api 'com.github.tcking:giraffeplayer2:0.1.25' 2.GiraffePlayer.play(getContext(), new VideoInfo("video url").setFullScreenOnly(true));
HazimSharif commented 5 years ago

Hello Tcking, Thank you for the update, Problem solved, but when i click the full screen button it turn portrait, But anyways i removed the button as i don't need it, so it works perfect.

Thanks a lot,