How do you Unmute a link?

So I put a link on my Quit Button that takes you to a video but it starts off muted. Is there any way to put something on the link to make it unmuted?

Hi Asli,

Could you provide a little bit more information? For example, you say “Quit Button”, this is presumably in relation to a game you have made?

You say “a video”, are you playing the video in your game, or are you redirecting the user to a YouTube video for example?

Have you tested this on other computers/devices? Does the same issue occur?

I apologize. Yes, the quit button is in my game. I used Application.URL so I’m redirecting the user.

It’s muted in Chrome but unmuted in Microsoft Edge. Couldn’t test it in another device yet.

1 Like

I see. My initial thought is perhaps these are user settings for those browsers, e.g it may only affect you.

If you would like to give me the URL I will browse to your game and hit the quit button and see what happens at my end. Happy to check using both Chrome and Edge.

You are so nice, I apologise in advance :smiley: (nothing bad, don’t worry!)

https://www.sharemygame.com/share/c99c83c8-e72a-4fb8-8e0a-41aa91bac925

I experienced the same behaviour and using Chrome, I wonder if this may be a bit of a safety feature, of either the browser or YouTube - e.g. someone with more malicious intents may redirect the user to a video which has a load of swearing in it which may blast out in their work place etc.

I note also that the video is still within the Unity iFrame due to the hosting on ShareMyGame.com, chances are this may be the same if you use itch.io, but that could be worth testing. What you really want is the parent page’s URL to redirect. I’m not sure that Unity will offer you anything to do that, C# (.Net) provides the functionality for redirecting the user and also registering code blocks within a .Net page, but of course, you’re not actually running a .Net page at this point. The only way I suspect you could achieve a redirect of the parent page would be through adding JavaScript.

Using JavaScript you could then do something like;

window.parent.location = 'http://your-video.com'

It would be my guess that if the page redirects, rather than the iFrame content, your video wouldn’t be muted.

That said, it might be worth looking through your options in Chrome also, just in case.

It may be a little more complex than you want to tackle right now, but you could check this out also;

I’ll check it out! Thanks!!

1 Like

You’re very welcome :slight_smile:

Just another note, I found this too;

Could potentially be the source of the issue, being that you said it was ok in Edge.

If you have some web hosting, you could upload your game files to that, not in the zip etc, then just browse to the index.html file, you wouldn’t have the iFrame issue to contend with then and could see whether it was purely browser related or also related to how the page is constructed.

If you don’t let me know, I’m happy to test this if you share your .zip file, we can add it to my site briefly, test it and then remove after. Let me know.

Ahh! That’s it then. I don’t, that’d be lovely! Though I kinda gave up and I think I’ll just rickroll people in silence :smiley: But I’d still like to know for the future.

number wizard three.zip (6.2 MB)

It was part of recent release. Look for a chrome experimental feature called autoplay-policy

Chrome://flags/#autoplay-policy

1 Like

http://www.robmeade.co.uk/unity/asli/index.html

When it isn’t within the iFrame it seems to behave differently, when it loads it has a little box which states “Unmute” etc, but I didn’t click on it, and it went, and then it played as you would expect. I also ran it in incognito mode just to test it a little further.

Whilst the change to Chrome does look entirely responsible, I think the iFrame issue is also a key factor here.

I’ll leave it there for a couple of hours for you to enjoy :slight_smile:

On an utterly unrelated note - nice cat :cat:

Aww thank you so much! I’ll try to trick as many people as I can :smiley:

Haha thanks! My cat thanks you :smiley:

1 Like

Sorry for the late reply after your very nice gesture btw! Had to step away for a bit. Also I have to admit that I have no idea what iFrame means but I’ll try to figure it out :smiley:

Hi,

Sorry, my bad, I come from a web-based systems background, an iFrame is an HTML tag, it allows you to effectively put a web page within another web page. If you look at ShareMyGame.com, you’ll note the panel in the middle where you game loads/run, that is within an iFrame. There’s the parent web page around the outside, and then your index.html loaded in the middle.

Hope this helps :slight_smile:


See also;

No, not your bad :smiley: Okay, I get it now! Thank you, and have a nice day :slight_smile:

1 Like

Thanks, you too.

I will remove the uploaded files this morning, now you have a clear understanding of the issue and we’ve tested :slight_smile:

Okay! I rickrolled a few people thanks to you :smiley:

Lol… I feel so ashamed… :wink:

Privacy & Terms