Commit Graph

14 Commits

Author SHA1 Message Date
Jared Forsyth e4c8dab2ae feat(onScroll): Add `onScroll` callback for iOS & Android (#516)
* Add `onScroll` callback for iOS & Android

This code was mostly extracted from https://github.com/react-native-community/react-native-webview/pull/202

I tried and tried to make it work with `Animated.event`'s `useNativeDriver`, but I was unsuccessful 😢 that'll have to be done later once I understand better how Animated's native stuff is hooked up.

* fix crash for missing onScroll
2019-05-17 00:27:16 +02:00
Daniel Vicory d72c2ae144 feat(fullscreen videos): Support fullscreen video on Android (#325)
* Extract WebChromeClient from an anonymous class

* Support fullscreen videos on Android

Forces landscape mode while playing.

* Use sticky immersive mode for fullscreen videos

No longer forces landscape mode as that is a problem for portrait videos - allow
the user to rotate as necessary.

Only supports KitKat or greater, and falls back to leaving the status and navigation
bars visible for lower than KitKat. This is the easiest way to prevent issues with
resizing the video during playback.

Also implement a lifecyle event listener which means if a user backgrounds the app
or locks the screen with the video fullscreen, the UI visibility is re-applied.

* Add allowsFullscreenVideo prop to control whether videos can be fullscreen on Android

Luckily, we're able to change the WebChromeClient on demand in response to prop changes
without seeming to do any harm. If you switch to disallow fullscreen, it will attempt
to close the currently fullscreened video (if there is one) so users aren't stuck.

I did notice a bug that if you go from fullscreen allowed, to fullscreen disallowed,
the fullscreen button will remain on the video. Tapping the button will have no effect.
2019-05-17 00:22:08 +02:00
Eric Lewis 455c30e000 feat(WKWebView): Allow focus without user interaction (#540)
* [iOS] Allow focus without user interaction

* Add documentation for keyboardDisplayRequiresUserAction

* set keyboardDisplayRequiresUserAction default to true
2019-04-29 17:46:07 +02:00
manuelblum 5892601c29 fix(types): wrong parameter type in onLoadProgress (#538)
WebViewProgressEvent musst be wrapped within NativeSyntheticEvent
2019-04-29 09:45:15 +02:00
SebiVPS cdbfc19cd2 feat(iOS cookies): implement sharedCookiesEnabled prop for iOS RNCWKWebView (#175)
We had the problem on iOS WebViews that local cookies (stored in local HTTPCookieStorage, set with  [react-native-cookie](https://github.com/shimohq/react-native-cookie) ) were not added in loadRequests. On Android the local stored cookies were sent like expected.
This kinda "hacky" solution is the only way we found, that works for us.
The stack overview link is in the code below.
If someone finds a better solution we would very much like to accept that.
2019-04-15 10:19:10 +02:00
Max Schmeling 5ec74ea9bb fix(styles): Removes hard-coded container white backgroundColor (#478)
Fixes #475

#472 added a `backgroundColor` of `white` to the `container` style which broke the ability to set a `transparent` background color on the `WebView` component. This simply removes that unnecessary style.
2019-04-04 19:44:01 +02:00
Thibault Malbranche 91eb7ce3d1
fix(styles): removed unneeded display: 'none'
fixes #473
2019-04-03 10:19:43 +02:00
Thibault Malbranche 319a86e236
feat(android): fix overflow issues and match iOS default renders (#472)
fixes #466 #194

* feat(android): fix overflow issues and match iOS default render error and loading behaviour

* Use babel preset typescript through react-native instead of ts-jest

* Update yarn.lock

* Update README.md
2019-04-02 16:05:56 +02:00
mr.sadvit 82fe6e2c3d feat(android): textZoom prop to limit scaling issues (#414)
When setting a custom font size in the Android system, an undesirable scale of the site interface in WebView occurs.

I researched that when setting the standard textZoom (100) parameter size, this undesirable effect disappears.

This can be very useful if you need to avoid the scale of content in WebView when changing the size of system fonts, or change textZoom property directly.

Example:

`
<WebView
  textZoom={100}
/>
`
2019-03-28 09:52:18 +01:00
Scott Beca 0f9b770186 Make WebViewSourceHtml.baseUrl optional (#454) 2019-03-26 11:07:51 +01:00
Thibault Malbranche 453b7dd3a0
feat(typescript): Source code rewrite using typescript (#425)
Rewrote the whole repository into typescript. This will provide way better and up to date documentation. This should also add some safety for people contributing 😄 .
Flow types were not working until now which is why this PR doesn't have them but feel free to PR.

This also fixes #384 #435 #206 #171 #168.
2019-03-20 12:35:13 +00:00
Jamon Holmgren af0057a321 Reshuffling 2018-08-02 21:41:20 -07:00
Jamon Holmgren ee3d296d33 WIP: iOS working 2018-07-30 22:34:16 -07:00
Jamon Holmgren be9c217dfe Initial 2018-07-30 20:21:48 -07:00