[Tutor] Python in HTML

Orri Ganel singingxduck at gmail.com
Sun May 22 15:59:05 CEST 2005


EJP wrote:

>>Well, like I said, the darkplayer is on an online journal, which means 
>>that the only output possible is modifying the option strings of songs 
>>as they are played or something similar.  I do know that the random 
>>number generator works, and the songs played always match the option 
>>selected.  However, this was before adding the bit about copying the 
>>songs and playing from the copy.  The last fully functional version 
>>(without the 'play all songs once' feature) is as follows:
>>
>><object id=darkplayer 
>>codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 
>>type=application/x-oleobject height=0 standby="Loading Microsoft 
>>Windows 
>>Media Player components..." width=0 
>>classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95>
>> <PARAM NAME VALUE>
>>    
>>
>
>
>It's a bit off list topic, but I am interested to know how much functionality you have been successful to get going.  I tried something very similar with Quicktime and Javascript, but seemed to wind up at a dead-end.  My (premature?) conclusion was that once the audio player object was loaded, I could not reset certain parameters _in_that_object_  such as I would need to have it play an arbitrary file (url).
>
>My javascript was successful in changing the page parameters, as verified with DOM and print statements, but there seemed nothing to trigger the audio player to recognize those new parameters.
>
>IMO the great thing about Javascript is that you have a whole gui & application tied to it, so you can do a lot with very little code (sheer candy!); but the downside follows, that there you are utilizing a complex, fixed framework which constrains what you can do (bitter aftertaste)... and, of course, the development environment is not quite Pythonic.
>
>
>I hope you can get your Javascript - Windows Media Player interface to work. Unfortunately, I do not know how Python could be used within that interface...
>
>Good luck!
>
>
>
> 
>Eric Pederson
>http://www.songzilla.blogspot.com
>
>
>:::::::::::::::::::::::::::::::::::
>domainNot="@something.com"
>domainIs=domainNot.replace("s","z")
>ePrefix="".join([chr(ord(x)+1) for x in "do"])
>mailMeAt=ePrefix+domainIs
>:::::::::::::::::::::::::::::::::::
>
>
>  
>
Well, since my method of 'resetting parameters' is to use buttons, whose 
purpose is defined in the script, I'm not entirely sure that I'm really 
changing anything.  With the script I sent out, it worked in the sense 
that, every time the 'random' button was pressed, a song was selected 
randomly from the song list (meaning not every song was played before a 
song was re-played) and played.  However, as soon as the song ends, in 
order to select a new song, random must be pressed again.  Of course, it 
is possible at any time to select a song from the menu and hit play, 
just hit play to re-play the current song, pause the song, or stop it 
using the play, pause, and stop buttons.  As for the interface with 
Windows Media Player, that is handled entirely within 
"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701", 
whatever it may be.  Less complicated versions of the darkplayer than 
mine can be found on many average journals at www.xanga.com.  It is only 
when i started fooling around with it that it started to behave oddly.  
I added the random button without much trouble, and changed the random 
number generator as well, but i can't seem to be able to get this to work.

-- 
Email: singingxduck AT gmail DOT com
AIM: singingxduck
Programming Python for the fun of it.



More information about the Tutor mailing list