Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Plugin answer... it would seem

From: gjones05::mail::orion::org at: 11-Jun-2001 17:13

From: Sterling
> It would appear that the solution to this is to have diferent file > extensions. One is mapped to a plugin that handles the embeded stuff, > draws into the browser window, etc. The other one is an application > mapping that just runs the specified program without departing the > current web page to go to the link. > > Does this sound right? Anybody know of an app that uses the same file > extension for both a plugin and helper app? > > Thanks to GS Jones for the example.
Also from Sterling:
>No problem. We're just trying to get something right in an area that >we are not experts in. I just posted saying that you need two >different file extensions but it may be enough to simply define two >different MIME types. > >With MIME types often come files and extenstions but an embeded script >may not have a file name associated with it but it still has a MIME >type. I got your file but my browser is deficient and would not >display the embeded version. > >RealPlayer defines a .RPM type as MIME type >audio/x-pn-realaudio-plugin while also defining .SMI and .SMIL as >application/smil which launches RealPlayer. > >I thikn we need to do this same type of thing with View and the View >Plugin.
Hi, Sterling, Maybe I wasn't entirely clear. The example I sent **does** use the same extension. That is the really neat part. Here is what I think is going on (which may not even be worth 2 cents...): Registry entries: [HKEY_CLASSES_ROOT\.smi] @="RealPlayer.SMIL.6" Content Type ="application/smil" [HKEY_CLASSES_ROOT\RealPlayer.SMIL.6\shell\open\command] @="\"C:\\Program Files\\Real\\RealPlayer\\RealPlay.exe\" /m application/smil %1" [HKEY_LOCAL_MACHINE\Software\CLASSES\MIME\Database\Content Type\application/smil] Extension =".smil" If I read this correctly, the first entry .smi maps to application/smil, and the third catalogs a.smi amongst all the mime types. The second entry will open the regular application from within the windows environment or from the href tag. It is the short snippets of javascript that I think is opening the RealPlayer and stream embed in the browser. Snippet that sets the stream location: <SCRIPT LANGUAGE="JavaScript"> browser=navigator.userAgent; stream_location ; </script> Snippet that sets up the embeded object. Note the mime type. document.write( .... <embed src="'); // starts embed document.write(stream_location); //sets stream location document.write('?embed" type=audio/x-pn-realaudio-plugin '); //maps to plugin mime document.write('console=promo height=132 width=176 autostart=true controls=ImageWindow PLUGINSPAGE=""></embed>'); (I left out the snippets that map the realplayer controls, etc) This is the reg entry that maps the mime back to the plugin: [HKEY_LOCAL_MACHINE\Software\CLASSES\MIME\Database\Content Type\audio/x-pn-realaudio-plugin] CLSID ="{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}" Then for the href: <a href=""> Feed 1</a> This just opens the regular app. How they keep the browser page the same, I do not know. But they do. So, RealPlayer has this one extension and two mime types. The javascript calls the embeded version, which is then fed the stream location. Smi is the wrapper info that controls streaming video stuff, if I recall correctly, maybe Carl knows more about this. I included the Reg Entry below for the audio/x-pn-realaudio-plugin ..... for easy reference. Full backwards compatibility. No confusing alternate extensions. But ... there is that blasted ActiveX ........ Cool! No problem on not being plugin expert. REBOL is the most important thing. Great plugin will help to rocket it to fame. Regards, --Scott Jones [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}] @="RealPlayer G2 Control" [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}\InprocServer32] @="C:\\WINDOWS\\SYSTEM\\RMOC3260.DLL" ThreadingModel ="" [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}\VersionIndepende ntProgID] @="rmocx.RealPlayer G2 Control" [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}\ProgID] @="rmocx.RealPlayer G2 Control.1" [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}\TypeLib] @="{CFCDAA00-8BE4-11CF-B84B-0020AFBBCCFA}" [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}\Control] [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}\MiscStatus] @="0" [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}\MiscStatus\1] @="131473" [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}\ToolboxBitmap32] @="C:\\WINDOWS\\SYSTEM\\RMOC3260.DLL, 1" [HKEY_CLASSES_ROOT\CLSID\{CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA}\Version] @="1.0"