capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

feat: video support for Camera plugin

Open diachedelic opened this issue 4 years ago • 41 comments

Feature Request

Describe the Feature Request

I have used Camera plugin to get photos from the user's media gallery (on Android), and it worked very well - however, I would also like for users to be able to import & capture videos.

Platform Support Requested

  • [x] Android
  • [x] iOS
  • [ ] Electron
  • [ ] Web

Describe Preferred Solution

Camera.getMedia({
  mediaTypes: [CameraMediaType.Photo, CameraMediaType.Video],
  videoQuality: CameraVideoQuality.Medium,
  ...
})

When CameraMediaType.Video and CameraSource.Photos (or should it be CameraSource.Library?) is specified, list videos in the gallery feed alongside photos (like they appear when you use the Samsung Gallery app or similar). Accept video quality parameters similar to UIImagePickerController.QualityType.

Describe Alternatives

Currently I am using <input capture> (see spec) but this is painfully inefficient as the media's binary data must cross the bridge as Base64 (which can take tens of seconds on slower devices). It is also unstable on iOS leading to termination of the webview.

diachedelic avatar Feb 24 '20 01:02 diachedelic

Issues tagged with feature request are closed but tracked for reactions to gauge interest.

jcesarmobile avatar Feb 24 '20 10:02 jcesarmobile

Does the proposed API seem sane? We were thinking of developing this and submitting a PR.

diachedelic avatar Feb 24 '20 23:02 diachedelic

I'd vote for an additional option CameraMediaType.PhotoAndVideo

The camera can both take pics + record video. Why not let the user choose in the camera app what to do? Messaging apps like WhatsApp, etc. do this...

BorntraegerMarc avatar Jul 23 '20 15:07 BorntraegerMarc

I'd vote for an additional option CameraMediaType.PhotoAndVideo

The camera can both take pics + record video. Why not let the user choose in the camera app what to do? Messaging apps like WhatsApp, etc. do this...

I totally agree with one of the above solutions, it would be super: before capacitor 3.0 i'b been using camera-plugin to get both pictures and videos, but now, using capacitor 3.0's camera plugin i'm not able to do it anymore. I've tried the media capture plugin but seems pretty broken with android: I can record the video but I cant access the file from the gallery, so I can't play or share it.

Thanks :)

ciccilleju avatar May 24 '21 19:05 ciccilleju

Any ETA for this?

ibrahimAboelsuod avatar Feb 25 '22 01:02 ibrahimAboelsuod

another shortcoming of capacitor compared to cordova. i need this to migrate across

joeldhenry avatar Feb 28 '22 01:02 joeldhenry

another shortcoming of capacitor compared to cordova. i need this to migrate across

FYI you can use the legacy cordova plugin until they fix that. It's not the cleanest but it works.

ibrahimAboelsuod avatar Feb 28 '22 01:02 ibrahimAboelsuod

thanks @ibrahimAboelsuod although the reason I swapped to capacitor was to avoid all these depreciated community managed plugins :D

joeldhenry avatar Mar 01 '22 04:03 joeldhenry

Any update?

josuelmm avatar May 18 '22 17:05 josuelmm

Just saw a bunch of updated for v4 of the capacitor plugins (is that entreprise only?) but sadly no mention of video support. I think this is going to force me to react native...

https://github.com/ionic-team/capacitor-plugins/releases

santekotturi avatar Jul 04 '22 21:07 santekotturi

now that v4 is out, should this be re-evaluated?

joeldhenry avatar Aug 15 '22 23:08 joeldhenry

Any update on this feature

rinturaj avatar Sep 02 '22 05:09 rinturaj

any update?

Saqib92 avatar Oct 07 '22 08:10 Saqib92

This is also forcing us to use barely maintained community packages instead of the official plugin. I'm sure there are tons of priorities to work on, but this would be a huge win for the Capacitor ecosystem.

ryan-bunkr avatar Oct 14 '22 14:10 ryan-bunkr

If it makes a difference, I'd also like to join the crowd asking for this. We, too, are relying on older, barely maintained, community packages.

ssnielsen avatar Oct 18 '22 12:10 ssnielsen

Looking forward to this feature. Any progress or plans?

jorgsiegel avatar Nov 10 '22 19:11 jorgsiegel

Can we just get any info about this? Is this in plans or anything?

aladinbilalagic avatar Nov 24 '22 22:11 aladinbilalagic

We are also interested in the status of this feature.

fryiee avatar Dec 14 '22 01:12 fryiee

Big News: https://github.com/capawesome-team/capacitor-file-picker as of a few days ago now supports video, images, and files. We are in the process of migrating our code to this plugin now and having great success so far. Big thanks to @robingenz and his team for this win

