Bug 58750 - WebView - streched (or zoomed) HTML5 video
Summary: WebView - streched (or zoomed) HTML5 video
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 7.3 (15.2)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-08-14 13:19 UTC by kirilllo
Modified: 2017-10-13 17:36 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Streched player (322.17 KB, image/png)
2017-08-14 13:19 UTC, kirilllo
Details

Description kirilllo 2017-08-14 13:19:55 UTC
Created attachment 24177 [details]
Streched player

We are using Xamarin native and we are wrapping website with html5 video player. Web page looks fine, but the player is extremely stretched. I can see only left part of it, but the right part (with FULLSCREEN button) in invisible to me. 
I have checked the same issue using native android (java) and everything is OK. A video player is scaled and fits device screen.

See more details in attached screenshot.

Visual Studio Community 2017 for Mac
Version 7.0.1 (build 24)
Xamarin.Android
Version: 7.3.1.2 (Visual Studio Community)
Comment 1 Jon Douglas [MSFT] 2017-08-14 17:15:16 UTC
(In reply to kirilllo from comment #0)
> Created attachment 24177 [details]
> Streched player
> 
> We are using Xamarin native and we are wrapping website with html5 video
> player. Web page looks fine, but the player is extremely stretched. I can
> see only left part of it, but the right part (with FULLSCREEN button) in
> invisible to me. 
> I have checked the same issue using native android (java) and everything is
> OK. A video player is scaled and fits device screen.
> 
> See more details in attached screenshot.
> 
> Visual Studio Community 2017 for Mac
> Version 7.0.1 (build 24)
> Xamarin.Android
> Version: 7.3.1.2 (Visual Studio Community)

To further investigate this issue, can you please attach two projects to this bugzilla report? 1) The Xamarin.Android project that shows the stretched player, and 2) The Android(Java) project that demonstrates it working just fine? Typically the Xamarin.Android and Android(Java) should be of parity. You can feel free to upload these projects to this bug and I'll investigate further.

Just to ensure you are on the latest version, please update to the latest stable channel if you haven't already.

Thank you!
Comment 2 kirilllo 2017-08-18 10:38:27 UTC
Thank you for your response. We made some investigations and have some strange results. 
When we use Xamarin app (android webiew, not xamarin forms) - the website detects the size of our webview as 1440. But if I will do the same check with the native android (java) app - the website will return the size of 360.
However, if I will check the "width" property of WebView element in C# (Xamarin) and Java (Android) the result will be 360 for both cases.

1440 - the size of device screen in pixels. 
360 - I think this is the screen size in dip.

Can you explain this difference in dimensions? Because of this, we have a lot of problems. A website set the width of his elements to 1440 and that's why they looked stretched in our webwiew. I suppose that webview should return 360 for Xamarin webview as well as for Android webview. 

Thank you for your help.
Comment 3 kirilllo 2017-08-21 09:48:50 UTC
Hi, guys. Any thoughts about my issue?
Comment 4 John Miller [MSFT] 2017-08-21 19:59:52 UTC
(In reply to kirilllo from comment #3)
> Hi, guys. Any thoughts about my issue?

Could you supply the two projects you are using per the request of Jon? This will help us confirm both issues. Thanks!
Comment 5 kirilllo 2017-08-22 12:30:56 UTC
I am sorry, but we have a proprietary app. And I can't give you projects with links to our website (due to restrictions and regulations). I thought that maybe this is the common problem with webview width and you can point me to the solution
Comment 6 Jon Douglas [MSFT] 2017-10-13 17:36:27 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!

Note You need to log in before you can comment on or make changes to this bug.