Skip to main content

djangocms-youtube-lazyload

https://pypi.org/project/djangocms-youtube-lazyload/ https://travis-ci.com/github/jeroenpeters1986/djangocms-youtube-lazyload PyPI - Status PyPI - License PyPI - Downloads

Speed up your pageloads with this YouTube embed plugin for your Django CMS powered site. It requires a (free) YouTube Data API Key.

Quickstart

  1. Install djangocms-youtube:
    pip install djangocms-youtube-lazyload
    
  2. Add djangocms_youtube_lazyload to INSTALLED_APPS:
    INSTALLED_APPS = (
        ...
        'djangocms_youtube_lazyload',
        ...
    )
    
  3. Sync database :
    python manage.py migrate
    
  4. Collect static files to make sure you can edit your videos with Django CMS
    python manage.py collectstatic
    
  5. Plugin requires Server API key to be able to use the YouTube Data API
    DJANGOCMS_YOUTUBE_LAZYLOAD_API_KEY = '<youtube_data_api_server_key>'
    
    Instructions on how to obtain an API key are located here: https://developers.google.com/youtube/registering_an_application

This Youtube plugin reduces Page Load Time

When you embed any YouTube video on your website using standard IFRAME tags, you’ll be surprised to know how much extra weight that YouTube video will add to your page. The resources (CSS, images and JavaScript) will download even if the visitor on your website has chosen not to watch the embedded YouTube video. This will noticably slow down your page.

djangocms-youtube-lazyload uses a clever workaround to reduce the time it would normally take to initially load the YouTube video player. Instead of embedding the full Youtube video player, which also takes a big on your requests and data-loading, it displays just the thumbnail images of the video and a 'play' icon is placed over the video so that it looks like a video player.

When the user hits the play button, the video thumbnail is replaced with the standard YouTube video player. The extra resources are thus loaded only when the user has decided to play the embedded video and not otherwise.

Note: Mobile devices require two taps to play the video. Tap the image once to remove it and display the video player. Then, tap the play button to begin the video.

Schema.org Integration

Full support for schema.org videoObject markup.

<div class="video-wrapper" itemprop="video" itemscope="" itemtype="http://schema.org/VideoObject">
    <meta itemprop="name" content="PSY - GANGNAM STYLE (강남스타일) M/V">
    <meta itemprop="duration" content="PT4M13S">
    <meta itemprop="thumbnailUrl" content="https://i.ytimg.com/vi/9bZkp7q19f0/maxresdefault.jpg">
    <meta itemprop="embedURL" content="https://www.youtube.com/embed/9bZkp7q19f0">
    <meta itemprop="uploadDate" content="2012-07-15T07:46:32.000Z">
    <meta itemprop="height" content="480">
    <meta itemprop="width" content="853">
    <meta itemprop="description" content="...">
</div>

See https://developers.google.com/webmasters/videosearch/schema

Video Endscreen

Plugin can have child plugins (i.e other plugins placed inside this plugin), rendered as an overlay, when the video finishes. You can disable this functionality by overriding DJANGOCMS_YOUTUBE_LAZYLOAD_ALLOW_CHILDREN in your settings.py file

Metadata

Release files for djangocms-youtube-lazyload 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djangocms-youtube-lazyload 1.0.7
File Size Uploaded
djangocms-youtube-lazyload-1.0.7.tar.gz 139.4 kB Details

Release files / djangocms-youtube-lazyload-1.0.7.tar.gz

Download URL djangocms-youtube-lazyload-1.0.7.tar.gz
Size 139.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f92596495fd0448acf7fb35c8df0c830d7b11766bb827e1832b272db9e9b76bb
BLAKE2b-256 checksum
How to use checksums
873da6a23c83c400f8f44edd919d02a7371e85333a829dcac694462493e6d6a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.0.7 This release

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page