$w("#audioPlayer") in a repeater, loads mp3's urls (e.g. https://static.wixstatic.com/mp3/ec1f12xxxxxxxx.mp3) from a dataset.
Used to work fine for 2 months. Suddenly has stopped working.
On Chrome :
The Console tab gives ERROR : Uncaught (in promise) DOMException
The Sources tab gives this :
Any ideas appreciated.
Fixed ok.
Again thank you for your efforts, but they are in void...
Clicking on the $waudioplayer, selecting the databaset, it lets you connect to a dataset and connect to the fileds like title, composert AND mp3 url.
Now, when the audioplayer in or OUT of the repeater it does get the fileds EXCEPT the url.
Also as mentioned 2-3 times already it worked in the repaeter for more than 2 months.
Now there is no point to continue this, since obviously is does not work and the right thing for one to do is to get rid of the wix code and have his peace of mind. Thank God i've already cancelled my subriscption :-).
https://support.wix.com/en/article/elements-that-cant-be-added-to-repeaters
Below is a list of elements that cannot be added to a repeater:
All third-party apps
The Pro Gallery
Full-Width galleries
Wix Video
Wix Music
Horizontal and vertical menus
Flash elements
Anchors and anchor menus
Hover box
Repeaters
Box slideshow
The HTML component
Hence why it does not work in the repeater.
Plus, I have just tested it myself in a repeater and the dataset connection does not work through it, so you can assume that Wix Audio Player is classed as Wix Music and so won't work.
It does work if you put the external URL or the uploaded file in the settings of the Audio Player itself, however as that is in a repeater what you do with the first one will be repeated in all of them.
I even tried doing that myself and it wouldn't let me, just first three, external url first with the second two being uploaded files, however it still overwrites with the first repeater info.
To make it even simpler, when audioplayer is connected to a dataset (in or out a repeater) it does not load the mp3 url.
When it's connected to the same url directly, it loads and plays.
Hey, hi again. The wix audioplayer is supported by API as you may see here https://www.wix.com/corvid/reference/$w.AudioPlayer.html
You do need a playbutton, just need to load from the dataset the url.
Now, when I add the audioplayer on the page and connect to an mp3 file directly from the library (not the dataset) it loads and plays.
When it is in the repeater and connected to the dataset it does not load (while it used to load and play) and while other repeater items (images, text) are loaded ok.
You need to post an image of the elements in that play button area so I need to know what you are working with on your page.
How can you have no play button when there is one on the page that needs to be connected to the music file so that when the user clicks on it, then it knows where to play the file from?
If there was a major conflict, it would have already been picked up and reported.
Okay so looking at your site, you have actually used the Wix Audio Player as the play button.
So note that this audioPlayer here is the Wix app and not the audioPlayer api.
If you have used this then can you simply try disconnecting the data connection and just on the first one add the external music url to the settings and see if that works.
Nope. Ther is no playButton. There is the $w(audioplayer) element with the events listed in the API. It loads the infos from the dataset. As you may see, it loads everything image, text,) except the audio file!
So, it seems there is a serious problem/conflict with $w(audioplayer).
Well, thank you for your efforts, but we have to eat something :-)
Nope. It worked for 2 months. It should load the mp3 as all other items ar loaded from the datset.
The audioplayer does not load the mp3.
Okay can you show me a pic of your repeater layout, I need to see what the part under the music sheet image is like.
To me it looks like you have actually got the Wix Audio Player app set up in the condensed setting
and you have nothing happening on your page or in your code when the user clicks on the play button.
You might just be easier adding the Wix Audio Player as shown here and connecting that to your dataset.
https://support.wix.com/en/article/about-the-wix-audio-player
Here is a simple page of the site. https://www.musicbooknet.com/bach-for-guitar-music-scores
and here is the code on this page:
$w.onReady(function () { });
export function repeater1_itemReady($item, itemData, index) {
$w("#slider2").onChange((event) => {
$item = $w.at(event.context);
$item("#audioPlayer2").volume=event.target.value
})
}
The audioplayer in the repatear1 gets its mp3 url from the dataset. If i moved the audioplayer out of the repeater and set the volume etc programatically, again does nothing (so it seems the repeater is not the problem).
Have you got any code on your page that actually uses the Wix AudioPlayer API?
If you have any code on your page, please post it up here.
Aug 28, 2019
Wix Editor Elements ($w): Audio Player API
With the Audio Player API you can customize your Wix Audio Player. Now you can control your audio tracks programatically, customize your display, and add events as site visitors navigate your tracks
- The mp3 url is the url provided by WIX library (choose a track from media library and choose COPY URL from menu. The urls have the form
https://static.wixstatic.com/mp3/ec1f12_81c7f04a44ff4a6491a6973e927eb5f4.mp3
The repeatet gets its content from a dataset - no code here.
The plan is business 20 gb no storage needed.
Well, the audioplayer api may be a newbie element, but times are changiing as Dylan said (and todays are changing fast also).
NO it is not just Chrome. Tested on Internet and Firefox - no work at all.
So the $w("#audioPlayer") element is not working.
As mentioned, I use the $w("#audioPlayer") element not the html5 (also I do not use autoplay).
Any other ideas ?
Read Wix Support pages about it.
The new autoplay policy for certain browsers only allows video to autoplay when the sound is muted.
https://support.wix.com/en/article/autoplay-on-desktops-and-laptops
It is a Google Chrome issue, it has been talked about previously.
In modern versions of Chrome, you can’t have videos autoplay with sound enabled by default.
You need to add the muted property to your HTML5 <video> tag:
muted="muted"
https://stackoverflow.com/questions/54719283/google-chrome-uncaught-in-promise-domexception-while-playing-audio
https://developers.google.com/web/updates/2017/06/play-request-was-interrupted
https://stackoverflow.com/questions/40276718/how-to-handle-uncaught-in-promise-domexception-the-play-request-was-interru
https://github.com/sampotts/plyr/issues/331
https://developpaper.com/hack-played-automatically-by-audio-in-chrome-browser/