[Gambas-bugtracker] Bug #2715: MediaPlayer_Duration event is zero

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Sat Mar 4 12:18:26 CET 2023


Comment #5 by Bruce STEERS:

No I need the MediaPlayer to trigger Duration when it has a value and not when it's zero like I have said all along.

I do not get the confusion you have?

I'll re-state...

In the previously attached gb.media.form component i just added the MediaPlayer_Duration() event to the FMediaPlayer.class

That class makes the MediaPlayer object as $hPlayer with the handler name "MediaPlayer"

So I added this...

Public Sub MediaPlayer_Duration()

  Print $hPlayer.Duration


So it will print the duration when MediaPlayer triggers the event.

With no other modification the Duration event only triggers with a zero value not like you say.

Try it yourself with your own FMediaPlayer.class file.

You say it does not trigger when zero only when it has a value but in the FMediaPlayer.class of MediaView object it prints zero.

Bruce STEERS changed the state of the bug to: Accepted.

More information about the Bugtracker mailing list