CC: @fryiee , @ssnielsen, @aladinbilalagic, @jorgsiegel, @Saqib92, @joeldhenry, @skotturi, @diachedelic

AdlerJS avatar Jan 10 '23 16:01 AdlerJS

Big News: https://github.com/capawesome-team/capacitor-file-picker as of a few days ago now supports video, images, and files. We are in the process of migrating our code to this plugin now and having great success so far. Big thanks to @robingenz and his team for this win

CC: @fryiee , @ssnielsen, @aladinbilalagic, @jorgsiegel, @Saqib92, @joeldhenry, @skotturi, @diachedelic

this plugin is to pick files not Recording. This thread is for Recording Video.

Saqib92 avatar Jan 10 '23 17:01 Saqib92

any update? video support please;

can choose video and capture video

ysneo avatar Jan 22 '23 06:01 ysneo

In my opinion the only correct thing to do for our projects is to either start thinking of migration or write a plugin for this. It's been almost 3 years since the issue is open, not saying that Ionic team has to do it, it's OSS, but I believe that this is core feature that any serious framework should provide, at least if they hope to attain any paid or enterprise customers.

aladin-bilalagic avatar Jan 24 '23 11:01 aladin-bilalagic

Surprised this is not yet supported OOTB. Any updates on this?

ossmalpha avatar Feb 17 '23 09:02 ossmalpha

tried to add some filters in https://github.com/ionic-team/capacitor-plugins/blob/89d09cb1af52fc7263394e5365a57d475011eabe/camera/ios/Plugin/CameraPlugin.swift#L506

like

configuration.filter = .any(of: [.images, .videos]) 

videos become able to pick

but after picking catching error

[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:1991 (
	0   AXRuntime                           0x00000001f43557f0 _AXGetPortFromCache + 932
	1   AXRuntime                           0x00000001f43579a4 AXUIElementPerformFencedActionWithValue + 772
	2   UIKit                               0x000000025100dae8 2FB1F859-1BC4-30B2-B751-1BC0A9B31400 + 785128
	3   libdispatch.dylib                   0x0000000101df053c _dispatch_call_block_and_release + 32
	4   libdispatch.dylib                   0x0000000101df1ff0 _dispatch_client_callout + 20
	5   libdispatch.dylib                   0x0000000101dfa0a0 _dispatch_lane_serial_drain + 988
	6   libdispatch.dylib                   0x0000000101dfadc8 _dispatch_lane_invoke + 420
	7   libdispatch.dylib                   0x0000000101e07cac _dispatch_workloop_worker_thread + 740
	8   libsystem_pthread.dylib             0x000000021863cdf8 _pthread_wqthread + 288
	9   libsystem_pthread.dylib             0x000000021863cb98 start_wqthread + 8
)

qliqdev avatar Feb 27 '23 18:02 qliqdev

Some plugin or workaround to record video? I'm confused why an official plugin only takes photos...

sdsoldi avatar Jun 13 '23 11:06 sdsoldi

Any change that someone in the ionic-team working on capacitor plugin gives us the what to expect for Video capturing. Sometimes is as important to know what is NOT working as oppose to what can be done with a plugin. There seems to be countless requests and questions about it, but nothing coming from the ionic team indicating that we can or not expect video capturing to work at any time soon. You keep selling capacitor as the be-all for hybrid apps, but you are not clear about the short comings. This result in endless hours for developers trying to figure out how to get around it.

To date I cannot find a clear answer from Ionic-team or from capawesome-team about weather video capturing is actually been done for Android and iOS. And if not, tell us that we need to do it ourselves. But you need to be clear on what does NOT work as well.

gerhardcit avatar Jun 19 '23 11:06 gerhardcit

We have an app that is working with the capacitor camera, now we want to record and upload videos aswell. We couldn't find anything that works in ionic or capacitor and we tried with awesome-cordova media-capture, we made it work, we can record the video, we can display the video... but we can't upload it, also when we install the cordova plugin, it breaks the upload from the app, but not from the web.

druinha avatar Sep 05 '23 08:09 druinha

Unanswered

josuelmm avatar Dec 19 '23 15:12 josuelmm

I am relatively new to Capacitor and have been using it to add native support and functionality to our Quasar/Vue app. So far it has been a dream implementing and using, specifically in this instance the camera plugin works great. But the fact that no video recording is supported is a huge let down, as our use case actually regularly includes needing to upload videos. I just wanted to add my voice in saying that this will be an amazing addition to capacitor and I will be monitoring to see if there is any update on this matter. Unfortunately I lack the experience to try and write a plugin for this myself.

NeptuniusDexter avatar Jan 22 '24 14:01 NeptuniusDexter

I'm agree with the statements above. The video support would be wonderful, maybe in version 6?

ultrasites avatar Mar 06 '24 14:03 ultrasites