CSS coder for custom music player needed (wix Studio)?

I need to custom design a music player ‘icon’ in Wix studio, as per the old design available in Wix Editor.

Wix studio

Does anyone have the code for the old icon that was scaleable in Editor? Or know a coder for the job? screen shot attached.

Screenshot 2024-07-04 at 13.39.32

I’ve tired working around the design by using basic shapes and the player icon available but it’s not great. The Wix studio help team say it’s possible to use the CSS to achieve the old design. I’m not a coder so would need some help to get the issue sorted out.

Thanks for the help,

David

1 Like

Is there a way to have a custom element or widget than can “get” and display text from a part in another widget? That updates with the text it’s referencing?

For example, can I create a custom box or widget that I can place in one location on my page/site, that displays only the title info from the audio player located elsewhere on the page, and automatically updates when the player changes songs?

Cheers!

For example:

You want to show locations of the artist, currently running in your audio-player inside an iFrame or similar ???

You are using the Wix-Audio-Player or a → CUSTOM one ?

For example, can I create a custom box or widget that I can place in one location on my page/site, that displays only the title info from the audio player located elsewhere on the page, and automatically updates when the player changes songs?

Step-1: Getting the artist name/title of the current playing audio…

$w.onReady(()=>{
    let isPlaying = $w("#myAudioPlayer").isPlaying;

    if(isPlaying) {console.log('My audio-player is palying now....');
        //add here the functions, if your player is currently playing a specific song....
        //you wanted to get the title of the current playing song, right?......
        let artist = $w("#myAudioPlayer").artistName; // "Artist name"
        console.log('Currently playing title --> ' + artist);
    }
    else {console.log('My audio-player is not playing.');
        //add here what to do when player is currently not playing....
    }
});

Now you already are able to get the artist name of the current playing song.
But the problem is still that it will check check for the player only onLoad() of the page, or better said → when page is ready → onReady().

But since you do not have the chnace to start the video, before the page has been loaded (yes you could, but would not make any sense), this for you will need to optimize your code…

Step-2: code-optimization (integrating a click-button to start the player…

$w.onReady(()=>{
    $w('#myButton1').onClick(()=>{
        start_audioPlayback();
    });
});

function start_audioPlayback() {
    $w("#myAudioPlayer").play();
    check_audioPlayer();
}

function check_audioPlayer() {
    let isPlaying = $w("#myAudioPlayer").isPlaying;

    if(isPlaying) {console.log('My audio-player is palying now....');
        //add here the functions, if your player is currently playing a specific song....
        //you wanted to get the title of the current playing song, right?......
        let artist = $w("#myAudioPlayer").artistName; // "Artist name"
        console.log('Currently playing title --> ' + artist);
    }
    else {console.log('My audio-player is not playing.');
        //add here what to do when player is currently not playing....
    }
}

Of course you also could use another approach —> using —> onPlay()

https://dev.wix.com/docs/velo/api-reference/$w/audio-player/on-play

  1. Now try to generate Step-3 and so on…

Hi,

Thanks for this info,

Do you know anyone who can make these changes?

Regards,
David

If Wix Audio-Player do not fit your needs → you can generate your own CUSTOM AUDIO-PLAYER with the features and FUNCTIONS you need.

But what are your requirements/expectations for an Audio-Player.

All you need to know about the WIX-AUDIO-PLAYER, you will find here…

https://dev.wix.com/docs/velo/api-reference/$w/audio-player/duration

Thanks for the reply,

Attached you can see what i mean.

It’s not possible to adjust the height of the icon player at all manually.
By adjusting the width it stops scaling below 40px.

All i need is a player that is just this simple play button triangle with the ability to adjust on it the labtop, table and mobile break points. i.e 40 x 40 or 20 x 20px on mobile. With two color codes for regular and hover/click.

Know anyone to code it?

Cheers?

The problem is that this container box the player sits in is messing up the design of other elements it is near or sitting in if you know what i mean.

Such a pain in the ass, as the old editor didn’t have this problem.

  1. Add an empty container onto your page
  2. Add the Play-Icon into this container
  3. Adjust the buttons style to 100% width and height related to the container.

Maybe this works.

If not…

Generate your own Play-Button-ICON → for example adding a SVG-File, or simply a button with integrated ICON.

But going this way, you will have to code your player functions with VELO (similary like shown above in my example-post).

The SOLUTION in that case woul dbe to use an own CUSTOM ICON, which would be connected to the players functions by code.