ether / etherpad-lite

Etherpad: A modern really-real-time collaborative document editor.
http://docs.etherpad.org/
Apache License 2.0
16.02k stars 2.79k forks source link

Basic support for different media types #248

Closed 0ip closed 12 years ago

0ip commented 12 years ago

By typing any url, linking to an image, music file or video - the media immediately appears. To disable automatic detection, just append a single #.

Example http://pad.factor.cc/p/JhJVKpKGe0

markreg commented 12 years ago

This is so awesome.

Pita commented 12 years ago

Great work!

Can we change that so it works with youtube and vimeo links too? Mazybe also twitpic and imgur

And it would be great if we can add something so the user sees which link belongs to which video/image

0ip commented 12 years ago

Successfully added on my to-do list ;)

0ip commented 12 years ago

Oh I hate Flash... :[

Pita commented 12 years ago

afaik youtube is using iframes to embed videos. If thats the reason why you hate flash

markreg commented 12 years ago

Plus how will it work on iDevices...

Also 0ip, would iy be possible for you to implement inserting tavles via a grid-selection system (kind of like in MS Word). Also I had posted this in a different issue but I feel that covering the text with a color inhibits the readability of the text to some exteny and wqs wondering if you could make a patch to add an api option to switch off automatic highlighting of the text and instead just have a traveling tooltip type-of-box that is always above the user's cursor and simply has the user's name inside the tooltip with the user's "identifying color" the color of the toolip. This is basically what Google's document processor does.

0ip commented 12 years ago

Updated example odd: works in Chrome but not in Firefox...

afaik youtube is using iframes to embed videos. If thats the reason why you hate flash

yep - that was one of my reasons ;)

http://occupyflash.org/


@markreg Disabling colors already work: http://pad.factor.cc/p/holymoly?noColors=true I have to think about this tooltip ;) However, that's OT.

crash-dive commented 12 years ago

I was testing this out and it caused the pad to hang a few times in chrome. The problem seems to be related to when you try and delete the url of a youtube video you have added.

However I could not get it to happen everytime, so I will wait until you make some more changes and have another go.

0ip commented 12 years ago

Thanks for testing. Only YouTube/Vimeo videos are affected and that's due to overlapping iframe's. I'll look into the exact matter tomorrow. :)

markreg commented 12 years ago

I just tried this in firefox 8.0 and I can't see the youtube video within the pad. It's just shown as a black box.

Also whenever I try to resize or move the image it just goes back to the previous state and doesn't allow me to resize or move it.

Wikinaut commented 12 years ago

@0ip

What browser/s do you use for developing and testing your enhancement ? Should be Firefox, Chrome, IE8 and, if possible, IE9. In my view (I don't have IE9 available)

Pita commented 12 years ago

@markred @0ip imho there is no need for resizing. Or at least not in this step

0ip commented 12 years ago

@Wikinaut You forgot Opera and I won't test something in IE8.

Regarding the Firefox issue: I don't know what's wrong. According to Firebug, syntax is ok and the log says that some variables are missing, but in YouTube's and Vimeo's embedding pages (which is, of course, odd, since it works in a single html with the same syntax as used in epl but without any problems...).

Do we really need YT/V support?

markreg commented 12 years ago

Is there a bug when moving images as well, however? Also, I realize that resizing isn't at the top of the priority lit but it would be nice if we can resize images.

Pita commented 12 years ago

@0ip The normal user can't see the difference between a a twitpic link and a link directly to an image. The same problem is with videos, its even bigger there. So Youtube support would be very helpful.

0ip commented 12 years ago

Alright.

I tested this weird thing again using IE9 + Opera 11.60 + Chrome 17 and it works. So it must be a Firefox-related bug.

@markreg This resizing function is built-in since FF5 or 6. If you want to move images, move the link.

markreg commented 12 years ago

When I attempt to resize any image it jumps back to the original size.

If firefox is the only browser to have this supposed resizing capability then other browsers will not be able to resize at all?

0ip commented 12 years ago

I guess no.

When I attempt to resize any image it jumps back to the original size.

Of course: your 'resize' is only local.

markreg commented 12 years ago

Is this going to be merged into EP master branch or are there some kinks that need to be worked on still?

0ip commented 12 years ago

Flash is a bit tricky on Firefox. It doesn't work yet but I don't know how to fix it.

markreg commented 12 years ago

As far as the future is concerned. Flash is basically dead. Personally I think perfecting image support is the best thing for EP-lite right now. Features like dragging and moving images and the ability to upscale or downscale added images is a very useful and beneficial feature for adding image graphs and charts.

0ip commented 12 years ago

Pita insists on Youtube + Vimeo support. ;) HTML5 ftw

Pita commented 12 years ago

Flash might be dead, but Youtube isn't. But if this is such big problem we should at least implement support for imgur and twitpic

0ip commented 12 years ago

IE is supported and that's the main point.

yadutaf commented 12 years ago

I just got an idea about this extension :

Drag & Drop moving/resizing are not supported and this might look non-intuitive to our users. But, this idea of automatically generate a preview is really great !

Could we imagine a design option to display the embedded media in a side pane, an overlay or anything showing it's not directly part of the body but still referenced in the body ? This is a bit like twitter does when you have links to images/videos embedded inside your tweets.

What do you think ?

Pita commented 12 years ago

Btw, how will this look like at the timeslider and htmlexport?

0ip commented 12 years ago

@jtlebi Good idea. It's @Pita's decision. For now, it's planned for version 1.2 to enable/disable media detection globally in a menu for several options like monospace, authorcolors, password protection etc.

@Pita Media is neither shown in the slider nor in exported documents.

markreg commented 12 years ago

Personally, I think image media should have the ability to export in documents if possible.

JohnMcLear commented 12 years ago

@Pita -- Afaik you are also working on this, should I wait for a commit/pull request from you before proceeding any further?

tschweitzer commented 12 years ago

Will this feature go into the main branch? As far as I can see, it hasn't been merged, right?

Pita commented 12 years ago

@tschweitzer yeah, cause @0ip said his commits were too dirty

tschweitzer commented 12 years ago

So will @0ip clean up his commits and then the changes go into the main branch? Or will you @Pita re-implement a similar feature? I'd love to have this in etherpad.

0ip commented 12 years ago

@0ip waits until @Pita finished plugin support. :P But even then it's doubtful whether I'll rework the code.

Miserlou commented 11 years ago

What happened to this? Is there a plugin for image support?

JohnMcLear commented 11 years ago

TLDR; Basic image support yes. https://npmjs.org/package/ep_previewimages

Advanced image support no. But if I can get some sponsorship or funding then I'd be able to continue my dev