Ticket #224 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Player initialization failed: TypeError: Error #1009

Reported by: paul Owned by: paul
Priority: blocker Milestone: OVA for Flowplayer (v1.0.0)
Component: OVA for Flowplayer Version: OVA for Flowplayer (trunk)
Keywords: Cc:
Forum thread:

Description

Flowplayer is throwing an exception at times:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

at org.flowplayer.controls.slider::AbstractSlider/set enabled()
at org.flowplayer.controls.slider::VolumeScrubber/set enabled()
at org.flowplayer.controls::Controls/enableWidgets()
at org.flowplayer.controls::Controls/setEnabled()
at org.flowplayer.controls::Controls/enable()
at org.openvideoads.plugin.flowplayer.streamer::OpenAdStreamer/turnOnControlBar()
at org.openvideoads.plugin.flowplayer.streamer::OpenAdStreamer/onStreamBeforeBegin()
at EventListener/notify()
at org.flowplayer.model::EventDispatcher/_dispatchEvent()
at org.flowplayer.model::EventDispatcher/ http://flowplayer.org/core/internal::doDispatchBeforeEvent()
at org.flowplayer.model::Clip/onBeforeClipEvent()
at EventListener/notify()
at org.flowplayer.model::EventDispatcher/_dispatchEvent()
at org.flowplayer.model::EventDispatcher/ http://flowplayer.org/core/internal::doDispatchBeforeEvent()
at org.flowplayer.model::ClipEventDispatcher/dispatchBeforeEvent()
at PlayState/canOnEvent()
at WaitingState/startBuffering()
at org.flowplayer.controller::PlayListController/ http://flowplayer.org/core/internal::startBuffering()
at org.flowplayer.view::FlowplayerBase/startBuffering()
at org.flowplayer.view::Launcher/startStreams()
at org.flowplayer.view::Launcher/initPhase4()
at org.flowplayer.view::Launcher/callAndHandleError()
at org.flowplayer.view::Launcher/checkPluginsInitialized()
at org.flowplayer.view::Launcher/onPluginLoad()
at EventListener/notify()

...

Change History

comment:1 Changed 2 years ago by paul

  • Status changed from new to closed
  • Resolution set to fixed

Fixed.

Upgraded the method to check that the handle to the control bar exists before using it. e.g

protected function enableControlBarWidgets():void {

var model:DisplayPluginModel = _player.pluginRegistry.getPlugin(_vastController.config.controlBarName) as DisplayPluginModel;
if(model != null) {

doLog("Turning the controlbar on", Debuggable.DEBUG_TRACKING_EVENTS);
var controls:DisplayObject = model.getDisplayObject();
if(controls != null) {

if(controlsenable? != undefined) {

controlsenable?(

{

scrubber: true,
playlist: true,
volume: true,
stop: true,
play: true,
fullscreen: true,
mute: true

}

);

}
else doLog("Cannot enable control bar - 'enabled' method is undefined", Debuggable.DEBUG_DISPLAY_EVENTS);

}
doLog("Cannot enable the control bar - unable to get a handle to the display object", Debuggable.DEBUG_DISPLAY_EVENTS);

}
else doLog("Cannot enable the control bar - unable to get a handle to the controls plugin model", Debuggable.DEBUG_TRACKING_EVENTS);

}

Note: See TracTickets for help on using tickets.