Gear61 / tcg-android-archive-and-feedback

Code archive of the last local Tech Career Growth Android app
32 stars 6 forks source link

Feature/youtube-full-screen #19

Closed prnvptl closed 2 years ago

prnvptl commented 2 years ago

Closes #18

Enables Youtube video full screen with a clean UX

After trying many solutions, I managed to stitch this one together which uses a custom chrome web client and overrides onShowCustomView and onHideCustomView which in turn, implements hiding and showing a full-screen video. Refactored some code in the WatchContentFragment.

Alternate solutions: 1) Youtube Video Player API: costs $ after 10K queries / day. implementation is possible but cumbersome and will require more effort

2) android-youtube-player Allows for ALOT of customizability, however seems like overkill for now, and would also require much more effort to even get a simple web view working like the current web view. A simple solution of showing full screen would just be to show a button outside of the web view. not the best UX.)

Sources:

Screen Shot 2022-02-17 at 10 40 52 PM

Screen Shot 2022-02-17 at 10 41 19 PM

Gear61 commented 2 years ago

Awesome pull request, thanks for sharing 😄