/* Quicktime Plugin - DMS - December 99 - by Sylvain HUET */ /*to do : - pauseAll - registeredClientsOnly*/ typeof class=S;; fun cbcomm(ui,cli,action,param,z)= let z->[_ url] in if !strcmp action "url?" then UsendCli this cli ui "url" url else nil;; fun startplay(o,url,z)= mutate z<-[_ url]; UsendCli this nil ObUi o "url" url;; fun play(o,from,cli,action,param,rep,z)=startplay o param z;; fun stop(o,from,cli,action,param,rep,z)=startplay o nil z;; fun newOb(o)= let [o hd UgetParam ObUi o "init"] -> z in (UcbComm this ObUi o mkfun5 @cbcomm z; ObRegisterAction o strcat ObName o ".playAll" mkfun7 @play z; ObRegisterAction o strcat ObName o ".stopAll" mkfun7 @stop z); 0;; fun IniPlug(file)= set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @newOb nil; 0;;