public XDoc Media(
            [DekiExtParam("media uri")] XUri source,
            [DekiExtParam("media width (default: player dependent)", true)] float?width,
            [DekiExtParam("media height (default: player dependent)", true)] float?height,
            [DekiExtParam("auto-start media on load (default: false)", true)] bool?start
            )
        {
            // determine the media type
            AMedia media = null;

            media = media ?? YouTubeVideo.New(source);
            media = media ?? GoogleVideo.New(source);
            media = media ?? ViddlerVideo.New(source);
            media = media ?? VeohVideo.New(source);
            media = media ?? UStreamVideo.New(source);
            media = media ?? KalturaVideo.New(source, Config);
            media = media ?? WindowsMedia.New(source);
            media = media ?? UnknownMedia.New(source);
            if (media != null)
            {
                media.Width    = width;
                media.Height   = height;
                media.AutoPlay = start ?? false;
                return(media.AsXDoc());
            }
            return(XDoc.Empty);
        }