Hello. I was hoping for a little clarification on the java API. In a different help ticket, it's mentioned that java API could be used to load and begin a playlist in the sticky player by embedding API on an element (the ticket URL is https://sonaar.ticksy.com//ticket/3014868/). The documentation on API functions says the function is "IRON.sonaar.player.setPlayerAndPlay({ id:"1218", trackid:"0"});".
However, in a page template at https://sonaar.io/demos/?theme=Skullz, which has an example of what I'm trying to accomplish, the script to load and play a track in the slider appears to be "IRON.sonaar.player.setPlayer({ id:1218, title:'Somera'});".
My knowledge of API is limited, so should we be using trackid or title, and are there supposed to be quotes, double quotes, or no quotes at all surrounding id and the track?
I've also attached a screenshot of the page which shows the script when hovered over.
Perfect! Thanks! I was able to call the function properly, and now just have one more question. Once I run the event, the sticky player loads and plays each specific track as intended, but the track repeats. Is there a function I need to add to stop each track from playing continuously, or is this a setting that needs to be changed? I would still like for a "full" playlist elsewhere on the site to play continuously from one track to another, so I suspect my needs are JS-related, but I wanted to get your input so I could at least be pointing in the right direction. Thank you!
I have the pro version. I’m using Oxygen web builder to design my site, which is why I’m trying to use functions and a little unclear on how to achieve my desired result.
Hello. I was hoping for a little clarification on the java API. In a different help ticket, it's mentioned that java API could be used to load and begin a playlist in the sticky player by embedding API on an element (the ticket URL is https://sonaar.ticksy.com//ticket/3014868/). The documentation on API functions says the function is "IRON.sonaar.player.setPlayerAndPlay({ id:"1218", trackid:"0"});".
However, in a page template at https://sonaar.io/demos/?theme=Skullz, which has an example of what I'm trying to accomplish, the script to load and play a track in the slider appears to be "IRON.sonaar.player.setPlayer({ id:1218, title:'Somera'});".
My knowledge of API is limited, so should we be using trackid or title, and are there supposed to be quotes, double quotes, or no quotes at all surrounding id and the track?
I've also attached a screenshot of the page which shows the script when hovered over.
Thanks!
Hi,
the ticket you refer to is about the MP3 Audio Player Pro plugin, not the Sonaar theme's built-in player which I think you are using.
So yes, the correct script to use with our theme is exactly like this:
id has no quote while title has single quote.
Thanks,
Max from the Sonaar.io Crew
Perfect! Thanks! I was able to call the function properly, and now just have one more question. Once I run the event, the sticky player loads and plays each specific track as intended, but the track repeats. Is there a function I need to add to stop each track from playing continuously, or is this a setting that needs to be changed? I would still like for a "full" playlist elsewhere on the site to play continuously from one track to another, so I suspect my needs are JS-related, but I wanted to get your input so I could at least be pointing in the right direction. Thank you!
Hi,
Unfortunately, this option is only available with the MP3 Audio Player Pro plugin.
The MP3 Audio Player Pro has many more features than the theme's built in player
Thanks,
Max from the Sonaar.io Crew
I have the pro version. I’m using Oxygen web builder to design my site, which is why I’m trying to use functions and a little unclear on how to achieve my desired result.
OK, sorry for the confusion.
Could you please provide me access to your wp-admin and I will gladly check the issue you have.
Thanks,
Max from the Sonaar.io Crew