-
Notifications
You must be signed in to change notification settings - Fork 31
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
Video recording not working on Android #23
Comments
I am also having the same problem on Android 10 atleast it does not record and falls back to "some/file/path" as the result of any recording. |
@rbenzing that sounds like you haven't enabled the plugin in your Android app so it's falling back to the web simulation. In // ...
import com.github.sbannigan.capacitor.VideoRecorder;
// ...
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
// Additional plugins you've installed go here
add(VideoRecorder.class);
}});
// ...
}
} |
@disbelief thanks for the quick response. I am actually using Ionic with Capacitor to build the android app. Do i include it at the app.module.ts? or in the component module.ts? |
@rbenzing sorry I have no experience with the Ionic framework. I have only used Capacitor standalone. |
So as you mentioned adding this directly to my Android project worked. I can record and return the video url successfully. The file is located below for anyone else having this problem.
Thanks Again! |
@rbenzing I'm intending on using this plugin soon. Can you confirm whether it works now on Android and iOS please? |
Please try and keep comments relevant to bug reports. Aside from that I cant say for iOS yet but I did get it working on Android. |
Rb
Please can you help me with a code snippet of you ionic HTML and Page.ts file. I can see the camera on my app but it doesn't record |
I have the same issue. Its not working on Android, also after downgrading below V5 |
I tried this more up to date approach to register the plugin:
Also this does not seem to work. I do not receive a proper video URL after recordning. |
I'm posting this to hopefully save people's time, as I've been down a rabbit hole with this plugin for a while now.
The current version, as far as I can tell, does not work on Android. The video preview displays correctly, and all the functionality that can be tested in the Android emulator works. However the emulator does not actually record video or store it to the device.
On a real device, the
startRecording
call crashes. The crash appears to be originating in thefancycamera
library this plugin uses. I have tested on two separate devices with different Android versions and the same error is present.I have filed an issue in that library with further details about the crash: triniwiz/fancycamera#9
The text was updated successfully, but these errors were encountered: