Force youtube embed to start in 720p

(This answer was updated, as the previous method using vq isn’t recognized anymore.) Specifying the height of the video will change the quality accordingly. example for html 5; <iframe style=”width:100%; height:800px;” src=”https://www.youtube.com/embed/xxxxxxxx”></iframe> If you don’t want to hardcode the width and height you can add a class to the iframe for css media queries. Tested … Read more

How to embed a Google Drive folder in a web page

Go to your Google Drive. Right-click on the folder. Select Share. Open the General access drop-down menu. Select Anyone with the link to publish your folder. Click Copy link and then Done. You will get a URL like the following: https://drive.google.com/drive/folders/1qGwpjmQIQO8rN1odas0njDSf72VRrTCa?usp=sharing You can see your folder ID in bold: 1qGwpjmQIQO8rN1odas0njDSf72VRrTCa Google Drive folders can be … Read more

Embed font into PDF file by using iText

If you are doing more work with iText, you may want to invest into the iText book – it has examples for all the features of iText. There is a parameter that you specify when you create your font that defines font embedding: BaseFont helvetica = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.EMBEDDED); Font font = new Font(helvetica, 12, … Read more

How to Embed/Link binary data into a Windows module

Right click the resource script (.rc file) Choose Import http://msdn.microsoft.com/en-us/library/saced6x2.aspx You can embed any “custom” file you want, as well as things like .bmps and stuff VisualStudio “knows” how to edit. Then you can access them with your framework’s resource functions like FindResource LoadResource etc… If you don’t have a resource script. Click Project Add … Read more

start/play embedded (iframe) youtube-video on click of an image

The quick and dirty way is to simply swap out the iframe with one that has autoplay=1 set using jQuery. THE HTML Placeholder: <div id=”videoContainer”> <iframe width=”450″ height=”283″ src=”https://www.youtube.com/embed/VIDEO_ID_HERE?wmode=transparent” frameborder=”0″ allowfullscreen wmode=”Opaque”></iframe> </div> Autoplay link: <a class=”introVid” href=”#video”>Watch the video</a></p> THE JQUERY The onClick catcher that calls the function jQuery(‘a.introVid’).click(function(){ autoPlayVideo(‘VIDEO_ID_HERE’,’450′,’283′); }); The function /*——————————– … Read more

How can I use Perl libraries from PHP?

You could also use PHP::Interpreter from CPAN. This allows you to embed a PHP interpreter in Perl and also, more usefully for you, to create a Perl object in PHP: <?php $perl = Perl::getInstance(); $fh = $perl->new(“IO::File”, “<$file”); while($fh->getline()) { # … } ?>

Embedding Windows Media Player for all browsers

The following works for me in Firefox and Internet Explorer: <object id=”mediaplayer” classid=”clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95″ codebase=”http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701″ standby=”loading microsoft windows media player components…” type=”application/x-oleobject” width=”320″ height=”310″> <param name=”filename” value=”https://stackoverflow.com/questions/164/./test.wmv”> <param name=”animationatstart” value=”true”> <param name=”transparentatstart” value=”true”> <param name=”autostart” value=”true”> <param name=”showcontrols” value=”true”> <param name=”ShowStatusBar” value=”true”> <param name=”windowlessvideo” value=”true”> <embed src=”https://stackoverflow.com/questions/164/./test.wmv” autostart=”true” showcontrols=”true” showstatusbar=”1″ bgcolor=”white” width=”320″ height=”310″> </object>