How to validate youtube video ids?

See this thread for official info. you can hit this: http://gdata.youtube.com/feeds/api/videos/VIDEO_ID (Page now returns: “No longer available”.) and determine if the video is valid based on response There’s no way you can check the validity of the ID with RegEx, since not all alpha-numeric values are valid ID’s. p.s. i’m pretty sure i saw “dashes” … Read more

Get Youtube information via JSON for single video (not feed) in Javascript

UPDATED 2018 API v2 deprecated. New youtube api v3 works only with developer token and has limitation for free connections. You can get JSON without API: http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=ojCkgU5XGdg&format=json Or xml http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=ojCkgU5XGdg&format=xml new 2018 json response has { “html”: “<iframe width=\”480\” height=\”270\” src=\”https://www.youtube.com/embed/ojCkgU5XGdg?feature=oembed\” frameborder=\”0\” allow=\”autoplay; encrypted-media\” allowfullscreen></iframe>”, “title”: “Creativity and Drugs (Eng Sub)”, “thumbnail_height”: 360, “provider_name”: “YouTube”, … Read more

AngularJS multiple expressions concatenating in interpolation with a URL

An alternative to @tasseKATT’s answer (which doesn’t require a controller function) is to use string concatenation directly in the expression a filter: angular.module(‘myApp’) .filter(‘youtubeEmbedUrl’, function ($sce) { return function(videoId) { return $sce.trustAsResourceUrl(‘http://www.youtube.com/embed/’ + videoId); }; }); <div ng-src=”https://stackoverflow.com/questions/23405162/{{ video.id.videoId” youtubeEmbedUrl }}”></div> I’ve found this particularly useful when using SVG icon sprites, which requires you to … Read more

how to set up default download location in youtube-dl [closed]

You need to use the -o switch with the Configuration file Output on youtube-dl is handled with the –output or -o switch; pass it as an option, followed by the destination you want to save your downloads to: youtube-dl -o “%USERPROFILE%\Desktop\%(title)s-%(id)s.%(ext)s” www.youtube.com/link/to/video Note that -o has a dual function in that it also sets a … Read more

How to play Youtube video in ExoPlayer in Android?

I’ve written a class that retrieves actual YouTube video streaming URL for format like DASH and HLS using http://www.youtube.com/get_video_info?&video_id=[video_id]&el=info&ps=default&eurl=&gl=US&hl=en url with video ID as described by Karim Abdell Salam. I have also tested the URL in an app that uses ExoPlayer and it works: import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import … Read more

Displaying a YouTube video with iframe full width of page [closed]

To make a You Tube Video full width and preserve the height (and keep it responsive) you can use the following setup. .videoWrapper { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 25px; height: 0; } .videoWrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } <div class=”videoWrapper”> <!– Copy & … Read more

How can I make the YouTube player scale to the width of the page but also keep the aspect ratio?

What i believe to be the best CSS solution. .auto-resizable-iframe { max-width: 420px; margin: 0px auto; } .auto-resizable-iframe > div { position: relative; padding-bottom: 75%; height: 0px; } .auto-resizable-iframe iframe { position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; } <div class=”auto-resizable-iframe”> <div> <iframe frameborder=”0″ allowfullscreen=”” src=”http://www.youtube.com/embed/_OBlgSz8sSM”></iframe> </div> </div> Demo http://jsfiddle.net/46vp592y/

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