Thursday, July 30, 2009

Sending a PLAY event to the JW Player

The JW Players by longtail video are used to display a video player control on a web page. In script, you can send events to the player to programmatically load and play a video, like this:

function initWMVPlayer(objPlayer, theFile) {
objPlayer.sendEvent('LOAD', theFile);
objPlayer.sendEvent('PLAY', 'true');
}

This seemed to work when I associated it with the click event on a playlist, but sporadically. Sometimes it worked on the first click, sometimes on the 2nd click. Then I found some references (this blog and this forum) that said you always should have a delay before sending the PLAY event. So the function should look like this:

function initWMVPlayer(objPlayer, theFile) {
objPlayer.sendEvent('LOAD', theFile);
setTimeout(function() {objPlayer.sendEvent('PLAY', 'true');}, 50);
}

Tuesday, July 28, 2009

Friday, July 24, 2009

Server Side Includes

Useful when developing initial HTML models of sites: using server side includes to cut up pieces of HTML that are shared over several pages. Note that this won't work if your page is a .html file. It has to be something like a .asp or .aspx file hosted on a web server.

Monday, July 20, 2009

MOSS Error : The resource cannot be found

I should have looked for this earlier and saved some time:
Resolve Error : The resource cannot be found

Oh yeah, you also can't comment out @Register directives in the .master page with "<!-- -->" comment blocks. It has to be done with server-side comment blocks: "<%-- --%>". I thought I had commented-out the @Register directives for some missing controls, but turns out I didn't.

Saturday, July 18, 2009

The Lagom LCD monitor test pages

Calibrate your LCD screen using the test images here.

ClearType font smoothing on Vista

Consolas is a great font for programming, because it's fixed-width and you can easily distinguish 0's and 1's. But the font looks terrible if font smoothing isn't set to "ClearType".

Steps for setting font smoothing on Vista:
  1. Right-click on the desktop and select "Personalize"
  2. Click on "Window Color and Appearance"
  3. Click on "Open classic appearance properties for more color options"
  4. On the "Appearance Settings" dialog that appears, click on the "Effects..." button
  5. Place a check mark on "Use the following method to smooth edges of screen fonts"
  6. Select "ClearType" on the dropdown list
  7. Click OK a couple times

Thursday, July 9, 2009

Cleaning MS Word content for authoring content managed sites

Here's a quick way to convert an MS Word document into HTML for use in authoring content managed sites.
Idea is from the Computer Tricks blog:
  1. Send the .docx document as an attachment to a message to yourself using GMail.
  2. Open the message.
  3. Click the "View as HTML" link for the attachment.