Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

  1.  permalink
    My friend and I created a control panel which will let users upload any type of media they want, and the php will filter it by file extension to figure out how to play it. On the Video page, I'd like to implement some kind of plugin-sniffing script that will embed the proper player according to the file type. Media Player for .wmv, Quicktime for .mov, and so on. Can anyone recommend a script they've used?
    • CommentAuthoreplawless
    • CommentTimeAug 31st 2006 edited
     permalink
    just use a switch/case statement on the file extension:

    switch ($ext) {
    case "mov": echo [movCode];
    break;
    case "wmv": echo [wmvCode];
    break;
    ...
    default: echo "Cannot play video type.";
    break;
    }

    But I don't think that's what you're after... you want to determine what plugins the visitor has installed?
Add your comments
    Username Password
  • Format comments as (Help)