Question about tutorial animation

Game development with Board Game Arena Studio
Post Reply
User avatar
HumanBot
Posts: 11
Joined: 29 March 2020, 07:43

Question about tutorial animation

Post by HumanBot »

So I'm having trouble with the last section of the Reversi tutorial. Basically, there's this one section that will fadeout, then fadein the target token twice and they use the dojo framework to do it. However, this is being done inside the "notif_turnOverDiscs" function. I end up getting a "Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first." I feel like if this is the case, we shouldn't be calling .play() inside of a notification because it's not activating the function directly after a user interaction? I did some looking around online and it seems this has to do with Chrome's 2018 change to block autoplay on webpages?

Just want to know what I should be doing in this case because the sample Reversi code they give us does this still so I'm not sure if this is just outdated or if I should be adding a line somewhere.
User avatar
Kellbot
Posts: 4
Joined: 08 April 2020, 22:35

Re: Question about tutorial animation

Post by Kellbot »

Are you seeing anything else noteworthy in the console log? When I was getting that error it was because another javascript method I'd written was misbehaving.
User avatar
RicardoRix
Posts: 2540
Joined: 29 April 2012, 23:43

Re: Question about tutorial animation

Post by RicardoRix »

I get 14 of these error messages on a page reload. I don't seem to get any during notifications though. I don't think they stop anything happening.
User avatar
Brainchild
Posts: 71
Joined: 31 January 2014, 19:42

Re: Question about tutorial animation

Post by Brainchild »

I get these in my project and I've seen them in others. I don't think they cause any harm.
User avatar
HumanBot
Posts: 11
Joined: 29 March 2020, 07:43

Re: Question about tutorial animation

Post by HumanBot »

Oh yeah I realize it happened because I was accessing an empty element with the fadein/fadeout call. Not sure why that causes the problem, but I fixed that and the error doesnt show up anymore. Thanks for the replies.
Post Reply

Return to “Developers”