Get started with Yottie 2.7.0

Basic Usage

1. Upload yottie folder to your server. Add required files to your website.

There are two ways to do it:

The first one is adding single bundled file which automatically load all dependencies:

<!-- don't forget to set correct path -->
<script src="yottie/jquery.yottie.bundled.js"></script>

Another way is adding the whole files manually:

<link href="//cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css" rel="stylesheet">
<script src="//apis.google.com/js/platform.js"></script>
<script src="//www.youtube.com/iframe_api"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.3/handlebars.runtime.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.jquery.min.js"></script>

<!-- don't forget to set correct path -->
<link href="yottie/jquery.yottie.min.css" rel="stylesheet">
<script src="yottie/jquery.yottie.min.js"></script>

2. Use the following tutorial to get YouTube API key: How to get YouTube API key.

3. Initialize the widget using data-yt-* attributes or as jQuery plugin.

Initialization using data-yt-* attributes

Add the widget's HTML code to the body section. Don't forget to specify your YouTube API key in the data-yt-key attribute.

<div data-yt
     data-yt-key="YOUR YOUTUBE API KEY"
     data-yt-channel="https://www.youtube.com/user/RockstarGames"
     data-yt-width="auto"
     data-yt-lang="en"
     data-yt-header-layout="accent"
     data-yt-content-columns="4"
     data-yt-content-rows="2"
     data-yt-video-layout="cinema">
</div>

Initialization as jQuery plugin

Don't forget to specify your YouTube API key in the key param.

<div class="my-yottie"></div>
<script>
    $('.my-yottie').yottie({
        key: 'YOUR YOUTUBE API KEY',
        channel: 'https://www.youtube.com/user/RockstarGames',
        width: 'auto',
        lang: 'en',
        header: {
            layout: 'accent'
        },
        content: {
            columns: 4,
            rows: 2
        },
        video: {
            layout: 'cinema'
        }
    });
</script>

Note: If you use the bundled version you have to initialize as jquery plugin the following way:

<script>
    window.onYottieReady = function() {
        $('.my-yottie').yottie({
            key: 'YOUR YOUTUBE API KEY',
            channel: 'https://www.youtube.com/user/RockstarGames',
            width: 'auto',
            lang: 'en',
            header: {
                layout: 'accent'
            },
            content: {
                columns: 4,
                rows: 2
            },
            video: {
                layout: 'cinema'
            }
        });
    };
</script>

Options

Option HTML data attribute Default Value Description
Source
key data-yt-key null Your YouTube API key is required for plugin's stable work. Use the following tutorial to get YouTube API key: How to get YouTube API key.
channel data-yt-channel null Insert URL of a YouTube channel to display its information (Logo, banner, channel name, channel description, videos counter, subscribers counter and views counter) and videos from Uploads playlist in the plugin.
sourceGroups data-yt-source-groups null Create custom groups of videos from any YouTube source (channels, playlists, videos). Name each group and specify unlimited number of YouTube sources in it. Please note: these sources will be displayed instead of videos from the specified channel above and will be presented in tabs. Use this option if you want to organize videos in your channel or create custom playlists of any videos. The sourceGroups option accepts array of plain objects or url-encoded string of JSON in the same format. Each object accepts the following properties:
  • name - string value, name of the group. If the name is empty, it will be set "Untitled".
  • sources - array of urls of different YouTube sources (channel, playlist, specific video).
