Closed adenhertog closed 5 years ago
Platform: Android emulator
Versions: CLI: 5.1.0 Cross-platform modules: 5.1.1 Runtimes: 5.1.0 Plugin: nativescript-videorecorder@3.0.0-beta.2 Angular: 7.1.0
Reproduce: Create a new angular component, and try to embed a nativescript-videorecorder view as such: example.component.ts:
nativescript-videorecorder
import { AdvancedVideoView } from 'nativescript-videorecorder/advanced' registerElement('AdvancedVideoView', () => AdvancedVideoView) @Component({ selector: 'ns-example', template: '<AdvancedVideoView></AdvancedVideoView>' }) export class RecordingComponent { }
Expected: Video viewer should render
Actual:
System.err: com.tns.NativeScriptException: System.err: Calling js method onCreateView failed System.err: System.err: TypeError: co.fitcom.fancycamera.FancyCamera is not a constructor System.err: File: "file:///data/data/org.nativescript.example/files/app/tns_modules/nativescript-videorecorder/advanced/advanced-video-view.js, line: 40, column: 15
The line referenced in the error is advanced-video-view.android.js:40, ie:
advanced-video-view.android.js:40
return new co.fitcom.fancycamera.FancyCamera(this._context);
co.fitcom.fancycamera is an empty object ({})
co.fitcom.fancycamera
{}
This wasn't an issue with nativescript-videorecorder in the end but something due in the build chain.
Resolved by:
rm -rf platforms tns platform add android tns run android
Platform: Android emulator
Versions: CLI: 5.1.0 Cross-platform modules: 5.1.1 Runtimes: 5.1.0 Plugin: nativescript-videorecorder@3.0.0-beta.2 Angular: 7.1.0
Reproduce: Create a new angular component, and try to embed a
nativescript-videorecorder
view as such: example.component.ts:Expected: Video viewer should render
Actual:
The line referenced in the error is
advanced-video-view.android.js:40
, ie:co.fitcom.fancycamera
is an empty object ({}
)