Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-25314] : iOS camera with overlay view is zoomed #9818

Merged
merged 8 commits into from May 23, 2018

Conversation

vijaysingh-axway
Copy link
Contributor

@ssjsamir ssjsamir self-requested a review February 14, 2018 15:48
@build build added the ios label Feb 14, 2018
@ssjsamir ssjsamir removed their request for review February 14, 2018 17:22
@hansemannn hansemannn modified the milestones: 7.1.0, 7.2.0 Feb 16, 2018
@sgtcoolguy sgtcoolguy modified the milestones: 7.2.0, 7.3.0 May 16, 2018
@ssjsamir ssjsamir self-requested a review May 22, 2018 16:36
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed: Able to see that the camera is no longer zoomed in when an overlay is used which has camera controls enabled. Test case taken from https://jira.appcelerator.org/browse/TIMOB-25314

var overlay = Ti.UI.createView({width: Ti.UI.FILL, height: Ti.UI.FILL});
var closeBtn = Ti.UI.createButton({
width: 40,
height: 40,
backgroundColor: "red",
});
closeBtn.addEventListener("click", function() {
Ti.Media.hideCamera();
});
overlay.add(closeBtn);
 
function onGallery() {
Ti.Media.showCamera({
mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO],
showControls: false,
overlay: overlay,
success:function(e) {
console.log("\n success");
},
cancel: function() {
console.log("cancel");
},
error:function(error) {
console.log("error");
}
});
}
 
function onGalleryOverlay() {
Ti.Media.showCamera({
mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO],
showControls: true,
overlay: overlay,
//transform: Ti.UI.create2DMatrix({scale: 1}),
success:function(e) {
console.log("\n success");
},
cancel: function() {
console.log("cancel");
},
error:function(error) {
console.log("error");
}
});
}
 
function onGalleryWithoutControls() {
Ti.Media.showCamera({
mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO],
showControls: false,
success:function(e) {
console.log("\n success");
},
cancel: function() {
console.log("cancel");
},
error:function(error) {
console.log("error");
}
});
}
 
var win = Ti.UI.createWindow({
backgroundColor: '#fff',
layout: 'vertical'
});
 
var btn1 = Ti.UI.createButton({
title: 'Show Camera with overlay w.o. controls',
top: 50
});
var btn2 = Ti.UI.createButton({
title: 'Show Camera with Overlay with controls',
top: 50
});
var btn3 = Ti.UI.createButton({
title: 'Show Camera w.o Overlay w.o. controls',
top: 50
});
 
btn1.addEventListener('click', onGallery);
btn2.addEventListener('click', onGalleryOverlay);
btn3.addEventListener('click', onGalleryWithoutControls);
 
win.add(btn1);
win.add(btn2);
win.add(btn3);
win.open();

Test steps

  • Created a build from this PR
  • Created a titanium app
  • Added the test case above
  • Ran the program
  • Used the 2nd option Show camera with overlay and controls to record a video
  • Camera was no longer zoomed in as seen previously (e.g. 7.2.0.v20180501104106)
  • Other two options worked as intended

Test Environment
APPC Studio: 5.0.0.201712081732
APPC CLI: 7.0.3
iphone 6 plus (10.2)
Operating System Name: Mac OS High Sierra
Operating System Version: 10.13
Node.js Version: 8.9.1
Xcode 9.2

@build
Copy link
Contributor

build commented May 23, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

@hansemannn hansemannn merged commit e5c1494 into tidev:master May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants