Closed aks7665 closed 1 year ago
Found out the solution. Need to use rosetta emulator. Just change the settings of Xcode. Product -> Destination -> Destination Architectures -> Select (Show Both)
After that while building the app select rosetta emulator device. For eg. iPhone 14 (rosetta)
Thx @aks7665 for leaving solution and closing the issue.
@hthetiot Hi,
I am facing one more issue. How can I hide/remove the native UIView element. It keeps displaying even after all the tracks are stop. It shows a black screen on the place of video.
The video will be removed once the video tag is removed. The Black is the video itself.
See also:
@hthetiot I think the issue is related to something else.
I am getting a error message in the app: event
must have a valid type
property.
And it is in file Cordova-plugin-iosrtc/www/cordova-plugin-iosrtc.js
My Code: On device ready method, I am doing this:
if (window.device.platform === 'iOS') {
cordova.plugins.iosrtc.registerGlobals();
}
$('body').append('<video id="scannerCameraPreview" class="camera" muted autoplay="autoplay" playsinline="playsinline" webkit-playsinline style="width:100%;height:calc(100vh - 150px);position:absolute;left:150px;top:100px;object-fit:fill; opacity: 1"></video>');
let constraints;
let platform = window.device.platform;
if (platform == "browser") {
constraints = {
video: true,
audio: false
}
} else {
constraints = {
video: { facingMode: { exact: "environment" } },
audio: false
}
}
constraints.video.width = { exact: 1280 };
constraints.video.height = { exact: 720 };
navigator.mediaDevices.getUserMedia(constraints).then(function(stream) {
let camera = $("#scannerCameraPreview");
cordova.plugins.iosrtc.observeVideo(camera);
// Attach local stream to video element
camera.srcObject = stream;
}).catch(function(err) {
console.error('getUserMediaError', err, err.stack);
handle(error, errorCallback);
});
Here my app is going in the catch block throwing that error (event
must have a valid type
property)
Please help me out what am I doing wrong.
Thanks
Here my app is going in the catch block throwing that error (event must have a valid type property)
Can you provide the full error stack using Safari remote debug ? This may be a know issues. Can you also tell me what webrtc framework you use if any, this may help also.
Not sure you need this anymore
cordova.plugins.iosrtc.observeVideo(camera)
@aks7665 feele free to open separate issue if your problems persists.
YOU MUST read first!
Please use Community Forum for general technical discussions and questions.
extra/renderer-and-libwebrtc-tests.js
file).Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed, removing this checkbox will result in automatic closed issue.
Versions affected
Description
I am not able to create the build after adding plugin to my project. Build just get failed with errors.
Getting following errors:
When run the build command in terminal gets the following error:
Steps to reproduce
After installing the plugin. I run "cordova build ios" and while building the app throws error. Same is happening when tries to run app from the Xcode.
Expected results
Build success.
Actual results
Build failing