WebSite X5Help Center

 
Stephen C.
Stephen C.
User

Audio playing on mobile  en

Autor: Stephen C.
Visited 380, Followers 1, Udostępniony 0  

I use the Video/Audio object to play sound clips, setting it to Autoplay when visible. That all works fine on computers, but on phones/tablets the page opens with the sound muted. Unfortunately, the mute/unmute button is never visible until the user expands the screen, when it magically pops up so it can be unmuted. I have tried various settings without success. Any help appreciated.

Posted on the
21 ODPOWIEDZI - 2 USEFUL
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

(It > En) ... there are cases and cases, ... you should post the link to this page online so we can evaluate...
.
Hi, ciao

.

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪
Incomedia
Eric C.
Incomedia

Hello Stephen,
I checked the website, and although visiting the example page directly does not autoplay the audio track (neither on PC nor on smartphone, but this is normal as no other interaction with the website has occurred when opening the page directly), but if I am browsing, for example https://www.colchesterrecalled.co.uk/cds---magazines.html and then visit one of these extracts

the audio track starts on autoplay, both on the computer and on my smartphone.
What browser and mobile device did you use?

I remain available.

Czytaj więcej
Posted on the from Eric C.
Stephen C.
Stephen C.
User
Autor

I'm afraid that you have missed my point, as it is not the autoplay function that is giving me a problem. It is the fact that on smaller devices, like smart phones, the MUTE icon is not initially visible and by default is seems to be muted. The viewer therefore has no sound but can't see the unmute icon until the screen is expanded. See attached picture which hopefully explains this.  It wouldn't be so bad if the default was unmuted, but I can't see how to efferct this.  This is the case on all the major browsers I have tried e.g. Safari, Firefox, Chrome, Edge

Czytaj więcej
Posted on the from Stephen C.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

.... OK... never mind...
... my code could have activated the audio by clicking Play...
... so wait for the experts...

.

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪
Daniel W.
Daniel W.
User
Najlepszy Użytkownik miesiąca DENajlepszy Użytkownik miesiąca EN

I don't have a smartphone to test.

I noticed that the audio and video object is placed on the left, leaving an empty space on the right, which is also present in the smartphone simulation. Maybe this space for the mute icon is missing, but that's just a guess since I can't test it.

Czytaj więcej
Posted on the from Daniel W.
Stephen C.
Stephen C.
User
Autor

The audio/video control is the only one in its row and there doesn't seem any way to align it left/right or centre.

I have tried changing its dimensions (for which there are settings), but that makes no difference.

It's a bit of a mystery but I'll keep exoerimenting!

Thanks for all you help KolAsim and Daniel.

Czytaj więcej
Posted on the from Stephen C.
Incomedia
Eric C.
Incomedia

Hello Stephen,
apologies for the misunderstanding.
When visiting https://www.colchesterrecalled.co.uk/jackashton.html and the other page you provided a screenshot of, this is the result, but I am using an Android smartphone:

Did you instead notice this on an iPhone or iPad, or also on Android phones/tablets?
I remain available.

Czytaj więcej
Posted on the from Eric C.
Stephen C.
Stephen C.
User
Autor

Please see attached image showing two screen shots. The one on the left is what initially appears, and the mute/unumute control it not visible. Unfortunately it seems to default to Muted, so although the clip is actually playing it cannot be heard. The image on the right shows that the mute/unmute icon becomes visible only when the screen is expanded.  This is on iPhone using Safari, Edge or Chrome. On Firefox it is fine, just like your Android picture. Maybe the default muting is connected to some setting in the browsers, but I can't think why this would make the icon invisible.

Czytaj więcej
Posted on the from Stephen C.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... On my Android+Chrome smartphone, this is exactly what I see:
1) ... Play stopped + Mute audio;
2) ... Click on Play > start audio with mute;
3) ... Click on the audio icon > start sound;
... With my code, clicking on Play also activates the sound.

.

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪
Stephen C.
Stephen C.
User
Autor

KolAsim

What you see on your Android+Chrome is exactly what I get on my iPhone+Firefox, but unfortunately iPhone+(Safari,Edge,Chrome) do not show that audio button until expanded!
Can you offer me your code to try please?

Stephen

Czytaj więcej
Posted on the from Stephen C.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... OK... my code used for the example on page (3) is this:

<script>
/* ---K--- */
$(document).ready(function() {
    $('audio').on('play', function() {
        $('audio').get(0).muted = false;
    });
  });
</script>

...!... there should be only one AUDIO object on the page...!...

.

ciao

.

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪
Incomedia
Eric C.
Incomedia

Hello Stephen,
I could reproduce the issue with a test project as well, checking with an available iPhone, and I reported this to development team.
I remain available.

Czytaj więcej
Posted on the from Eric C.
Stephen C.
Stephen C.
User
Autor

On researching some converations on the wider internet I have discovered the reason for this situation. Apparently, on some browsers if an audio clip is set to autoplay then it will automatically be muted. Because the mute/unmute icon sometimes is not visible on iPhone until the screen is expanded, this means that the viewer can not hear anything and is not immediately presented with the ability to unmute. 

I have fixed the situation now on my website by setting all the audio clips to be a Manual start, and they are then always unmuted.

Thanks to everyone who has responded and assisted me - much appreciated.

Czytaj więcej
Posted on the from Stephen C.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... OK  ...

.

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪
Stephen C.
Stephen C.
User
Autor

..but it still does not solve the problem of why the mute/unmute button does not always display on iPhone. It's not a big deal because the sound will stop when the viewer leaves the page.

Czytaj więcej
Posted on the from Stephen C.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... you can use the Play/Pause button...
... have you tried my code...?...
... with a variant of my code, instead of showing the player you can show two buttons/icons in its place, one for Play and one for Pause, therefore without seeing the player bar...

.

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪
Stephen C.
Stephen C.
User
Autor

KolAsim - I struggled a bit with your code, but did find that this simple biy of HTML does the trick.

<audio controls>
<source src="/MyFile" type="audio/mp3">
</audio>

Czytaj więcej
Posted on the from Stephen C.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... OK ...  Ciao

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