nahid / talk

Talk is a real-time users messaging and chatting system for Laravel.
MIT License
1.6k stars 326 forks source link

Add message embed capability #137

Closed cfpinto closed 5 years ago

cfpinto commented 5 years ago

Added ability to convert URLs inside messages to embed objects. Messages like: "Watch this video https://www.youtube.com/watch?v=jNQXAC9IVRw" will be converted into youtube embed markup, where the message is rendered using:

{{$message->toHtmlString()}}
cfpinto commented 5 years ago

All recommendations answered. All tests passing

nahid commented 5 years ago

@cfpinto In config oembed section should contains others options like width, height. So it will be more configurable.

cfpinto commented 5 years ago

The oembed specifications already cover that level of customization. If having styling problems css should be able to handle it. The custom oembed driver does not support offline embed so width and height not necessary I believe