Silverlight Media Player plugin for WordPress

At some point I wanted to integrate a Silverlight based player into my blog, so I was looking for a WordPress plugin that would do that. However, I could not find any that was easy enough to use. So I decided to write one myself for self-educational purposes. This post describes and demonstrates the plugin that I wrote and explains how to use it to add Silverlight-based media players to blog posts and pages of a WordPress powered blog.

Description and Features

The plugin has the following features:

  • Default player configuration settings, such as size, thumbnail, auto load and auto play.
  • Per-instance player configuration settings that can be used to customize each individual player within or across blog posts.
  • Unlimited number of players within the same blog post or page.
  • Option to not load players on the home page of the blog. This helps to reduce the amount of content to download for visitors who do not want to watch a video.
  • 6 player styles

Here is an example of how the media player plugin works:

Play Video

(the video may play with interruptions – my server’s internet connection is pretty slow)

Download and Install

Download the plugin from here:

WP Media Player

The plugin has been tested on WordPress versions from 2.5 up to 2.7.  Once you downloaded the plugin files follow these steps to install and configure it:

Step 1: Upload wp-media-player directory (including all files and directories withing) to the /wp-content/plugins/ directory. Make sure that the path to the main plugin php file is /wp-content/plugins/wp-media-player/wp-media-player.php. If path does not look like this then plugin may not show up in the WordPress plugins page.

Step 2: Activate the plugin through the ‘Plugins’ menu in WordPress.

Step 3: Visit the plugin settings options (Options – WP Media Player) for WordPress 2.3.x, (Settings – WP Media Player) for WordPress 2.5.x-2.7

Usage walkthrough

To add a player to a blog post or a page, follow these steps:

Step 1: Encode the video to a Windows Media Video (WMV) format by using Microsoft Expression Encoder or Windows Media Encoder. If you use Windows Media Encoder then follow these instructions to properly encode the video content for Silverlight.

Step 2: Upload the video to WordPress either via FTP or by clicking on “Add Video” in the post editing page:

When uploading the video, take a note of the absolute URL path where the video file has been placed to. Do not click on “Insert into Post” button!

Step 3: Place the following tag inside of the blog post content where you want the video player to appear:

[mediaplayer src=”/absolute/url/path/to/video/file.wmv”]

Usage examples

To use a custom placeholder image instead of the default one use the “thumb” parameter, e.g.:

