Skip to main content
Recent Posts
21
Feature Discussion / Re: Video Embed's
Last post by Spuds -
How about some twitter, the place for open discussion on topics that most don't give a darn about, or a place to be the ultimate narcissist.

Code: [Select]
https://twitter.com/Interior/status/463440424141459456
https://twitter.com/KatieWoolard/status/1525298113241567238

Twitter is a bit funny in the API.  You do not seem to be able to make a call directly from JS due CORS restrictions:boom:  So instead we have to make an API call from your site server to get the embed code and then display that.

An alternative would be to do a click and load, much like the facebook post above.  But as an experiment I set up the server call to get and show the embed, and as a bonus its a lazy load, so it will not fetch until its in the viewport.  Now someone may say you can just put loading=lazy on the tag, well no you can't as the tag is rendered by the script thats in in the embed, ha!

So here is Twitter, will show the twitter logo until the post is in frame and then it will fetch the tweet (which may or may not even have a video in it, its a tweet embed)

https://twitter.com/Interior/status/463440424141459456
https://twitter.com/KatieWoolard/status/1525298113241567238

22
Feature Discussion / Re: Video Embed's
Last post by Spuds -
Did you think this was over ... nope, next is facebook.

Code: [Select]
https://www.facebook.com/revistapegn/videos/10153713928657635/
https://www.facebook.com/facebook/videos/10153231379946729

I decided to only support video embeds, not posts or timelines or any of the other stuff.  Honestly I'm surprised the video embed works at all. 

Facebook really Really REALLY wants you to join, so even as a developer you need to go the Full Monty with them to get any access.  You can not get a preview image without getting an app id and then using their graph API and a bunch of other stuff.  They changed oembed and it requires an app_id as well.  That would mean each admin would have to get their own app id as well. 

So no preview, only the old FB logo (or if one wants the limp infinity).  It seems to behave as it should but I have done almost no testing as I don't have a FB account and most pages I go to demand I log in, like now, right now!

https://www.facebook.com/revistapegn/videos/10153713928657635/
https://www.facebook.com/facebook/videos/10153231379946729

23
Feature Discussion / Re: Video Embed's
Last post by Spuds -
Oh, you want more? of course you do, its the internet, so here is tiktok, remember YOU asked for this.
Code: [Select]
https://www.tiktok.com/@sassysoundsasmr/video/7091443256378248494?enter_from=video_detail&is_copy_url=1&is_from_webapp=v1
https://www.tiktok.com/@the.mcfarlands/video/7003480282145852677?_t=8RvxobUnrVS&_r=1

https://www.tiktok.com/@sassysoundsasmr/video/7091443256378248494?enter_from=video_detail&is_copy_url=1&is_from_webapp=v1
https://www.tiktok.com/@the.mcfarlands/video/7003480282145852677?_t=8RvxobUnrVS&_r=1

Supposedly those are funny. 

Important notes, at least with TT we can usually grab a preview image which is nice.   They seem to all be in portrait which make sense as its designed for mindless phone consumption which beats having to interact with humons. 

I chose to show the preview in 16/9 so some cropping will occur but it take up a lot less vertical room this way.  Once you click on the image it will flip to a 9/16 portrait mode and the page will reflow.  We really don't know the size of the embed itself, one could set a max size but its really not the best in my testing as the video can really narrow down with all the other content that comes on in,
27
Feature Discussion / Video Embed's
Last post by Spuds -
Going to place a few posts in this thread, each with a sites video "stuff" for discussion / input / ignore

Our video embed code (1.1) currently supports YouTube, Vimeo and DailyMotion.  I don't use the last two so really have no idea if they are still worth supporting or not.  Each of these sites does make it easy to embed items as well as fetch the preview thumbnail, they really are geared toward easy embeds.

Also of importance is the way we go about the embeds.  We fetch just a preview image which is lite and fast.  Once the image is clicked, the sites video embed code/player/scripts/html etc. is fetched into an iframe and begins playing.  That can be quite a bit of data, and can be slow as well, that's why its not loaded unless requested by the user/viewer.

Before any preview loads (or it fails), it will use a sites logo as the background just so there is not an empty box on the screen. The logos are part of the JS embed and are saved as simple SVG's .

That brings me to adding additional support for other sites and some of the difficulties involved.  I've looked at adding TikTok, Twitter, Facebook and Instagram support, and each as their restrictions, I'll make a post for each site, with any issues of note.
28
Site Feedback / Re: EARLY Beta version of 2.0
Last post by Spuds -
So another round of updates were applied today.  Some of these were already "live" but had not been committed to the repo, so what we have now is what is *really* in the dev branch of the repo.

Some notes:
  • Some more random CSS cleanup, mostly padding/spacing and the like
  • Committed the chart.js items for stats view, that was discussed in another topic.  Also now in profile stats, those little donuts that showed popular boards by posts are now SVG created on the "fly" icons.  You no longer have to deal with the old sprite image which only had distinct wedges and was more difficult to color to the theme.  Now you can change the color with ease.
  • The JS/CSS minify was updated so now you can choose to minify files but NOT combine them into one.  Some folks like that better.  This was an update that also included JS defer changes and some other minor cleanup of inline JS.  Unfortunerly one of the JS compile options we had was a google service that did code optimization as well, but that service has been flagged as depreciated so we can really use that any longer.  Now its simply a whitespace remover.
  • Added, as an experiment, several other video embed sites, Facebook, Instagram, Twitter, Tiktok  I'll do a separate post on that.
  • Open graph metadata and site schema is now an option. If you look at the page source you will see the tags that are added by the option (its not all in the head, so look at the bottom as well).  This data is not on all pages, its primarily on topic view,  board and topic index pages.   It will use the appropriate description for the page and will also make use of attachments (from the first post only) to help announce the item.  Basically the open graph stuff is used when you share a page on a social site and the schema stuff is for search engine consumption.
  • Another large batch of fixes to various areas, to numerous to list, still lots to go !
29
Theme development / Re: Click to expand quote
Last post by Spuds -
That should now be implemented and live.

I set it at a level 2.  Of course it will only effect quotes going forward, previous deeply nested quotes would still show, although those could be hidden via CSS if really wanted.