Category Archives: Web Development

VideoJS m3u8 example

Here is an example of how to use video.js with HTTP Live Streaming (HLS) with an m3u8 playlist file: < !doctype html> <html> <head> <link rel=”nofollow” href=”http://vjs.zencdn.net/c/video-js.css” rel=”stylesheet”/> <script src=”http://vjs.zencdn.net/c/video.js”></script> </head> <body> <video id=”my_video_1″ class=”video-js vjs-default-skin” controls preload=”auto” width=”640″ height=”264″ poster=”my_video_poster.png” data-setup=”{}”> <source src=”http://server.name.tld/HLS/path.m3u8″ type=’application/vnd.apple.mpegurl’/> </video> </body> </html> via

Posted in Web Development | Tagged , , , | 3 Comments

How to use HLS (HTTP Live Streaming) with Amazon CloudFront

I have a mp4/h.264 video that is a around 300mb. I would like users to be able to watch it on both desktop browsers and mobile devices. I have the video file stored on Amazon S3. I have two cloudfront sources enabled – one for download and one for streaming. I know I can use something like VideoJS to play the file with the ‘video/mp4’ source being the “download” cloudfront source which, I believe, plays while the file is being downloaded – I think this is called “progressive download” but it is not true streaming. I also realize that I can use something like JWPlayer and the “streaming” cloudfront source to give users on a desktop device, or a device that supports flash, the RTMP streaming experience. The problem I’m facing is poor performance on iOS devices – especially ones with limited bandwidth. From what I’ve been reading HTTP Live Streaming (HLS) seems to be the only “streaming” protocol that iOS devices really support. And as far as I can tell, Amazon Cloudfront only natively offers RTMP streaming of uploaded mpeg/h.264 files (not HLS). Amazon has a Live Smooth Streaming tutorial for use with Amazon CloudFront which appears to be, in a nutshell, a Windows IIS server running Adobe Flash Media Server and pushing out the HLS stream via Amazon Cloudfront. So, my questions were: If I want to push H.264/mpeg4 files “streaming” to iOS devices or HTML5 players, is the “right” way to do this to use HLS? Can … Continue reading

Posted in Web Development | Tagged , , , , , , | 2 Comments

Using VideoJS with YouTube

I have been using VideoJS for some streaming videos and mp4 videos, but also wanted to pull YouTube videos into the player along with the other videos I had on the site. First of all, the working example. Then, the list of problems ;) VideoJS and Youtube Example How to replicate the Youtube and VideoJS integration: First, clone or download this fork of videoJS and build it. Next, place this in your webpage’s <head> (needs to be there to work with older browsers). Also fix the odd character after the href in the first line (sorry about that) and make sure the path points to the correct location for the files. <link href≠”/video-js/video-js.css” rel=”stylesheet” type=”text/css”/> <script src=”/video-js/video.js”></script> And then place this in your document’s <body>: <video id=”example_video_1″ class=”video-js vjs-default-skin” controls preload=”none” width=”640″ height=”360″ data-setup='{“techOrder”:[“youtube”,”html5″],”ytcontrols”:false}’> <source src=”http://www.youtube.com/watch?v=v1uyQZNg2vE” type=’video/youtube’ /> </video> There is also an example file in the dist directory which will only be created after you “build” the fork you have cloned from github. VideoJS and Youtube Problems With Integration I tried simply giving VideoJS the URL to the YouTube video but that didn’t workout so well. Here are a few things that might help you out with playing You Tube videos in Video JS: There is a pull request for changes that would allow VideoJS to work with YouTube. A few problems with it are: Has not been pulled in Both the Video JS maintainer and the pull requestor have become busy with other projects so it might not … Continue reading

Posted in Tech Tips, Web Development | Tagged , , , | 1 Comment

How to Select a jQuery UI tab with Javascript