[mediaplayer src=”/absolute/url/path/to/video/file.wmv”

To specify player’s width and height, use the “width” and “height” parameters, e.g.:

[mediaplayer src=”/absolute/url/path/to/video/file.wmv” width=320 height=240]

To change auto load and auto play settings use “autoLoad” and “autoPlay” parameters, e.g.:

[mediaplayer src=”/absolute/url/path/to/video/file.wmv” autoLoad=1 autoPlay=0]

Please try it out on your WordPress installation and let me know if you find any bugs or if you have any suggestions.

WP Media Player


ruslany on January 7th 2009 in PHP, WordPress

PoorFairAverageGoodExcellent (No Ratings Yet)

60 Responses to “Silverlight Media Player plugin for WordPress”

  1. Gravatar ImageBill Staples responded on 08 Jan 2009 at 11:51 am #

    very cool! you should hook up with the smoothstreaming guys and see if you can use video/bandwidth from the site. that would be a cool demo!

  2. Gravatar ImageSteve Higgins responded on 09 Jan 2009 at 12:14 am #

    Step 1: Unzip plugin files into your /wp-content/plugins/ directory. If you’re uploading it make sure to upload the top-level folder. Don’t just upload all the php files and put them in /wp-content/plugins/.

    I am using FileZilla and copied the “top-level folder” which is the folder called wp-mediaplayer onto my wp-content/plugins directory on my blog.
    I then went into wp-admin under Plugins to Activate but it was not listed as a Plugin that could be activated. Could you go into exact specifics on this step?? txs so much!
    Steve Higgins

  3. Gravatar Imageruslany responded on 09 Jan 2009 at 12:59 am #

    Ok, I think I know what the problem is. When the zip file was unpacked it created an extra wp-mediaplayer folder. So most likely you ended up with the path to the plugin script as /wp-content/plugins/wp-mediaplayer/wp-media-player/wp-media-player.php. That’s what causes the plugin to not show up. You will need to move all plugin files and directories one level up.

    I’ve updated the zip file and the instructions which should help to avoid this confusion in the future.

    Thanks Steve for trying this out and letting me know of this issue.

  4. Gravatar ImageTim responded on 22 Jan 2009 at 11:02 am #

    In your demo I did not see a button on the player for full screen. Is this an option that I would be able to include?

  5. Gravatar Imageruslany responded on 22 Jan 2009 at 12:03 pm #

    Tim, if you double click on the video screen it will go into full screen mode. Also, other templates included with the plugin have the full screen button.

  6. Gravatar ImageToni Guga responded on 28 Jan 2009 at 6:55 am #

    Hello, this is a very cool plugin but i tried this with some real streaming videos served by windows media service 9, i put in src the url for example mms:// but the video doesn’t start, any idea how to implement the support for media files served by windows media streaming server. sorry for my english

  7. Gravatar ImageToni Guga responded on 28 Jan 2009 at 7:41 am #

    I fix it, and it’s so simple just put the path without “” like this [mediaplayer src=mms://×240.wmv]

  8. Gravatar Imageruslany responded on 28 Jan 2009 at 4:56 pm #

    Toni, thanks for reporting this. However, I could not repro the bug with quotes. I used mms-based url in quotes (“”), or without qoutes and it worked in both cases.

  9. Gravatar ImageBAD responded on 31 Jan 2009 at 6:36 pm #

    Hello – thanks for the great WP plugin. I am using a url to the images without the quotes like src=http://www….etc and it works great, however the width and height do not override those in the settings tab. Any advice?

  10. Gravatar Imageruslany responded on 31 Jan 2009 at 11:47 pm #

    This was a bug in the plugin that caused the width and height specified on the player to not work. I have updated the plugin with the fix. To get the fix please download the latest version of the plugin from here:

    Thanks for letting me know about this bug!

  11. Gravatar ImageMatthieu responded on 04 Feb 2009 at 4:42 am #

    Have you some information for Mac user ?

  12. Gravatar Imageruslany responded on 04 Feb 2009 at 10:19 am #

    Matthieu, I do not have any information for Mac users because I do not have Mac. :)

    I see that you deployed the plugin on your site – Cool!

  13. Gravatar ImageEmman responded on 05 Feb 2009 at 5:35 pm #

    Hi Mate,

    First of all, thanks for this wonderfull plug-ins. The looks is absolutely superb. Unfortunately it won’t play my “wmv” file. The player displays on the web but it won’t play the file. If I copy the URL of the file and put it to the address bar, it correctly detects the file. What am I missing?

    I only use wordpress on intranet (local network).


  14. Gravatar Imageruslany responded on 05 Feb 2009 at 7:44 pm #

    Emman, does the player show any errors?

    Also, how did you encode the wmv file? Since the player is silverlight-based, it requires that the video file is encoded by using silverlight-friendly parameters. You can use Windows Media Encoder to encode the wmv by following instructions here:

  15. Gravatar ImageEmman responded on 05 Feb 2009 at 8:17 pm #

    Hi Ruslany,

    Thanks for your prompt reply. Well honestly, I just search for a “wmv” file on the internet and download it to quickly test your plug-in. Most possibly that’s the problem. Anyway, I’ll try to encode a file from scratch and let you know the outcome.


  16. Gravatar Imageruslany responded on 06 Feb 2009 at 9:36 am #

    For test purposes you can download this wmv: __ That’s the file used in the player demo in this post.

  17. Gravatar ImageKatie Nolan responded on 08 Feb 2009 at 11:07 am #


    I am trying to move my website over to WordPress (2.7), but I can’t get this plugin to work. I uploaded the folder, and was able to activate the plugin. But when I add the [mediaplayer src=...] tag into my post, I just get a link that says “Play Video” and does nothing. The link shows as …/wordpress/multimedia/video/#mediaPlayer_49_0.

    Do you know what I am doing wrong? I don’t know if the video is encoded correctly, but I don’t even see the player.


  18. Gravatar Imageruslany responded on 08 Feb 2009 at 12:12 pm #

    Kate, this may happen if the post that contains the [mediaplayer ...] tag does not have a custom field wp_media_player set to 1. Normally this custom field is set automatically by plugin whenever you save your post.

    Can you open your post in “Edit Post” UI, expand the “Custom Fields” section and check if there is a custom field called “wp_media_player”? If there is no such field then create it and assign it a value of 1.

  19. Gravatar ImageAlex responded on 08 Mar 2009 at 3:33 pm #


    I’ve the same problem as Kate.
    I’ve checked your suggestion: the post, that contains the [mediaplayer .. ] tag has the “wp_media_player” custom field, and the value is “1″.

    I don’t get an error, any message, just nothing.

    I don’t know what is the problem.
    If you can, please give me an advice!

    Thank you!


  20. Gravatar Imageruslany responded on 08 Mar 2009 at 3:53 pm #

    Alex, it looks like the custom field is not a problem here. When I request __, it gives me 404 (File Not Found) response. That’s what is causing the player not to show up on the page.

    I think the reason it happens is because your web server is case sensitive and in the scripts folder, for some reason, all the file names have been converted to lower case. If you rename the files in that folder to be as below (the capital letters preserved), then the player should work:


  21. Gravatar ImageAlex responded on 10 Mar 2009 at 9:12 am #


    Thanks for the help!
    It’s working now ;)
    I think that my FTP client converted the filenames to lowercase format when it uploaded the files.



  22. Gravatar ImageBruno responded on 11 Mar 2009 at 8:55 am #

    Hi Ruslan,
    First of all: it works fine, nicely done, thank you.

    But I had to play around a bit, because I do not read manuals ;-) and I am new to wordPress.

    1. I use the player in a normal page and had the problem, that the custom field wasn’t set. I added it as you described for Katie above and the player worked. Whenever I update the page: Custom-field and player disappear.
    2. I then checked the “Show Player on Home Page” in the settings of the plugin, and now the player is always there. Fine. Maybe the description should be “Show Player on Pages”, as I thought of THE home page.


  23. Gravatar Imageruslany responded on 11 Mar 2009 at 4:28 pm #

    Hi Bruno, thanks for taking time to report these bugs. I will make sure they are fixed in the next update of the module.

  24. Gravatar ImageWP Silverlight Media Player Plugin | WordPress Plugins Database - responded on 14 Mar 2009 at 2:36 am #

    [...] plugin allows addition of Silverlight-based media players to WordPress blog posts and pages… … more Download Plugin! Plugin Owner: Ruslan Yakushev Homepage: Visit Plugin’s Website Version [...]

  25. Gravatar ImageJanis responded on 02 Apr 2009 at 6:14 pm #

    Hi Ruslany.
    Thanks for the plugin.

    But I just can’t seem to get this to work. I have the same problems as Katie and Alex. I have the custom field and the right url to the file. But the player doesn’t show. If the “Show Player on Home Page” is checked I get the “Play Video”, but it wont show up when I click it.

    Do you have any idea what could be wrong or what I’m doing wrong?

    PS! The files have not been converted to lower case, but I do get an error saying “illegal character” in Silverlight.js (line 8) and “Silverlight is not defined” in StartPlayer.js (line 4). And I’m not an expert and don’t know what to do about this.

  26. Gravatar Imageruslany responded on 03 Apr 2009 at 9:16 am #

    This was caused by the Silverlight.js file being saved as little endian Unicode. I’ve updated the file to be in UTF-8 now. If you download the plugin from wordpress plugin directory, it now has the correct version of Silverlight.js file.

  27. Gravatar ImageRuslanY Blog responded on 25 Apr 2009 at 10:52 pm #

    Silverlight Media Player for WordPress – Update…

    Since the Silverlight Media Player plugin for WordPress was published in January 2009, it has been downloaded more than 900 times. It is being used in many web sites all over the world – here are just a couple of examples: Tribord Amure par Matthieu an…

  28. Gravatar ImageBillie responded on 04 May 2009 at 6:39 pm #

    Help Needed, Please!

    First I downloaded the Microsoft Expression Encoder – the program was so heavy that it kept crashing my computer, wouldn’t even allow me to remove from control panel. I finally got it deleted.

    Then I downloaded Windows Media Encoder, I didn’t know if you meant the Encoder 9 Series or the EncoderSDK because it talks about using the SDK on the page for the profiles. I downloaded the Profiles and added them to Encoder9 profiles.

    I attempted to convert my file (which was already a wmv) and I didn’t know what options to select in terms of Distribution and I selected Windows Media server (not sure why, a guess).

    I uploaded the resulting wmv, put a link in the body of a page copying the examples you gave, using the full path to my file on my server.

    What I get is a text link in the page that says Play Video which, when you click it, does nothing.

    Which of these several steps do you guess I’m getting wrong? (sorry for this long question)

  29. Gravatar Imageruslany responded on 05 May 2009 at 10:43 pm #

    Finally, figured out why many people reported seeing the “Play Video” link instead of the player in the blog post or a page. This happens only if you use PHP 4.X. The latest version of the plugin at has fixes for this and other bugs that caused errors when using PHP 4.X. Thanks to all who have reported this problem!

  30. Gravatar ImageSusie responded on 09 Jul 2009 at 3:44 pm #

    Hi – I am struggling with this – pretty novice when it comes to streaming. I have a video that is 21MB – there and is a wmv. I have downloaded and added the software above that is suggested. Windows Media Encoder – not sure how to encode it though?

    Please let me know

  31. Gravatar Imageruslany responded on 09 Jul 2009 at 7:55 pm #

    Hi Susie, please follow the instructions at WP Media Player – Video Encoding in order to correcly encode the video for the plugin.

  32. Gravatar ImageShabbir responded on 28 Jul 2009 at 7:27 am #

    I’m trying to get the wp-media-player plugin working with our new site – and it’s working fine with Firefox (tested on 3.5) – but with IE (7 or 8) I keep getting the following error:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30618; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
    Timestamp: Tue, 28 Jul 2009 14:22:58 UTC

    Message: Object doesn’t support this property or method
    Line: 5
    Char: 12896
    Code: 0

    Any ideas?

    Otherwise, excellent plugin.

    Warm Regards,


  33. Gravatar ImageRuslanY Blog responded on 15 Aug 2009 at 3:33 pm #

    New release of Silverlight Player for WordPress…

    Today I have published a new release of the WP Silverlight Media Player plugin for WordPress. In addition to a few important improvements and optimizations, it contains a new feature that allows to track the number of times the video files have been wa…

  34. Gravatar Imagesupereek responded on 19 Aug 2009 at 7:19 am #

    Hi, thanks for wonderful plug-in. However i got the same error as Shabbir. IE7 won’t play a file. It works everywhere else like safari, firefox.
    Any clue? Thanks again.

  35. Gravatar Imageruslany responded on 19 Aug 2009 at 10:28 am #

    Thanks for reporting this. It was a bug in the JavaScript code used by the plugin. If a page HTML contained a tag with id set to "title" it caused the player to fail. The latest update at the plugin homepage has the fix.

  36. Gravatar Imagebondiblob responded on 08 Oct 2009 at 5:40 am #

    crashing my safari

    why would that happen every time i load the page with the silverlight plugin video and it crashes Safari it don’t even load

  37. Gravatar Imagebondiblob responded on 08 Oct 2009 at 5:42 am #

    oh if you can check

  38. Gravatar Imageruslany responded on 08 Oct 2009 at 7:47 am #

    @bondiblob: Thanks for reporting this. I tried to repro the problem and even though the safari did not crash for me it played the video in a very weird way.

    I noticed that you are using mp4 format for the video. I think this is what is causing the problem. According to this ( the mp4 format support has been added to silverlight very recently and it looks like it may still have some problems on Safari. It also did not play well for me on Google Chrome. It only worked well in Internet Explorer.

    The only thing I can suggest it to re-encode the video into the WMV format (one way to do it is described here: I tried to re-encode it myself to confirm but I do not have a software that can decode mp4 format.

  39. Gravatar Imagedanni responded on 20 Dec 2009 at 9:30 pm #

    If the url of the video is password protected is it possible to display it on our post?

  40. Gravatar Imageruslany responded on 21 Dec 2009 at 8:18 am #

    @danni: I do not think it is possible. The underlying silverlight player object does not support authentication.

  41. Gravatar Imageleon responded on 24 Jan 2010 at 6:54 am #

    Installed the 2.9 WordPress and this plugin. (Said compatible up to 2.8 so tried it on the latest 2.9 edition). Ok, I downloaded one of the WMV SQL tutorials from microsoft and tried in the player. I get error that the file does not exist or that it is encoded incorrectly. OK, I tried a couple other wmv files and the same error. Then I verified the address by downloading the file from the location specified in the ‘media,,’ tag over the internet. Same error. This must be an error that was introduced by the latest wordpress version. Have you tested on the latest version? Are there any plans to upgrade? What timeframe is planned if the upgrade is coming? BTW: I appreciate and thank you for your efforts and your contribution to independent web development.

  42. Gravatar Imageruslany responded on 25 Jan 2010 at 1:33 pm #

    @leon: the plugin is supposed to work with 2.9. My site is running on WP 2.9 and the plugin works fine.

    Can you give the URL of the page on your site that has the player and I will investigate more? You can use the contact form to send me the url if you do not want to share it publicly.

  43. Gravatar Imagesay7a responded on 28 Jan 2010 at 4:57 am #


    first , thx 4 the plugin, but i have a little problem , in adding mms streaming video from external site , by adding this code :

    [mediaplayer src=mms://]

    but it`s not working :(

    am i do it in the wrong way ? please help me

    and thanks in advance

  44. Gravatar Imageruslany responded on 28 Jan 2010 at 10:10 am #

    @say7a: yes, it indeed does not work for this url. The Silverlight media element fails to open this file, even though Windows Media Player can play it. The media player raises exact same error as described in this forum thread: Please try enabling WMS Http Service Control Protocol in your Windows Media service as suggested in that forum thread.

  45. Gravatar ImageKaren Furst responded on 24 Mar 2010 at 8:14 am #

    Thank you so much – this saved me! I had a 9mb file to upload with a server max of 7mb.

  46. Gravatar ImageJames Hannan responded on 05 Apr 2010 at 2:33 am #

    Hi Ruslany
    is the plugin supposed to say “click here to download”.
    You can see the video at

    thanks for everything


  47. Gravatar Imageruslany responded on 05 Apr 2010 at 10:03 am #

    Hi James, no, the plugin is not supposed to do that. That functionality is not implemented.

  48. Gravatar ImageClaudia responded on 26 Jun 2010 at 8:48 am #

    Hi ruslany, thanks for the plugin! I am using wordpress 2.9, but could install the plugin, I don’t see it in the settings though.
    When I use the mediaplayer tag a banner come up on my webpage saying “Install Microsoft Silverlight”.
    Does everybody who wants to see my video need to download that Silverlight?

  49. Gravatar Imageruslany responded on 28 Jun 2010 at 5:41 pm #

    Hi Claudia, Please take a look at the updated instructions here: The settings page for the plugin are in the different location now.

    Regarding installing Silverlight. Yes, anybody who wants to watch video will have to install Silverlight on their machine. There is no way around that unfortunately.

  50. Gravatar Imagesteven responded on 11 Jul 2010 at 11:05 am #

    Great idea.. but how to I allow more then a 2mb file? Most of my clips would be closer to 10 to 15 mb.

  51. Gravatar Imageyolla responded on 22 Aug 2010 at 3:03 pm #

    I have windows vista on my 2 years old pc. Do I need to install/download Silverlight or not?

  52. Gravatar Imageruslany responded on 27 Aug 2010 at 1:39 pm #

    Yes, this plugin requires that Silverlight is installed on the client accessing the web page. Silverlight does not have to be installed on the server where web site is hosted.

  53. Gravatar ImageMichal responded on 02 Dec 2010 at 5:17 am #

    I’am trying to add mms streaming video from external site mms://
    and it doesn’t work, but Windows Media Player can play it. WordPress whit your plugin is hosted on Ubuntu server and I’m using Windows Vista as a client. Can you help mi with this?

    Thanks in advance.

  54. Gravatar Imagelasha responded on 24 Jan 2011 at 5:53 am #

    Thanks for Great plugin
    How can add more player styles, or modify it

  55. Gravatar ImageNathan responded on 26 Jan 2011 at 5:30 am #

    We have been using this plugin at for a while now and love it. It is one of the only ways I can play my archived streaming content that allows the viewer to fast forward. We stream live using windows encoder and capture the wmv file for archives.

    The only problem I have is I cannot change the player style. When I save the change it goes directly to my web site, not back into wp-admin. The changes does not take effect. Any suggestions.

    Another feature I would like to find is a pull down video selection that points to a directory of archived videos or someway to click on a link and have it open that file in silverlight. I have hundreds of videos and I cant make a player for all of them. Any suggestions?

  56. Gravatar Imageruslany responded on 26 Jan 2011 at 7:48 pm #


    This is strange that it does not save the selected player style. Does it save any other plugin configuration, e.g. player size, etc? Which version of WordPress is it? As a workaround for now, you can try changing the setting directly in the wordpress database. This is located in the wp_options table; the setting name is wp_mediaplayer_style.

  57. Gravatar Imageruslany responded on 26 Jan 2011 at 7:52 pm #

    @lasha – unfortunately, currently it is not possible to easily add new styles and in order to modify the existing styles it requires an extensive knowledge of Silverlight.

  58. Gravatar ImageNathan responded on 09 Feb 2011 at 8:12 pm #

    I just upgraded to 3.0.5 just to see if that would fix it and I still have the same issue. I cannot change anything in the settings. When I attempt to save the changes, it take me out of wp-admin and back to my main page on my web site. None of the changes take effect.

  59. Gravatar Imageruslany responded on 09 Feb 2011 at 11:17 pm #

    Hi Nathan, would you be able to run Fiddler while trying to save the changes? Once you repro the problem, save the session output to a text file and contact me via the contact form.

  60. Gravatar Imagechristophe responded on 09 Aug 2011 at 3:49 am #

    Hi, great stuff, working fine,

    thanx a lot for sharing your work,

    I would like to add that there is a freeware that can make WMV video conversions compatible with Silverlight (no need to mess up with Expression), it’s called Format Factory, you can google to find it easily,

    One thing that could be really nice about your plugin,
    is the ability to load or preload several videos in the same plugin window rather than one video for one plugin, & choosing by right clicking which video to look at,

    anyway it’s working great like it is so far.

Trackback URI | Comments RSS

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

XML Markup: If You want to add XML code to the comment please XML encode it first, otherwise the code will not show up.

Recently Published Articles