I love this mod and would find it useful if it could work with other formats as well as image for the file field. Would it be possible to make video & audio files work also?

I think users would find this very useful

Thanks for all your hardwork :)

Files: 
CommentFileSizeAuthor
#2 insert_audio_1431322_2.patch3.41 KBhefox

Comments

This is actually rather simple patch, as far as I can tell, if one is assuming what someone wants to embed is an HTML 5 tag (else theirs some sort of outside depedency on x y z video player). e.g. for audio files, it could insert an audio tag, and video files could do video.

I believe there's some js scripts out there to change video tags to hosted video player in older browsers, may be the same for audio.

Status:Active» Needs review
StatusFileSize
new3.41 KB

Here's a patch that adds the audio tag

Note that filtered HTML doesn't allow audio tag by default :/

Note: it's missing other file formats, need to look up which ones are (commonly?) supported by audio tag.

Hm interesting. This seems like a good start, but I'm not sure if <audio> is widely supported enough yet to make it the only approach for an inline insertion. Same problem with <video>.

For example, it looks like Firefox (still) doesn't support MP3 audio tags: http://stackoverflow.com/questions/4923136/why-doesnt-firefox-support-mp...

Perhaps auto should have settings on what tags it applies per field? That way those that want it to automatically do audio for audio can, but others don't.

It could be useful also a simple "insert" button that adds a link to the file

Title:Working with other media formatsWorking with other media formats (insert <video> and <audio> tags)
Status:Needs review» Needs work

It could be useful also a simple "insert" button that adds a link to the file

Insert module already provides an option to insert as a link to the file.

Yes, but, as I remember, it doesn't work if I have a file with "Media selector" widget.

A solution for this is this module which also supports images: https://drupal.org/project/insert_video
The disadvantage is that it is a little buggy (insert button appears after saving node or pressing "add another item") and that the insert-presets are based on "view-modes".