Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25916] iOS: Ti.UI.VideoPlayer ignores changes to the "scalingMode" property

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-05-15T07:43:21.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.3.0
ComponentsiOS
Labelsios, videoplayer
ReporterAndrea Jonus
AssigneeHans Knöchel
Created2018-03-30T11:09:38.000+0000
Updated2018-06-21T16:43:49.000+0000

Description

When I try to change the property "scalingMode" of Ti.UI.VideoPlayer, the player ignores any constant and defaults to Ti.Media.VIDEO_SCALING_RESIZE ("AVLayerVideoGravityResize"). This happens both at creation time and at runtime. Test case: index.js
$.index.open();
index.xml
<Alloy>
	<Window class="container">
		<VideoPlayer class="video" />
	</Window>
</Alloy>
index.tss
".container": {
	backgroundColor:"#333"
}
".video": {
	width: 200,
	height: 300,
	scalingMode: Ti.Media.VIDEO_SCALING_RESIZE_ASPECT_FILL,
	url: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
}
Expected result: the video is cropped to fill the defined size, keeping the aspect ratio. Actual result: the video is resized and stretched to fill the defined size.

Attachments

FileDateSize
Screenshot 2018.03.30 13.04.51.png2018-03-30T11:09:02.000+00001016978

Comments

  1. Hans Knöchel 2018-03-30

    Community PR (thanks [~ajonus]!): https://github.com/appcelerator/titanium_mobile/pull/9973 Test-Case: See above
  2. Samir Mohammed 2018-06-21

    *Closing ticket.* Fix can be seen in SDK Version: 7.3.0.v20180618182516 *FR (Passed) Test Steps:*

    Created an application using the code above

    Ran the program

    Pressed play on the Video Player

    Able to see that video was cropped to fill the defined size, keeping the aspect ratio

    *Test Environment*
       APPC Studio: 5.0.0.201712081732
       APPC CLI: 7.0.4
       iphone 6 11.2 emulator
       Operating System Name: Mac OS High Sierra
       Operating System Version: 10.13
       Node.js Version: 8.9.1
       Xcode 9.2
       

JSON Source