Skip to main content
October 22, 2007
Question

Flash Video - Probs with NetStream.onMetaData

  • October 22, 2007
  • 2 replies
  • 445 views
So i have created a video player and have noticed something about the onMetaData function. I have a path to the videos as a relative path to my .swf file ( myPath = 'media/'; ) and when i test my movie, the onMetaData function does not get called. However, when everything is online, or being pulled from an absolute path ( myPath = ' http://www.mydomain.com/media'; ) it is called.

I was just curious as to why that is...?
This topic has been closed for replies.

2 replies

October 23, 2007
I figured it out!

So, a little background — I created this video player because a client of mine wanted to take their hour long PowerPoint (with sound and video) and put it online in Flash. I figured the best way to do this was to take the PowerPoint, convert it into a video file and utilize Flash as the means of which to display and control it online. Long story short, during this testing time, the videos I downloaded offline had metadata already encrypted in them, the videos I made did not have any metadata and therefore Flash could not determine the length, etc. I will have to figure out how to add metadata...

With that said, have you ever converted PPT to video before? Is there a high quality product out there that you would recommend? I used Wondershare http://www.sameshow.com/powerpoint-to-video.html?gclid=CPDgzfzth48CFR-BQAodXCl9kA)
and had some success, though the quality is not quite up to par.

Thank you very much for all of your helpful comments. I greatly appreciate it.
Inspiring
October 22, 2007
ewon15,

> So i have created a video player and have noticed something
> about the onMetaData function.

There's an onMetaData event defined by the NetStream class. Is that the
one you're talking about?

> I have a path to the videos as a relative path to my .swf file
> ( myPath = 'media/'; ) and when i test my movie, the onMetaData
> function does not get called.

Does your FLV file have metadata in it?

> However, when everything is online, or being pulled from
> an absolute path ( myPath = ' http://www.mydomain.com/media'; )
> it is called.

Hrrm. Well, I've not experience that before. What version of
ActionScript are you using? How have you been testing that the onMetaData
event isn't dispatched?


David Stiller
Co-author, Foundation Flash CS3 for Designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design."


October 23, 2007
well i'm using actionscript 2.0 ... i have not had a chance to dive into AS3. I've taught my self most everything and so i probably don't know the best way to do things...

I can't remember where i found a tutorial, i may have simply used the livedocs for flash 8 and built from it... i'm not sure what you mean when you ask me if there is metadata in my FLV...but the way i know the onMetaData method of the NetStream class was not being dispatched was by the timer and scrubber i set up...plus i put a trace in the method and it was not outputting anything...

here's the gist of my code: