Ticket Created
over 5 years ago

WERETECH-7661

WERETECH-7662

WERETECH-7663

WERETECH-7853

WERETECH-7854

Assorted Media Player Button Bugs Across Devices

I've been experimenting with some of the media player button handling code across different devices and run into a few issues. Below is a table which summarizes my findings.

For context, Runcasts currently implements fast-forward/rewind using some pretty crazy hacks which re-map the skip-previous / skip-next buttons into changing the ActiveContent playhead. Needless to say, I'd love to strip that code out and use the normal approach. Unfortunately, the various options below all suffer some drawback on one of the devices we're trying to support.

Feature Vivoactive3 Button-Based Button-Based Hotkey
SystemButton BUG [1] OK OK
CustomButton OK OK BUG [2]
PLAYBACK_CONTROL_SKIP_BACKWARD/FORWARD BUG [3] OK [4] OK
  1. Image doesn't show, button doesn't work              
  2. Image shows, button event doesn't fire when clicked                    
  3. Crashes, no CIQ.YML generated
  4. Not a bug per-se, but a record-scratch occurs during skip, hacks to implement fast-forward/rewind avoid the record-scratch sound (at the expense of being slightly delayed when starting) 

  • Hi Garmin,

    can we have an update on those are they fixed with SDK4 ???

    Users are complaining every days with  Bug 3: PLAYBACK_CTRL_FWD/BKWD crashing media player on VVA3

    thanks

  • Just want to confirm that BUG [3] is still present on Venu with latest firmware (4.50), it causes the media player to crash with no CIQ.YML.

    Still having to use the less ideal CustomButton method as a workaround, but even that is flaky.

  • Hello, can you explain => "

    • Media.setPlaybackPosition(int) -> you can achieve this using ContentIterator.get and ActiveContent, but its pretty cumbersome for such a simple and common task."

    I try to start a music at a position but I can't, I must use ActiveContent badly because it tells me that mMetadata is null.

    Thank you in advance for your assistance

  • Former Member

    Sorry for the delay here, just got back around to trying this code again. I think you're right, BUG [1] doesn't seem to actually exist, I can't reproduce it any more. I might have been doing something wrong there as I was experimenting with CustomButton at the same time, so it's possible I messed up the inheritance or parameters there.

    Thanks for looking into it!

  •  Well, I thought I replied to your previous comment, but now I don't see anything. I apologize if this is a duplicate post.

    So you are trying to use a Media.SystemButton that is a PLAYBACK_CONTROL_NEXT or PREVIOUS. You are overriding the next/preious icon with the skip fwd/bkwd icon, but this is failing on the VVA3

    Where are you geting the fwd/bkwd icon? is this a bitmap resource? or are you getting the native fwd/bkwd icon somehow?

    This is working for me with a bitmap if i do this:

    class ContentIterator extends Media.ContentIterator {
    
        function getPlaybackProfile() {
            var profile = new PlaybackProfile();
    
            // Create System button.
            var sysButton = new MySystemButton(PLAYBACK_CONTROL_NEXT,{});
    
            profile.playbackControls = [
                                       sysButton,
                                       sysButton,
                                       ...
                                       ];
            ...
        }
    }
    
    class MySystemButton extends Media.SystemButton {
    
        var sysBitmap;
    
        function initialize(type, Options){
            Media.SystemButton.initialize(type, Options);
    
            sysBitmap = WatchUi.loadResource(Rez.Drawables.redS);
        }
    
        function getImage(image, state, highlighted){
    
            return sysBitmap;
        }
    }

    Are you doing something similar?