Loved your addon on Xenforo, so really nice to see you bring it over here so quickly!

You're the man.

  • [deleted]

youtube video is not responsive??

None of the embeds are responsive currently. All of them should be in the update next week.

In the meantime you can use CSS to limit iframes to 100% width.

@JoshyPHP Would you be interested in working on this extension as part of the github.com/flarum organisation?We're considering including it (or something like it) by default.

    Toby That could be a good idea but how would that work out?

    I assume you'd handle bundling it with Flarum and the release process?

    • GOD likes this.

    @JoshyPHP what do you think of supporting codepen? is this possible?

    Also, I've tried twitter here on flarum.org but didn't display. is it disabled?

    Codepen would require the same kind of third-party iframe as Twitter. I don't think it would be wise to include by default because it runs users code.

    Twitter works for me. If you don't see a tweet below, check out your browser's console for errors maybe?

    Hello, i got the same problem than another one here,

    Turning on and off the extension didn't do the trick :/

      BlackSheep You didn't close the BBCode properly. It should be [media]...[/media]

      Or as ameo said, just post the URL without any BBCode.

        9 days later

        ameo Not with that kind of links, no. Mostly because that's a link to an article that contains a video and replacing one with the other would make the users miss on some content. IOW, they wouldn't read the article. That's different from, say, a YouTube URL.

        You'd need an interface to create a custom BBCode for it or add a custom media site for it. If you want to create an extension for yourself, here's the code for extracting the video's ID from an article link:

        $event->configurator->MediaEmbed->add(
        	'tvguide',
        	[
        		'host'   => 'tvguide.com',
        		'scrape' => ['extract' => '#"embed":".*?/embed\\/(?<id>[-\w]+)#'],
        		'iframe' => [
        			'width'  => 640,
        			'height' => 360,
        			'src'    => '//www.tvguide.com/videos/embed/{@id}/'
        		]
        	]
        );

        @JoshyPHP do you need to have BBcode enable in order for the mediaembed to work or will it work with markdown?

        It tranforms links regardless of other extensions. Just post the link, it'll get embedded.

        @JoshyPHP I see that you can add sites to the extension manually I am guessing. I am more interested in actually being able to process a regular site and just quickly create a quick info box of either the title or description and a small excerpt of the content. Maybe use the fav icon, or the OG icon or even an image from the site if available and display it in a nice box on the discussion just like many of the media links that are supported.

        I am not sure if your extension has it but it would be nice if it does, just like "onebox" from discourse which tries to use a website's OG information tags to make it easier to the scraper or use the title and description for such information.

        Anyway just a thought.

        I did get to try out the supported sites and they work really nice.