gsantner / markor

Text editor - Notes & ToDo (for Android) - Markdown, todo.txt, plaintext, math, ..
https://github.com/gsantner/markor/discussions/2269
Other
3.83k stars 365 forks source link

Attachment menu: Add section for Videos #1280

Open ghost opened 3 years ago

ghost commented 3 years ago

General information

Description

At the moment, Markor allows to take a photo using the system camera app, place it into the directory of the note file, and insert the relevant markdown into the file.

I would like to ask that videos (obtained form exactly the same source) be attachable exactly the same way.

If fact, if you use OpenCamera as your camera app, you can already record videos from the summoned camera app, but those are rejected at the attachment time, and until you take an actual photo, the camera app wouldn't close.

If you use the stock one, however, it only allows you to take photos.

May I ask that such a feature be added? I think, this should not be a huge development effort. (it's either that the app should not reject videos from OpenCamera, or just one button to obtain an image from an intent needs to be added, almost like the image acquisition one.)

Log

The program is not crashing.

ghost commented 3 years ago

What else needs to be done, besides 7199171 ?

gsantner commented 3 years ago

Frontend related stuff.

Change above enabled rendering i.e. a ![](a.mp4) as watchable html <video> tag, in markdown view.

The file is the Attach Dialog java class, should be 99% of the remaining code there.

2catycm commented 2 years ago

So 7199171 just added the library we need, but did not modify the rendering code BTW, what does hacktoberfest mean?

2catycm commented 2 years ago

I am reading Attach Dialog or link java class,

  1. it seems the shareUtils requests the image by sending an intent that request just image, on my phone, the prompted system gallery and opened camera did not allow me to select or record video, so maybe I should read the Android doc to see how to modify the intent
  2. I got confused here image

because it seems that the imported picture should be in the format of label as the code says here, but actually the final effect on the apk is that a ![]()

gsantner commented 2 years ago

You can currently embed and show videos in markdown files.

But there is not any "Record video" or "Select video from gallery" button - and this is what the issue is about.
You need to check back with Android documentation, what flags and intent values need to be set to select/record videos.