sillsdev / appbuilder-pwa

Progress Web App template for Scripture App Builder
https://software.sil.org/scriptureappbuilder
MIT License
8 stars 22 forks source link

Video options #603

Open chrisvire opened 2 weeks ago

chrisvire commented 2 weeks ago

The feature video-youtube-related-same-channel is changed in the Media > Video > Video Settings page:

Image

It looks like we are not accounting for these settings (in config.mainFeatures) as well:

    "video-allow-fullscreen": true,
    "video-show-titles": true,
    "video-full-screen-width": true,
davidmoore1 commented 2 weeks ago

The "Use the full width of the screen" option sets feature "video-full-screen-width". In the Android app, this causes it to override the margin-left and margin-right which are used for the div.video-block style with the values that are set for the body style. In our case, this would be the styles for the #container. So find the left and right margins associated with the container, and set those values as the left and right margins for the video div.

For the "video all full screen" option "video-allow-fullscreen", investigate whether it is possible to do this. For the android app, he only uses this when using a chrome client view (not for the Gecko view, which is the only other option). There is a custom chrome web view that derives from the WebChromeClient. There is an override of onShowCustomView and onHideCustomView that is called when the user presses the full screen button from within the embedded video. In that method, it looks like he creates a view of the same size as the original if they are not allowed to use full screen. I don't know if it is possible to catch the embedded video view button press within PWA, particularly when you have no control of the type of browser being used.