MediaManager updates

Sarah Green reported MediaManager troubles. When clicking on media files to make them play, message “could not load media” would appear. Both in her Media Manager windows and with files embedded in blackboard.

Root cause was password protection. She had four folders, each password protected, and protected using old-style “AuthType Kerberos” methods as generated by the password protect utility of  September 23 2012  or earlier. The MediaManager itself uses AuthType WebAuth. Trying to view files protected by Kerberos while logged into an app using WebAuth caused electronic brains to hurt. Proscribed solution was to remove password protection from all 4 folders, then re-enable password protection on all four files. This fixed her troubles viewing files with the media manager.

But embeded files still broke. Why? Media files like “” were now password protected — try to access directly and you would get redirected to to enter credentials. But try to access via old-style embed code…

jwplayer("mediaspace48995").setup({ playlist: [{
file: "" }], height: 360, autostart: false, width: 640});

Media file would redirect, and jwplayer would go, “What? That ain’t no movie!”

Furthermore, The “link” form was on the order


This link is to a PHP script Show.php outside of the protected folder, and fed a folder name and the name of a file inside the folder. Since the script is outside the protected folder, it doesn’t require a password to run. The HTML it produces is the same jwplayer code as above, with the same results.

The “preferred” youtube style ’embed’ using iframes simply wraps the link address above in an iframe

So we’re getting nowhere fast.

We can’t do anything about the base jwplayer code. What we need is to ensure webauth authentication occurs before the media is referenced.

To tha end, I modified the media manager code to dump a copy of Show.php into every sub-directory in podcast_folder. Now link address is

This link is to a PHP script Show.php inside of the protected folder, and fed  the name of a file inside the folder. Since the script is inside the protected folder, it requires a password to run. The HTML it produces is the same jwplayer code as above, but since the script has authenticated, jwplayer has unfettered access to the media as well.

This renders what was recently the “alt” iframe embed code the ‘preferred’ embed code. Works equally well with protected and unprotected  media files. The more verbose embed code only works for unprotected, so it is now labeled old-style.

While I was at it, I also replaced any reference to local copies of jwplayer.js with links to same javascript library on website, ensuring we always have the latest version.

Note that these changes are to the media manger interface itself. All the new better links are generated by the media manager, but old links and bad embed codes in the field are still old and bad. Users need to log into media manager to update their podcast_folders, then manually replace all their old media links in  blackboard to take advantage of the updates.

About Wesley Wright

Born on a mountain top near New York City, Craziest state in the land of the pretty. Raised in the woods so's he knew every tree, Killed him a bear when he was only three.
This entry was posted in Wes and tagged , , . Bookmark the permalink.