이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Youtube Playlist Thumbs

설명

Demo

Install and activate the plugin. Insert the [ypt playlist_id=] shortcode in your page or post and insert your playlist ID after the equal. When that content is published and viewed, a Youtube player will appear and a column of thumbnails will load to the right of the player. Clicking the thumbnails switches between videos.

This plugin includes a small CSS file for minimal styling that was written to target the specific IDs of the thumb list and player.

Youtube Playlist Thumbs plugin depends on the Youtube Iframe API. Any bugs experienced with that service will affect this plugin. Please check for bugs with Youtube Iframe API before reporting a bug for this plugin.

See “Other Notes” for usage.

Usage

Place this shortcode in your posts or pages and insert your Youtube Playlist ID after the equal.

[ypt playlist_id=]

To get a Youtube Playlist ID, copy the string after ‘&list=’ when viewing a playlist on Youtube.com. See screenshot #3.

To trigger the playback of an ordered video in the playlist, add this attribute to the clickable element:

data-ypt-index="X"

Where ‘X’ is the order number of the video with the first video starting at 0. The third video would be 2. For example:

<button data-ypt-index="2">Click to play the third video.</button>

The ‘Now Playing’ thumbnail text and arrow is inserted by CSS. Add this rule to your CSS to change it:

#ypt_thumbs .ypt-now-playing > span::after {
  content: "YOUR NEW TEXT" !important;
}

The height of the list of thumbnails is set by Javascript. It is first set when the player is ready and it adjusts when the window changes size. If you are using modals or any dynamic method to show/hide the player, you will need to trigger this function when the player is shown:

yptThumbHeight();

For example, with Bootstrap modals:

$('#videoModal').on('shown.bs.modal', function (e) { //modal shows
     yptThumbHeight(); //update the thumb height
});

A Javascript event triggers at the end of a playlist. It can used to trigger other events:

jQuery(document).on('playlistEnd', function () { //playlist finished last video
    alert("That's all, thanks for watching!"); //do something
});

스크린샷

  • How the player should appear.
  • Using the shortcode.
  • Getting a Youtube Playlist ID.
  • Adding an element to trigger a video in the playlist.

설치

  1. Upload youtube-playlist-thumbs.zip to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

FAQ

Why develop this plugin?

Youtube recently changed their playlist Iframe layout so that the thumb navigation is collapsed.
Youtube Iframes, without the API, do not work well with modals and similar dynmaic elements.
The Youtube Iframe API allows player control by other page elements such as links and buttons.

How many shortcodes can I use on one post/page?

Just one. Youtube Iframe API is designed to work with one player at a time. Notice that on Youtube.com there is only one video player and links to multiple videos.

How many videos can I have in a playlist?

As of Version 0.5.0 the limit is 200, which is also the maximum number of videos that Youtube allows in one playlist.

후기

2016년 10월 26일 1 reply
Only place one playlist one your site else the plugin does not work .... and I can't find a settings page at all
2016년 9월 3일
Good plugin, works! Would be cool to customize the design of the viewer better in a future version 🙂
2016년 9월 3일
Simple and straightforward. THIS is how you build a plugin for simple and straightforward applications!
2016년 9월 3일
Is it possible to make the plugin/video implementation responsive as well?
2016년 9월 3일
Works perfectly on the latest version of WP. Would be nice if we could have the titles show up below the thumbs.
모든 12 평가 읽기

기여자 & 개발자

“Youtube Playlist Thumbs”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Youtube Playlist Thumbs”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

0.1

Initial release

0.2

Improved ‘playlistEnd’ event.

0.2.5

More global variables for use in custom JS.

0.3.0

.js only loads if shortcode is present.

0.4.0

Thumbnail list limit raised from 25 to 50.

0.5.0

Thumbnail list limit raised to 200. Speed increase.

0.5.1

Private videos in a playlist will be skipped.

0.5.2

Patch for thumbnail clicks not playing video.