🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

yt-links-parser is a jQuery plugin that parses the Youtube links within your web content and embeds the corresponding video player in your document.

video Youtube

Documentation

yt-links-parser

jquery plugin that converts youtube movie links within html document into embedded movie iframes plugin can also convert links into img tags that are replaced with autoplayed movies after click

Installation

Download files and include script after the jQuery library (unless you are packaging scripts somehow else):

<script src="/path/to/yt-links-parser.js"></script>

If you want use ytLinksParseToImage methos you should also include css file:

<link rel="stylesheet" type="text/css" href="/path/to/yt-links-parser.css">

Probably you will like to change path to play image (yt_play.png) in css file.

Usage

To replace all occurrences of youtube links with actual youtube movies (iframe code):

$("#container").ytLinksParse();

To replace all occurrences of youtube links with images from movie (autoplay after click):

$("#container").ytLinksParseToImage();

If you want to change width and height of the movie or darken option (default: true) you can pass an object containing width and height properties:

$("#container").ytLinksParse({width:640, height:390, darken: false});

Both methods support object param.


You May Also Like