|
Post by 🇩 🇷 🇦 🇰 🇪 on May 15, 2018 17:38:41 GMT
There is a technique Proboards is not using for loading Youtube images rather than the full imbeds. I've seen it speed up pages that are loaded with Youtubes by loading only the image until a video is clicked. Here is a page with multiple Youtubes that loads for me right away. Film|Boards or *** as IMDb2 displays it in links, recently started using the technique. ***.comSorry, that site is also blocked. Maybe someone here knows of an unblocked site that uses the fast-load technique.
|
|
Deleted
Deleted Member
@Deleted
Posts: 0
Likes:
|
Post by Deleted on May 16, 2018 0:34:26 GMT
There is a technique Proboards is not using for loading Youtube images rather than the full imbeds. I've seen it speed up pages that are loaded with Youtubes by loading only the image until a video is clicked. Here is a page with multiple Youtubes that loads for me right away. Film|Boards or *** as IMDb2 displays it in links, recently started using the technique. ***.comSorry, that site is also blocked. Maybe someone here knows of an unblocked site that uses the fast-load technique. That's something to take up directly with Proboards. I think it could also be achieved by writing a plugin and frankly I could probably hammer one out but it sounds like a lot of time and frustration for a project I'm not that interested in pursuing. You could always write one, though.
|
|
Deleted
Deleted Member
@Deleted
Posts: 0
Likes:
|
Post by Deleted on May 20, 2018 6:06:54 GMT
There is a technique Proboards is not using for loading Youtube images rather than the full imbeds. I've seen it speed up pages that are loaded with Youtubes by loading only the image until a video is clicked. Here is a page with multiple Youtubes that loads for me right away. Film|Boards or *** as IMDb2 displays it in links, recently started using the technique. ***.comSorry, that site is also blocked. Maybe someone here knows of an unblocked site that uses the fast-load technique. Alright, I did a bit of code that kinda solves the problem in plugin form for Proboards: $(document).ready(function() {
var messages = $('.message'); $(messages).each(function() {
var youtube = $(this).find('[title="YouTube video player"]'); $(youtube).each(function() {
var yt_icon = "http://storage.proboards.com/6780133/images/eBXmocYgwCmRMozYVfnT.png"; var video = this; var vid_link = $(this).prop("src"); var vid_height = $(this).prop("height"); var vid_width = $(this).prop("width"); var vid_id = vid_link.substring(29, 40);
var $thumbnail = $('<img src="' + yt_icon + '" alt="" height="' + vid_height + '" width="' + vid_width + '" style="background: url(http://img.youtube.com/vi/' + vid_id + '/hqdefault.jpg) center center; background-size: cover;"/>');
$(this).replaceWith(function() { return $thumbnail; });
$thumbnail.mouseenter(function() { $(this).replaceWith(function() { return video; });
});
});
});
});
It replaces the videos with their thumbnail and an overlay of the YouTube button. They won't load the video proper until the user mouses over them. It solves the problem of pages loaded with videos taking forever to load. Proof of concept on a forum I whipped up: mrboneswildride.freeforums.net/thread/30/youtube-plugin-testIt needs testing and I'm not sure how it will turn out on mobile or other browsers. I also use a really cheap trick to do the YouTube button overlay so it might not translate well across platforms. Seems to work alright, though.
|
|