[TIMOB-7629] Android: VideoPlayer doesn't crop correctly when borderRadius is set
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-07-10T22:23:32.000+0000 |
Affected Version/s | Release 1.8.0.1, Release 3.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | parity |
Reporter | Arthur Evans |
Assignee | Ingo Muschenetz |
Created | 2012-02-13T10:18:56.000+0000 |
Updated | 2017-07-10T22:23:32.000+0000 |
Description
The video player content does not respect the borderRadius setting. If the video content is scaled such that it doesn't cover the corners, you can see the radiused borders. However, if the video is scaled to fill the view, it fills to the corners and ignores the radius.
On iOS, if borderRadius is specified, the corners are also clipped to fit the radius.
Expected behavior: video should be clipped such that the borders are visible.
Test case:
var vidWin = Titanium.UI.createWindow({
title : 'Video View Test',
backgroundColor : '#fff'
});
var activeMovie = Titanium.Media.createVideoPlayer({
top : 0,
autoplay : true,
backgroundColor : 'red',
height : 300,
width : 300,
borderRadius : 20,
borderWidth : 2,
borderColor : 'blue',
mediaControlStyle : Titanium.Media.VIDEO_CONTROL_EMBEDDED,
scalingMode : Titanium.Media.VIDEO_SCALING_MODE_FILL
});
activeMovie.url = 'movie.mp4';
if(activeMovie.fullscreen === true) {
activeMovie.show();
} else {
vidWin.add(activeMovie);
}
vidWin.open();
Note that when running this on Android, the video fills the view completely and no borders are visible.
On iOS, the video is cropped to a rounded square, with a blue border.
The problem reproduces with release 3.0.2 and master release 3.1.0 tested on Titanium Studio, build: 3.0.2.201302191606 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 Device: Samsung galaxy s duos Android version: 4.0.4 Android Emulator: Android SDK version: 2.2 iOS iPhone Simulator: iOS SDK version: 6.0 It works fine on IOS iphone simulator
Closing ticket due to time passed and lack of progress for a number of years. Please open a new ticket if there are any problems.