track_player issue

24 views
Skip to first unread message

Chris B

unread,
Sep 5, 2017, 11:06:07 PM9/5/17
to MPF Users

I have a video playing in a specific mode.  I want to pause the background music track while it plays.  I have tried using the track_player as suggested and it does not seem to pause the music track on the event defined.  I have tried defining track_player in the global config and I have also tried defining it locally to the mode.  Both seem to have no effect.  I am wondering if anyone else has a working example of this.

Here is the code for the show_player (starting the video) and the events generated to trigger the track_player.


show_player:
  timer_battimer_bombhurryup_started:
    BombDisposalShow:
      loops: 0
      events_when_played: BatEvent_VideoPlaying_Started
      events_when_stopped: BatEvent_VideoPlaying_Stopped


track_player:
  BatEvent_VideoPlaying_Started:
    music:
      action: pause
      fade: 1 sec
  BatEvent_VideoPlaying_Stopped:
    music:
      action: play
      fade: 1 sec


Here are the logs:

MPF: https://pastebin.com/NSnVBAU9
MC: https://pastebin.com/Ez698ZwM

Quinn Capen

unread,
Sep 6, 2017, 12:17:05 AM9/6/17
to MPF Users
I wonder if there is a case-sensitivity problem/bug here.  Can you try changing the event names that are used in the track_player to all lower case? I'm not in a position to try it myself at the moment. Your config looks correct and the track pause test is working just fine for me so I'm not sure what else might be happening.

Quinn

Chris B

unread,
Sep 6, 2017, 8:58:40 AM9/6/17
to MPF Users
I just tried it using all lower case event names.  Both in the mode and in a global config setting.  Neither worked and the music track kept playing when the video started.

Quinn Capen

unread,
Sep 6, 2017, 11:00:54 AM9/6/17
to MPF Users
Thanks for the info.  I will write a full integration test later today and see if I can reproduce it on my end.  It does appear that you are doing everything correctly so there is a bug. The unit test works fine so it appears to be a problem with the track_player plugin on the MPF side of things (the trigger event does not appear to be sent from MPF to the MPF-MC via BCP).  I will report back as soon as I am able to test this fully.

Quinn

Quinn Capen

unread,
Sep 6, 2017, 11:47:44 AM9/6/17
to MPF Users
Found and fixed the error, although I have not written the full integration test yet so you will have to test it and report back to really ensure it works.  You will need to update MPF-MC to the latest release (0.33.14).  Let me know how it works.

Quinn

Chris B

unread,
Sep 6, 2017, 9:52:43 PM9/6/17
to MPF Users
After updating, it works like a charm.  Thanks for the quick fix.
Reply all
Reply to author
Forward
0 new messages