Embedding HTML5 video in Tumblr (dashboard and blo

2019-08-27 04:38发布

问题:

Bit curios about the possibility to embed a custom HTML5 video player into Tumblr. How it works now is basically that you put in an URL or embed code to Youtube or any other service and it'll load up the video and show it in the dashboard feed and on your blog.

I just checked with Vimeo, and in that case it seems like it fetches a vimeo iframe with the video (I guess it's their embed code) and inject it into the DOM when the play button is pressed.

Would it be possible to mimic this behaviour with a custom iframe of my own? Make Tumblr accept my own embed code (iframe based) that leads to a HTMl5 video and also serve up a preview image before the video is actually played.

So when I'd input for example, www.mydomain.com/video1 it would recognize it as a video and have it behave like any other video service out there.

Or would it otherwise be possible to do via their API?

Just to clarify: I would not want to use the Tumblr HTML5 video player, but a player of my own chosing.

回答1:

The Tumblr dashboard will only play video previews for Video Posts. Anything embed in a caption or body will not get the preview treatment.

AFAIK, the only way to get a custom video to have a preview would be for Tumblr to work with your own platform / API. Tumblr pulls in the preview thumbs when you make the Video Post, if they support the platform.

There is a list of tested video platforms / providers here: Video Posts with Auto Thumbnail(Like in Facebook) in Tumblr.com



回答2:

OK

So on this tumblr the 3 posts along the top are ones I have tried.

http://nativecitizenstest.tumblr.com/

First is a Video type post but simply passing the url to tumblr.

Second is a text post but passing custom embed html from vine (this included a script which I did not know would work).

Third is a text post with an iframe in that I hand coded.

I think metcalf seems to be flash video and I don't know if that is supported, but a little googling should tell us.