Jump to content
Search Community

LoaderMax No metaData was received.

vladislav test
Moderator Tag

Recommended Posts

Strange error. Occurs for specific videos. Here is the example link https://devsourcedatabucket.s3-eu-west-1.amazonaws.com/v2stolyarov/72bcf15b-f81d-40d0-87c5-5735613c2e4b.mp4?AWSAccessKeyId=AKIAIW6TH2LBYDGWNUCA&Expires=1427900820&Signature=CTE7fjoK5VCeL%2FDDXx6xacm%2B%2Fuc%3D

This error happens when the whole video was fully loaded just before completed event. Error is raised _loadingProgressCheck in
....
if (_cachedBytesLoaded == _cachedBytesTotal) { 
...

  if (!_initted) {
  _forceInit();
  _errorHandler(new LoaderEvent(LoaderEvent.ERROR, this, "No metaData was received."));
  }
...
}

right after the error raised the _metaDataHandler is triggered and metaData is set. I am thinking that it is somehow connected with race conditions when metadata event is raised after the whole video is downloaded.

Also it happens only when i use VideoLoader through LoaderMax while when using it (VideoLoader ) directly it doesn't happen. But i suspect that it may be just the accident and doesnt matter much.

UPDATE: Looks like it is random, cos after lots of tests it vanished, but i generated another link and it reproduced again. Also looks like whne i set auditSize:true it doesnt occur (metadata is set just before complete event). So please check if it is theoretically possible that race conditions occur.

Also just a question - what does it mean that metadata is retrieved when the video is fully uploaded? Metadata is not present at all and is extracted  from it when the whole media is loaded? Or it is encoded in such a way that can be retriwved when teh last byte is uploaded?

Environment: Win 7. Flash builder 4.6, Chrome 39 ,Shockwave Flash 16.0 r0 Debug (pepflashplayer32_16_0_0_257.dll).
LoaderMax VERSION: 1.938 DATE: 2014-06-26, VideoLoader VERSION: 1.938 DATE: 2013-07-16
Link to comment
Share on other sites

Thanks for the answer. Yesterday i was able to determine that the problem was in the mp4 files that had metadata at the very end of file, after moving it to the beginning of file (http://rndware.info/products/metadata-mover.html) onMetadata handler is called almost immediately. But when metadata is at the end of file the issue exist - No metadata error raised. I ve done some investigation. It turns our that it occur randomly (at least for my environment and files i tested). The reason for it is the order of the last ENTER_FRAME (the one when  _cachedBytesLoaded == _cachedBytesTotal) occurs just before onMetadata event. I ve added traces to the _metaDataHandler and onError and OnComplete handlers. This is the output when no error present (i told that it occurs randomly):
 

_metaDataHandler
video oncomplete
loader oncomplete
_metaDataHandler

Have no idea why _metaDataHandler outputed twice.

this is the output when error occurs:

video onerror
loader onerror
video oncomplete
loader oncomplete
_metaDataHandler

I made anotehr test. I wrapped code responsible for inited check/error raise in _loadingProgressCheck method inside setTimeout to delay that check to give onMetaData chance to execute before. Also i added some trace to check if metaData was null before setTimeout.
 

trace(this.metaData == null);
setTimeout(function(){
if (!_initted) {
_forceInit();
_errorHandler(new LoaderEvent(LoaderEvent.ERROR, this, "No metaData was received."));
}
_completeHandler(event);
}, 100);

Now the error was not raised when metadata is null. This is the trace output for that case.

true
_metaDataHandler
video oncomplete
loader oncomplete
Link to comment
Share on other sites

Looked into code. Yes that was the fix for me. But be aware that i haven't properly tested 100 ms delay, maybe even less delay will work fine or viсe versa there is a chance that 100 is not enough (foe me it was enough for my environment and bandwidth(if it matters)).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...