order data-yt-order null It defines a sort order of videos in the gallery. By default, videos are presented in the order they appeared on YouTube or set in the source list. There are 6 available fields to sort videos: date, views, likes, dislikes, position, comments. If you would like to set the order, specify the sort field and set desc (descending) or asc (ascending) order separated by '#'. For example: views#desc. Also a random order is available. Set 'random' to randomize the video order.
cacheTime data-yt-cache-time 3600 It defines how long in seconds a data from YouTube will be cached in a client side database IndexedDB. Set "0" to turn the cache off.
noCookies data-yt-no-cookies false This option enables Privacy-Enhanced Mode, which uses youtube-nocookie.com domain upon watching videos. This mode improves privacy and YouTube won't store information about visitors on your website unless visitors play YouTube videos in the plugin. This mode also disables Subscribe Button in the header and popup, since this button uses cookie. It was added in attempt to achieve more compliance with the European Union's GDRP, the General Data Protection Regulation, on May 25, 2018.
Sizes
width data-yt-width auto Plugin width (any CSS valid value: px, %, em, etc.). Set "auto" to make the plugin responsive.
Language
lang data-yt-lang en Plugin’s UI language. 18 languages support: cs, de, en, es, fr, hr, it, nl, no, pl, pt-BR, sk, sv, tr, ru, hi, zh-HK, ja.
Header
header.visible data-yt-header-visible true Turn on/off the header in the plugin.
header.layout data-yt-header-layout classic Choose one of three header layouts: classic (like in YouTube), accent (pay more attention to your channel), minimal (attract more attention to your playlist).
header.info data-yt-header-info logo, banner, channelName, channelDescription, videosCounter, subscribersCounter, viewsCounter, subscribeButton List info types of your channel which should be displayed in the header: logo, banner, channelName, channelDescription, videosCounter, subscribersCounter, viewsCounter, subscribeButton.
header.channelName data-yt-header-channel-name null Specify custom channel name instead of your channel name in YouTube.
header.channelDescription data-yt-header-channel-description null Specify custom channel description instead of your channel description in YouTube.
header.channelLogo data-yt-header-channel-logo null Specify custom channel logo url instead of your channel logo in YouTube. The required image size is 100x100.
header.channelBanner data-yt-header-channel-banner null Specify custom channel banner url instead of your channel banner in YouTube. The required image size is 2120x352.
Groups
groups.visible data-yt-groups-visible true Turn on/off tabs of source groups in the plugin.
Content
content.columns data-yt-content-columns 3 Number of columns in the grid.
content.rows data-yt-content-rows 1 Number of rows in the grid.
content.gutter data-yt-content-gutter 20 Interval between videos in the grid in pixels.
content.arrowsControl data-yt-content-arrows-control true Activate arrows in the video gallery.
content.scrollControl data-yt-content-scroll-control false Activate scroll in the video gallery.
content.dragControl data-yt-content-drag-control true Activate drag in the video gallery.
content.paginationControl data-yt-content-pagination-control true Activate pagination in source group.
content.search data-yt-content-search true Turn on/off search by title and description in source group.
content.direction data-yt-content-direction horizontal Moving direction of video gallery’s slides (horizontal or vertical).
content.freeMode data-yt-content-free-mode false Switch the video gallery in free scroll mode.
content.scrollbar data-yt-content-scrollbar true Show scrollbar in the video gallery.
content.transitionEffect data-yt-content-transition-effect slide Slide, fade, coverflow, cube and flip animation of slide switching.
content.transitionSpeed data-yt-content-transition-speed 600 Animation speed of slide switching (in ms).
content.auto data-yt-content-auto 0 Autorotation of slide (in ms). Set "0" to turn it off.
content.autoPauseOnHover data-yt-content-auto-pause-on-hover true Disable auto slide switching by hovering on the video slider.
content.responsive data-yt-content-responsive null Accepts Plain Object or JSON string. It overwrites the grid view settings of the video gallery depending on different window sizes. Use the following format: { "600": { "columns": 2, "rows": 2, "gutter": 10 }}. It means when a window width would be less than or equal to 600px then the number of columns would be set to 2, the number of rows - to 2 and gutter - to 10px. Note: if you specify this option as data-yt-content-responsive attribute, please use single quote ' (data-yt-content-responsive='{ "600": { "columns": 2, "rows": 2, "gutter": 10 }}')
Video
video.layout data-yt-video-layout classic Choose one of three video layouts: classic (video card with full information), cinema (pay more attention to video preview. Info displays on hover), horizontal (appropriate layout for displaying videos in 1-2 columns as a list).
video.info data-yt-video-info playIcon, duration, title, date, description, viewsCounter, likesCounter, commentsCounter List info types of each video which should be displayed in the video gallery: playIcon, duration, title, date, description, viewsCounter, likesCounter, commentsCounter.
video.playMode data-yt-video-play-mode popup Choose the mode of watching videos: in popup ("popup"), directly in the video gallery ("inline"), or in a new browser tab right in YouTube ("youtube").
Popup
popup.info data-yt-popup-info title, channelLogo, channelName, subscribeButton, viewsCounter, likesCounter, dislikesCounter, likesRatio, share, date, description, descriptionMoreButton, comments List info types of video which should be displayed in the popup: title, channelLogo, channelName, subscribeButton, viewsCounter, likesCounter, dislikesCounter, likesRatio, share, date, description, descriptionMoreButton, comments.
popup.autoplay data-yt-popup-autoplay true Turn on/off autoplay while openning a video in the popup.
Colors
color.scheme data-yt-color-scheme default Choose default or dark color scheme of plugin's UI.
color.header.bg data-yt-color-header-bg null Header background color. It supports any css valid color (hex code, rgb, rgba etc). It redefines the related color in a color scheme.
color.header.bannerOverlay data-yt-color-header-banner-overlay null Header banner overlay color. It lays on the header banner for contrast with text. Available in "accent" and "minimal" header layouts.
color.header.channelName data-yt-color-header-channel-name null Header channel name color.
color.header.channelNameHover data-yt-color-header-channel-name-hover null Header channel name color on hover.
color.header.channelDescription data-yt-color-header-channel-description null Header channel description color.
color.header.anchor data-yt-color-header-anchor null Header channel description anchors color.
color.header.anchorHover data-yt-color-header-anchor-hover null Header channel description anchors on hover color.
color.header.counters data-yt-color-header-counters null Header counters color.
color.groups.bg data-yt-color-groups-bg null Groups background color.
color.groups.link data-yt-color-groups-link null Groups link color.
color.groups.linkHover data-yt-color-groups-link-hover null Groups link color on hover.
color.groups.linkActive data-yt-color-groups-link-active null Groups active link color.
color.groups.highlight data-yt-color-groups-highlight null Groups highlight color.
color.groups.highlightHover data-yt-color-groups-highlight-hover null Groups highlight color on hover.
color.groups.highlightActive data-yt-color-groups-highlight-active null Groups active highlight color.
color.content.bg data-yt-color-content-bg null Content background color.
color.content.arrows data-yt-color-content-arrows null Content arrows color.
color.content.arrowsHover data-yt-color-content-arrows-hover null Content arrows color on hover.
color.content.arrowsBg data-yt-color-content-arrows-bg null Content arrows background color.
color.content.arrowsBgHover data-yt-color-content-arrows-bg-hover null Content arrows background color on hover.
color.content.acrollbarBg data-yt-color-content-scrollbar-bg null Content scrollbar background color.
color.content.scrollbarSliderBg data-yt-color-content-scrollbar-slider-bg null Content scrollbar slider background color.
color.video.bg data-yt-color-video-bg null Video background color.
color.video.overlay data-yt-color-video-overlay null Video overlay color.
color.video.playIcon data-yt-color-video-play-icon null Video play icon color.
color.video.playIconHover data-yt-color-video-play-icon-hover null Video play icon color on hover.
color.video.duration data-yt-color-video-duration null Video duration color.
color.video.durationBg data-yt-color-video-duration-bg null Video duration background color.
color.video.title data-yt-color-video-title null Video title color.
color.video.titleHover data-yt-color-video-title-hover null Video title color on hover.
color.video.date data-yt-color-video-date null Video date color.
color.video.description data-yt-color-video-description null Video description color.
color.video.anchor data-yt-color-video-anchor null Video description anchor color.
color.video.anchorHover data-yt-color-video-anchor-hover null Video description anchor color on hover.
color.video.counters data-yt-color-video-counters null Video counters color.
color.popup.bg data-yt-color-popup-bg null Popup background color.
color.popup.overlay data-yt-color-popup-overlay null Popup overlay color.
color.popup.title data-yt-color-popup-title null Popup title color.
color.popup.channelName data-yt-color-popup-channel-name null Popup channel name color.
color.popup.channelNameHover data-yt-color-popup-channel-name-hover null Popup channel name color on hover.
color.popup.viewsCounter data-yt-color-popup-views-counter null Popup views counter color.
color.popup.likesRatio data-yt-color-popup-likes-ratio null Popup likes ratio color.
color.popup.dislikesRatio data-yt-color-popup-dislikes-ratio null Popup dislikes ratio color.
color.popup.likesCounter data-yt-color-popup-likes-counter null Popup likes counter color.
color.popup.dislikesCounter data-yt-color-popup-dislikes-counter null Popup dislikes counter color.
color.popup.date data-yt-color-popup-date null Popup date color.
color.popup.description data-yt-color-popup-description null Popup description color.
color.popup.anchor data-yt-color-popup-anchor null Popup anchor color.
color.popup.anchorHover data-yt-color-popup-anchor-hover null Popup anchor color on hover.
color.popup.descriptionMoreButton data-yt-color-popup-description-more-button null Popup description more button color.
color.popup.descriptionMoreButtonHover data-yt-color-popup-description-more-button-hover null Popup description more button color on hover.
color.popup.commentsUsername data-yt-color-popup-comments-username null Popup comments username color.
color.popup.commentsUsernameHover data-yt-color-popup-comments-username-hover null Popup comments username color on hover.
color.popup.commentsPassedTime data-yt-color-popup-comments-passed-time null Popup comments passed time color.
color.popup.commentsLikes data-yt-color-popup-comments-likes null Popup comments likes color.
color.popup.commentsText data-yt-color-popup-comments-text null Popup comments text color.
color.popup.controls data-yt-color-popup-controls null Popup controls color.
color.popup.controlsHover data-yt-color-popup-controls-hover null Popup controls color on hover.
color.popup.controlsMobile data-yt-color-popup-controls-mobile null Popup mobile controls color.
color.popup.controlsMobileBg data-yt-color-popup-controls-mobile-bg null Popup mobile controls background color.
AdSense
ads.client data-yt-ads-client null Yottie supports AdSense Advertisement platform. Specify AdSense client (pubId) to turn it on.
ads.slots.content data-yt-ads-slots-content null Slot identifier for adv block in content (video gallery).
ads.slots.popup data-yt-ads-slots-popup null Slot identifier for adv block in popup.
Other
debug data-is-debug false Set "true" to display error messages.

Example



Congratulations! You have successfully installed your Yottie.

Support, questions and offers

Incoming issues and queries are taken care of in 24-36 hours in order of receiving.

Visit Support Center