The documentation for jQueryUI tabs is a bit cryptic. It was not immediately clear how to Select a jQuery UI tab with Javascript, but I got it working with this little bit of code: $( “#tabs” ).tabs( ‘select’, “#profile” ); #profile is the id of the tab you would like to select, and #tabs is the element you set up the tabs on by calling $( “#tabs” ) You may also have to use jQuery instead of $ if you have noConflict mode enabled, the tabs need to be initialized first (as previously mentioned), and it is possible you will need to put all this info inside the ‘jQuery document ready’ wrapper: jQuery(function($){ $( “#tabs” ).tabs( ‘select’, “#profile” ); });

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment

Authorize.Net API: billToCountry Format

With the Authorize.Net API if you are setting up a customer payment profile or just setting a billing address you need to make sure the format of the country is set correctly. Here is an example: $paymentProfile->billToCountry = ‘USA’; And another variation: $paymentProfile->billToCountry = ‘United States of America’; Authorize.net (auth net) will allow multiple formats of country names for billToCountry and shipToCountry

Posted in Tech Tips, Web Development | Tagged , | Leave a comment

authorize.net getCustomerProfile example

Here’s an example of how to get use getCustomerProfile() with authorize.net: // define your api key and do your include define(‘AUTHORIZENET_API_LOGIN_ID’, ‘xxxxx’); define(‘AUTHORIZENET_TRANSACTION_KEY’, ‘xxxxxxx’); // include the sdk require_once(‘/lib/AuthorizeNet.php’); // now make the request $request = new AuthorizeNetCIM; $response = $request->getCustomerProfile($customerProfileId); You will have a nice XML (or SOAP) response that you can parse and use the data from.

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment

E00044 – Customer Information Manager is not enabled [solved]

If you are using the Authorize.net CIM API for web services and are ending up with a XML / SOAP response (SimpleXMLElement Object) with the error: E00044 – Customer Information Manager is not enabled If you have a production Authorize account Authorize.Net requires you to agree to the CIM Terms of Service before the API can be enabled. Please perform the following steps below. Log into your Authorize.Net Account Click Account Click “Merchant Profile” Under “Additional Services” click the “sign-up” link where CIM is listed. Agree to the Terms and Services If you have a Authorize.net / auth.net sandbox account and you do not have CIM enabled: “Customer Information Manager (CIM) is not available within shared test accounts. If you need to process CIM transactions, please request a new test account at: http://developer.authorize.net/testaccount/.”

Posted in Security, Tech Tips, Web Development | Tagged , , , | Leave a comment

Stamps.com unable to print PDF anymore

Stamps.com has upgraded their website with a new plugin that only allows printing directly to your printer. Why? Stamps.com says: USPS security regulations require Stamps.com to prevent anyone from printing postage to a PDF. For this reason, when you attempt to do so one of two things may happen: – You will receive a runtime error followed by the software closing without warning – You will receive error message 80004005 Stamps.com only supports select browsers like Firefox because of this security regulation. Many users were able to print with a system dialog before but now are altered that: To print or preview postage, you are required to install a small plugin. Click the install button and follow the instructions. After installation, you will be able to print postage. Note: During installation, if you are prompted for any settings or inputs, please leave the default values (including destination folder) unchanged, as this can prevent the plugin from working properly. If you do not see the installer window, it may be appearing behind your browser window. Please minimize your browser to see if the installer window is visible.

Posted in Tech Tips, Web Development | Tagged , , , | Leave a comment

HackRepair.com Blacklist

Recently I was checking out the Better WP Security plugin for WordPress and noticed that the plugin comes with a cool blacklist of useragents from HackRepair.com (btw that website seems to have a lot of great info on fixing hacked wordpress sites). Anyhow I found that after installing the plugin my .htaccess file was updated and included a new section to block malicious IPs and user agents. The list looks like this:

Posted in Security, Server Admin, Tech Tips, Web Development | Tagged , | Leave a comment

What is box.com?

I just saw an ad for box.com and visited their site and watched their video. They appear to be most similar to dropbox with some resemblance to sendbigfile / kicksend and also some functionality of Google Docs. From their homepage (without watching the video) I had a hard time understanding what they did. They have a cloud based service and a fairly simple API that you can use to connect with it. It seems interesting but I’m not sure it will gain enough support to be around in the long run. Hopefully they will – competition is good.

Posted in Software, Tech Opinion, Web Development | Tagged , | Leave a comment