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

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Thu Mar 2 19:41:27 CET 2023


http://gambaswiki.org/bugtracker/edit?object=BUG.2715&from=L21haW4-

Comment #3 by Bruce STEERS:

Aah my player i think did a start/stop of the media on URL load so thats why i got 0 duration on URL load.

But still not right.

Attached is the gambas MediaView component.

I added a MediaPlayer_Duration() handler to FMediaPlayer.class (and made it look for first video in ~/Videos folder)

Public Sub MediaPlayer_Duration()
  
  Print $hPlayer.Duration
  
End


It prints 0

In this project i made modifications to MediaPlayer.class to make Duration trigger if has a value on Playstate change.
https://gitlab.com/bsteers4/gambas/-/blob/gb.media.mpris2/comp/src/gb.media.mpris2/.src/MprisMediaPlayer/MediaPlayer.class

That gives duration as expected.

Respects

----------------------------------------------------------------------------

Attachment: gb.media.form-3.18.90.tar.gz

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




More information about the Bugtracker mailing list