Thursday, April 19, 2007

Trick for adding a default image to a Windows Media Player video








When you're surfing the net you see a lot of videos with a default image before it's playing. An embedded HTML video that uses Windows Media Player doesn't have that option. We found a little trick to make it look like there is a default image before it's playing and after it's finished. You can easily implement these function in a javascript in the head of your page.

Steps:
1. When loading the video, you hide the video and you show a default image. Hiding the video is possible by setting the default property document.video.uiMode = 'invisible'
2. Set the uiMode property to 'none' when the video starts playing (check on playing with the property: currentPosition (!= 0)).
3. The image will pop up again after playing because the currentPosition will be zero again.

that's it, add a cool background image like ours :p

No comments: