How to validate youtube url in client side in text box

Here is the code which validates the youtube url- function validateYouTubeUrl() { var url = $(‘#youTubeUrl’).val(); if (url != undefined || url != ”) { var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=|\?v=)([^#\&\?]*).*/; var match = url.match(regExp); if (match && match[2].length == 11) { // Do anything for being valid // if need to change the url to embed … Read more

Posting an embedded video link using the Facebook Graph API

It appears that you have to extract the URLs of the actual swf in the page and the thumbnail image yourself. For example, this seems to work: curl -F ‘access_token=…’ \ -F ‘message=Link to YouTube’ \ -F ‘link=http://www.youtube.com/watch?v=3aICB2mUu2k’ \ -F ‘source=http://www.youtube.com/v/3aICB2mUu2k’ \ -F ‘picture=http://img.youtube.com/vi/3aICB2mUu2k/0.jpg’ \ https://graph.facebook.com/me/feed It appears that you can generate a valid source … Read more

How do I automatically play a Youtube video (IFrame API) muted?

Youtube don’t provide muting through url parameter (see http://code.google.com/apis/youtube/player_parameters.html). You have to use javascript for that. see http://code.google.com/apis/youtube/js_api_reference.html for details. However, please note the warning on the page linked above: “The deprecation of the YouTube JavaScript Player API was announced on January 27, 2015. YouTube Flash embeds have also been deprecated. See the deprecation policy … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)