Most online video players have heavy code, which slows page load. My Plugin adds only picture of the player, after a user clicks on it, the player code is loaded.
Demo
Vimeo Example
0
Also this plugin adds YouTube and Vimeo button to the MCE, that pasts youtube shortcode in the post.
Installation
1. Upload ‘/video-onclick/’ to the ‘/wp-content/plugins/’ directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress
3. Add in post or page shortcode
Video container structure
Popup:
1 2 3 4 5 6 7 | <div class="video-onclick-wrap"> <div class="video-onclick-main"> <div class="video-onclick-close" onClick="closevoutub('id')">Close button</div> <div class="video-onclick-content">Video player</div> <div class="video-onclick-info">Information text</div> </div> </div> |
Inline:
1 2 3 4 5 | <div class="video-onclick-inline"> <div class="video-onclick-close" onClick="closevoutub('id')">Close button</div> <div class="video-onclick-content">Video player</div> <div class="video-onclick-info">Information text</div> </div> |
CSS Example
This CSS is used on my site
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | div.video-onclick-close{ text-align:right; margin-right:0px; color:#cc0000; cursor: pointer; } div.video-onclick-info{ margin-top:20px; width:730px; height:90px; } div.video-onclick-content{ top:10px; margin-left:40px; width:640px; height:390px; z-index:101; } div.video-onclick-wrap { position:fixed; background-color:rgb(0, 0, 0); top:0px; left:0px; opacity:1; height:100%; width:100%; z-index=99; } div.video-onclick-click-div{ background-color: #000000; background-repeat: no-repeat; background-position:center center; width:640px; height:390px; } img.video-onclick-play-button { border-style: none; margin: 150px 270px; } |
Version History
0.4.6
- NEW: Option to disable pop-up video
- FIX: Fatal error while activation in 0.4.5 version
0.4.5
- NEW: Added pagination to errors table
- FIX: Error with getting ID of the posts with errors
- FIX: Adding error videos to cache
0.4.4
- NEW: Vimeo shortcode now provide Thumbnail, New Popup window with CSS support, Error reporting
0.4.3
- NEW: Table in options, that shows youtube videos that had error for last 72 hours and in which post.
- NEW: Default CSS file. Can be switched off in options.
0.4.2
- NEW: Design of the thumbnail in text
- NEW: Title is loaded from Youtube or can be entered in shortcode attribute title=”"
- NEW: Play button in the center of the image. It can be configured in options, or in shortcode attribute play_img=”"
0.4.1
- FIX: Error when youtube video does not exist
0.4
- NEW: Thumbnails for youtube videos are parsed from youtube and cached.
- NEW: New popup windows structure with DIVs and CSS
- NEW: Special DIV that can be configured to show certain HTML code
- NEW: Option to change and design Closing button
0.3
NEW: Vimeo support
NEW: Vimeo shortcode
0.2
NEW: Google Analytics async tracking code
0.1
NEW: MCE button
NEW: youtube shortcode
Known Issues
If page contains several videos with same id, then video will be played on earliest picture.
Неправильная раскладка: мшвущ щтсдшслПонравилась статья? Посоветуйте друзьям!
| | Tweet |
Понравилась статья? Подпишись на рассылку по E-Mail или в RSS.


Русский



