Streaming internet Media w QT and Rev Players-- Best Practice

Sivakatirswami katir at hindu.org
Sat Sep 16 22:19:34 EDT 2006


OK thanks to those who sent encouragement off line and asked to keep 
this thread on the forum.

OK all my stuff is "open source" so you can hammer away at it yourself 
if you want, just please
share with everyone your findings.

go stack decompress(url 
"http://www.hinduismtoday.com/digital/htde_media-player.rev.gz")

Today's version uses Trevor's recommendation to set the playrate to 1 
instead of "Start Player"
(why we would that is unintuitive, but, if it works better....)

and also I found this little golden nugget hidden in the documentation,

set the currentTime of player "My Player" to zero

in, of all places, the docs'  entry for "filename"
============
   Important!  Setting a player's filename does not automatically update 
its currentTime property. If you play a movie file, then change the 
player's filename in order to play another, you must reset the 
currentTime to zero in order to start from the beginning of the second 
movie:

   set the filename of player "My Player" to "SecondMovie.mov"
   set the currentTime of player "My Player" to zero
=========

Jacqueline! Are you lurking? this needs to be copied to the QT player 
section somewhere
I mean, I guess its obvious, but gosh, I just had to bump into it like 
that....but
imagine stopping a player whose current time was set to 30 second in and 
then
trying to stream another media file to that same player...

ok so now the buttons go like this, and I have it out for testing to some of
"hard nuts" (windows users who say it just won't work)

global gConnectedToNet

ON mouseUp
   testNetConnection
   IF gConnectedToNet is not empty THEN
      stop player "player1"
      hide image "audioPoster"
     set the filename of player "player1" to 
"http://www.hinduismtoday.com/archives/2006/10-12/media/ht_2006-10-01_banteay-srei.mov"
      set the currenttime of player "player1" to zero
     set the playrate of player "player1" to 1
     --start player "player1"
   ELSE
     connectionNotification
   END IF

END mouseUp



On Sep 16, 2006, at 1:52 AM, Sivakatirswami wrote:

 > Trevor... I'll try that "playrate" but... what's behind your thinking?
 > On that  one... I like to know the "why" if it can be known.

--Trevor DeVore wrote

This has fixed problems for people with streaming movies on OS X in the 
past.  I suggest it as I am pretty sure what is getting called in the QT 
API when setting the playrate but I don't know what start playing does 
in the Revolution code.  The playrate is how you start/stop movies in QT 
in most cases.

--Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
trevor at bluemangolearning.com
> On Sep 16, 2006, at 2:25 AM, Sivakatirswami wrote:
> 
>> But obviously QT--Windows  is having trouble  with this.
>> So perhaps we need a better, more "graceful"
>> implementation that Windows is happy with.
>>
>> Are there other things  we need  to be thinking about?
>> Possibly:
>> 1) delete previous URL for the stopped media from the Rev Cached URL's
> 
> The URL won't be in Rev's cached URLs unless you were downloading it 
> yourself first.  QT deals with the URL exclusively and handles caching 
> when you load URLs in a player object.
> 
>> 2) Maybe have two players? if Player1 is running, stop it,
>> and assign the next selection to Player2, start it up, meanwhile
>> "clean up" player1 (set filename of player1 to "")  then on next 
>> selection.
>> Stop player2 and assign latest selection to Player1 and clean up Player2?
>>
>> This way one is not trying to stop, reset filename, re-initialize the 
>> socket, start streaming
>> again... all in one player object...
>>
>> I'll give that a try.
>>
>> Any more bright ideas?
> 
> The one player approach should work out but you never know.
> 
> I have one app that loads lots of QT movies throughout a session.  Each 
> step in a lesson (e-learning) can have up to three QT movies on screen 
> at one time.  I actually delete all players and create new ones as 
> needed each time the screen changes (part of a template system) and this 
> has worked well for us.  Maybe something to try if you continue to see 
> problems.
> 
> Trevor
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 

-- 
Om shanti
(In  Peace)

Sivakatirswami
www.himalayanacademy.com

Get Hinduism Today Digital Edition. It's Free!
http://www.hinduismtoday.com/digital/



More information about the use-livecode mailing list