-
Notifications
You must be signed in to change notification settings - Fork 78
#10 fix #49
base: main
Are you sure you want to change the base?
#10 fix #49
Conversation
…ntok into issue-10-fix # Conflicts: # www/opentok.js
@msach22 This one is in WIP |
@msach22 Removed WIP, should all be fixed now. |
@wolfenrain @mark-veenstra have you noticed any performance issues or lagging with this scrolling solution? AFAIK, the |
@msach22 only on iOS we experienced the issue that the On Android it worked without any other addition. |
@msach22 that is correct. This PR contains the new Also put the PR back to WIP because there are a few more things I need to be sure about before we merge. |
…ntok into issue-10-fix # Conflicts: # build-extras.gradle
@msach22 I removed the WIP, ready for merge. |
…entok into issue-10-fix
@msach22 Can we get this one out? Maybe in a |
@wolfenrain @mark-veenstra Yes, let's aim to get to this out in the next feature release. I'll review this PR in the upcoming week. |
@msach22 @mark-veenstra According to this blog post by Cordova, the WKWebview is gonna become the default in new iOS platform version(5). Considering that its related to this issue, because its added as a dependency, I thought it would be useful to reference it here. |
Also asked a question about this plugin and the new bridge within the |
Fix for some changes in #10
General:
Changed the way how scrolling of native elements work. We add a scroll EventListener to the document. And then on scroll we check if the scrolling target contains video-elements with the
data-stream-id
property. If so then we send the position(relative to the viewport, changed in thegetPosition
) of the video-element with the stream-id to the native side to update its position.By doing this JavaScript implementation, we are now capable of scrolling multiple native video-views, independently within their own HTML parent. Which wasn't possible before using native scrollviews.
There are also some changed that are platform specific.
Android:
iOS:
cordova-plugin-wkwebview-engine
as its main WebViewEngine, because the default from Cordova is the UIWebView, and it stops javascript-execution while you are scrolling. This dependency is only needed until Cordova implements the wkwebview self.cordova-plugin-statusbar
is loaded. Because that plugin changes the origin position of the webview. Normally the top position is 0 and its below the statusbar. But that means that the native views should have 20 pixels more. Otherwise they will be on top of the statusbar. But when the StatusBarPlugin is loaded, the top position of the webView is on top of the statusbar(still 0). So a small ifstatement is made to check if we should add a small offset or not.Those are in general the major/important changes.