PDA

View Full Version : FLVPlayback.contentPath WITHOUT preloading the FLV


Sylv
01-04-2007, 05:20 AM
Hi!

I tried adding a YouTube like feature to my website, since I already had most of the stuff from other projects like rating, gallery, scripted onthefly video converter and so on - that wasn't very difficult.
I got to admit I'm not the best flash coder out there, I guess if anything I could win a price for the worthed one cauz I kind of hate AS *sry* :p.

Coding a Progressive-FLV player wasn't that hard using FLVPlayback, obviously.
Now just one problem remains to be solved and I have a bad feeling about this (really really dont wont to build a player from scratch with netstream I know it would be a lot cleverer to do that and maybe I'm gonna do it in the future, even got a started project here, but for now I hope to find a solution with FLVPlayback).

When the player starts it searches a xml for a movie ID loads path and filename so basically one swf is able to play all the movies on the side.
That means Im able to show more than one of these players at a time on my side and all hold a different movie
The only problem is FLVPlayback starts caching the movie once contentPath is initialized.. so I'm trying to set contentPath without actually starting the download. Otherwise on a page with 10 movies on it, all 10 would start downloading at the same time even if the user does not watch them at all.

I wasnt able to find an event that is raised before the play-button executes FLVPlayback.play().
I anyway wouldn't like to do that cauz I already relay on how events are raised right now because of other stuff that happens onPlay like thumbnail or onscreen-menu show/hide.

From the FLVPlayback.autoPlay doku:
Even if autoPlay is set to false, the component loads the content immediately. The default value is true.

Thx in advance.
Sylv

sleekdigital
01-04-2007, 08:15 PM
Your explaination of what you are doing is unclear to me, but why don't you just wait to set the content path until you are ready to play the video?

Sylv
01-05-2007, 05:15 AM
My main reason not to do that was because the stupid progress bar starts an animation without the path being set.

The other thing is how am I going to do that?
Afaics there is no event being raised when the play button is pressed,
so I would have to create a fake control bar put it on top of the actual bar and so on...

That'll be two major (dirty) workarounds for a simple problem that could be solved by setting one property I'm just not willing to do that.

Anyway there were a few other things I didn't like about this component, so after talking to some ppl at work I decided to build my own player from scratch it's almost finished by now and works like... lets just say it works like most things in flash do, it gets the job done :).

Thx for the help anyway.