zzyycc / bulk-loader

Automatically exported from code.google.com/p/bulk-loader
0 stars 0 forks source link

VideoItem dispatching COMPLETE event without metaData #66

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load a video item when testing locally or when video will be loaded from
cache.

What is the expected output? What do you see instead?
Expect a COMPLETE event to contain meta data (if available in the video file)
Instead, a COMPLETE event is sent and metaData is not available.

What version of the product are you using? On what operating system?
BulkLoader r244 , Mac OSX, Flash CS3

Please provide any additional information below.
The video being loaded was an .mp4 file, and the problem occurred whilst
testing locally. 

It seems the complete event is dispatched before the onMetaData event. This
could be a quirk of mp4 videos or just that particular video and is only
likely to happen when testing locally (or maybe when the video is in the
user's cache)

To fix, I added a check for metaData in the createNetStreamEvent function
of VideoItem.as (line 87 in the current latest revision - r246) meaning
this line has changed from :
   if(_bytesTotal == _bytesLoaded && _bytesTotal > 8){
to
   if(_bytesTotal == _bytesLoaded && _bytesTotal > 8 && metaData){

It would be great if this could be incorporated into the next revision!

Original issue reported on code.google.com by mattbil...@gmail.com on 16 Dec 2008 at 8:43

GoogleCodeExporter commented 8 years ago
Hi Matt.

This is hard to get right. While you are correct, and your patch might be a 
good idea, I've found that there are 
a number of situations where the metadata never arrives. On the mac, for 
example (safari) if you switch tabs 
before a video starts to and come back to that tab after the video has loaded, 
the metadata will never fire.

This leads to a problem: adding your check means that the COMPLETE will never 
fire.

I am closing this as invalid, but I am very open to any suggestions on how to 
mitigate this.

Cheers
Arthur Debert 

Original comment by debert on 18 Jan 2009 at 3:22