Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

TypeError using xmoov.php

6 replies [Last post]

I am getting this error in Firefox 3 when I try to forward the video to any specific point on the timeline:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.jeroenwijering.models::HTTPModel/getOffset()
at com.jeroenwijering.models::HTTPModel/seek()
at com.jeroenwijering.player::Model/seekHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.jeroenwijering.player::Controller/playHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.jeroenwijering.player::View/sendEvent()
at com.jeroenwijering.plugins::Display/clickHandler()

In both FF3 and IE7, the player does not attempt to request a restart of the video stream, i.e. I get 'start=0' requested when I start to play, and no further requests after that.

The embedded script is:

<script type='text/javascript' src='swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','player','400','300','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=MyVideo.flv&streamer=xmoov.php&config=config.xml');
s1.write('preview');
</script>

The config is simple:

<config>
<autostart>false</autostart>
<backcolor>0x000000</backcolor>
<frontcolor>0xCCCCCC</frontcolor>
<screencolor>0x666666</screencolor>
<volume>50</volume>
<thumbsinplaylist>true</thumbsinplaylist>
</config>

The xmoov.php script has been updated to accept the 'start' parameter.

Any clues what I could be doign wrong? The video does play right the way through.

-- Jason

Sounds like your FLV video container file is missing the metadata array.

Did you post-process it after encoding with FLVMDI, yamdi, or flvtool2 to create and inject the metadata array?

Thanks :-)

I used FLVMDI with the Windows GUI to add the metadata array.

On extracting the initial array, it contained a certain amount of information - the length, copyright, name, size etc. but post-processing it added hundreds of keyframe items to the array. I see how that would be useful to the player.

I think the errors I was seeing should be raised as a bug. "Video does not contain keyframe metadata" would be a more informative error message than "TypeError: Error #1009: Cannot access a property or method of a null object reference." IMO. I guess it is just an unhandled exception.

So - thanks again. I'm really impressed with how well it works once the video is in the right format.

-- Jason

Those very informative error messages :) come from the Adobe CS3 Flash compiler. Reference: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/runtimeErrors.html So you might want to raise that issue with Adobe. :D

I think Adobe would argue that Flex generates the correct error for what it has been told to do.

I can't see the code, and I'm not familiar with action script, but I'm assuming somewhere in this object com.jeroenwijering.models::HTTPModel/getOffset(), some code is attempting to access the property of an uninitialised object. I would be surprised if there is not some way to catch that earlier.

-- Jason

The code is available for all the world to see, right here: http://code.jeroenwijering.com/trac/

It's a free player, the volunteer help is free, so contribute instead of whining.

You used the 'whinning' word when I was just trying to help. That's me out of here. Bye.

Why on Earth would I want to help a project where I am accused of 'whinning' each time I open my mouth. Seriously? I appreciate the player, I have dug as deep as I am able into this problem, and I will be paying my commercial licence when I could to use it. I have blogged the product and put up a demonstration for people to see. I have included my experiences in the blog so that it will help others. So why oh why would you say such a thing, because it just p|sses people off?