If you want to see how you would write that kind of extension in C#, take a look at the media extension source code.
To use DekiScript, you could start with something like:
Code:
<extension>
<namespace></namespace>
<function>
<name>custommedia</name>
<description>Returns an embedded video</description>
<param name="video" type = "uri">video uri</param>
<param name="width" type ="int">video width</param>
<param name="height" type ="int">video height</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<embed
src="mediaplayer.swf"
eval:width="args.width"
eval:height="args.height"
allowscriptaccess="always"
allowfullscreen="true"
eval:flashvars="'height='..args.height..'&width='..args.width..'&file='..args.video"
/>
</body>
</html>
</return>
</function>
</extension>
To re gister:
Make sure to specify that it is a local service and type Extension.
SID = http://services.mindtouch.com/deki/d.../12/dekiscript
Add this config setting: manifest=<path>, where <path> is the location of the file containing the xml above.