Skip to content

Commit

Permalink
fix(android): default to newer scalingMode constant default value
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtcoolguy committed Nov 2, 2020
1 parent 3e88518 commit c151ff0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private void constantDeprecationWarning(int constant)
break;
case MediaModule.VIDEO_SCALING_ASPECT_FIT:
message = String.format(MESSAGE_FORMAT, "Ti.Media.VIDEO_SCALING_ASPECT_FIT",
"Ti.Media.VIDEO_SCALING_RESIZE_ASPECT_FIT");
"Ti.Media.VIDEO_SCALING_RESIZE_ASPECT");
break;
case MediaModule.VIDEO_SCALING_MODE_FILL:
message =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class VideoPlayerProxy extends TiViewProxy implements TiLifecycle.OnLifec
public static final String PROPERTY_SEEK_TO_ON_RESUME = "__seek_to_on_resume__";

protected int mediaControlStyle = MediaModule.VIDEO_CONTROL_DEFAULT;
protected int scalingMode = MediaModule.VIDEO_SCALING_ASPECT_FIT;
protected int scalingMode = MediaModule.VIDEO_SCALING_RESIZE_ASPECT;
private int loadState = MediaModule.VIDEO_LOAD_STATE_UNKNOWN;
private int playbackState = MediaModule.VIDEO_PLAYBACK_STATE_STOPPED;
private int repeatMode = MediaModule.VIDEO_REPEAT_MODE_NONE;
Expand Down
4 changes: 2 additions & 2 deletions tests/Resources/ti.media.videoplayer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ describe('Titanium.Media.VideoPlayer', () => {
}
});

it('defaults to Ti.Media.VIDEO_SCALING_ASPECT_FIT on Android, VIDEO_SCALING_RESIZE on iOS', () => {
it('defaults to Ti.Media.VIDEO_SCALING_RESIZE_ASPECT_FIT on Android, VIDEO_SCALING_RESIZE on iOS', () => {
if (OS_ANDROID) {
should(player.scalingMode).eql(Ti.Media.VIDEO_SCALING_ASPECT_FIT);
should(player.scalingMode).eql(Ti.Media.VIDEO_SCALING_RESIZE_ASPECT_FIT);
} else {
should(player.scalingMode).eql(Ti.Media.VIDEO_SCALING_RESIZE);
}
Expand Down

0 comments on commit c151ff0

Please sign in to comment.