Skip to content

Commit

Permalink
Document WebView position quirk
Browse files Browse the repository at this point in the history
  • Loading branch information
menelike authored and saghul committed Sep 29, 2016
1 parent ada8582 commit 3b24a5e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/videoCSS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,21 @@ Supported CSS properties are:
**Note**: if the specified z-index is < 0 (that, is, the video elements will be positioned "behind" the web view), you should specify the
`<body>` `background-color` as `transparent` so the video element will be seen through the web view. This makes it possible to position
HTML elements on top of the native video elements.

## Quirks

### Position of the `Webview` element does not match the corresponding `video` element

In some cases iOS adds offsets to the `Webview` element. As a result the coordinates between the `video` element and it's corresponding `Webview` element are unsync.
This happens when the status bar is shown. This can be fixed through disabling the statusbar in two ways:

* at runtime through [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar)

* permanently through editing the project `.plist` like

```xml
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
```

0 comments on commit 3b24a5e

Please sign in to comment.