medium-editor-insert-plugin
medium-editor-insert-plugin copied to clipboard
How about video embed with thumbnail image?
In my app, embeding video is too slow when rendering because calling some scripts.

How about changes embed video by thumbnails? http://www.sitepoint.com/faster-youtube-embeds-javascript/
I am also using medium-insert-plugin and embedding video is not slow for me.
My console log look like this
In your console log, I see every script is called 7 times, may be you are binding events 7 times (unknowingly) . May be this is the reason embedding is slow for you.
I have post list in one page app. In there there are more than 10 posts at one request (infinite scroll) Do you also request just 7 times while calling 10 videos?
I am not showing embedded videos on list page, instead I show thumbnail image on list page.
I show embedded video on post show page and editor.
Check this https://followme.co/anilmaurya2
Listing 10 embedded video on single page will definitely slow page loading.
I implemented http://www.sitepoint.com/faster-youtube-embeds-javascript/ in earlier version of my editor, its not tough to implement and is light weight too.
+1 for this.
Um... I'm showing posts list with all contents like facebook. I think I have to parse contents and change embeds to thumbnail image manually. Thank you anyway
@anilmaurya Yeah, if you have it, it would be great if you could submit a PR.
@orthes I will work on it and send pull request in couple of days.
If it helps, we just implemented this in our viewer using the "Faster YouTube Embeds with JavaScript" example.. This is the initial react component. The css is the same (from the example).
https://github.com/steemit/steemit.com/blob/43e32326e3405cbc7bc26898fab848ef4cf4b264/app/components/elements/YoutubePreview.jsx