The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Odd no audio code fails on tablet (on normal url entrance HTML page)

3 posters

Go down

Solved Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 5th 2019, 5:02 pm

Technical Details


Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Screenshot of problem : https://i.servimg.com/u/f28/15/70/74/50/screen11.png
Who the problem concerns : All members
When the problem appeared : Today
Forum link : http://lucario-domain.forumotion.com/forum

Description of problem

On my tablet this code only is working on preview an when I edit HTML the music plays but when I view the HTML link normal I don't here it playing the old code embed worked fine then it stopped working. On portal the code works fine. It's very odd the code plays on html preview an when I edit the code this my Android tablet high end device

Code:
<audio width="300" height="48" autoplay="autoplay"><source src="http://mp3 link here" type="audio/mpeg"/>Your browser does not support HTML5 audio. Please update your browser to view this media content.</audio>
this generator code does work

Error the same thing is happening again here why aren't generator codes not working when I enter my http://lucario-domain.forumotion.com normal HTML page it's supposed to something is up with forumotion not communicating with generators

Solved an answered by @ape plug-in removed to HTML


Last edited by Nape4 on August 6th 2019, 10:42 pm; edited 3 times in total
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Ape August 5th 2019, 9:19 pm

Sadly we have no power over the music player used for that code you will need to talk to the maker of the player.


Odd no audio code fails on tablet (on normal url entrance HTML page) Left1212Odd no audio code fails on tablet (on normal url entrance HTML page) Center11Odd no audio code fails on tablet (on normal url entrance HTML page) Right112
Odd no audio code fails on tablet (on normal url entrance HTML page) Ape_b110
Odd no audio code fails on tablet (on normal url entrance HTML page) Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19128
Reputation : 1993
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 5th 2019, 9:38 pm

Nape4 wrote:

Technical Details


Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Screenshot of problem : https://i.servimg.com/u/f28/15/70/74/50/screen11.png
Who the problem concerns : All members
When the problem appeared : Today
Forum link : http://lucario-domain.forumotion.com/forum

Description of problem

On my tablet this code only is working on preview an when I edit HTML the music plays but when I view the HTML link normal I don't here it playing the old code embed worked fine then it stopped working. On portal the code works fine. It's very odd the code plays on html preview an when I edit the code this my Android tablet high end device

Code:
<audio id="MusicPlayer" autoplay="autoplay" src="http://mp3 link here"><embed src="http://mp3 link here" autoplay="true" name="MusicPlayer" id="MusicPlayer" style="width: 450px; height: 300px;" /></audio>

Things like you want to do are done by JS. If you wish can be done with jQuery. There must be a connection , a constant update. When I make Android application, I have to make server connection in order to send data to Android and notice user there is new version. When he click back, that data is sent back to me. After that I know what to do.
That is communication. With simple HTML it won't work.
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 5th 2019, 9:54 pm

Actually I found a new player it works an these are generator codes for html pages @ape you didn't understand my query when I go on my preview custom htlm page I could here the song or player file embed fine or when I go in admin cp to edit it does also play on html pages. You don't understand codes are supposed to communicate with html custom pages if there generated. Something must be happening with normal HTML code generator code not communicating with forumotion html in admin cp. Befor the normal embed code did work an that last audio player did work correctly it was not communicating. Generator codes are not communicating normally with my Android chrome an it not the player it's self any code like HTML which never changes are supposed to work something is up with it. Explain why I can here my song in preview/edit htlm pages but not my main link on Google chrome Android? Also why is my code working here hue http://lucario-domain.forumotion.com/portal ya proof something is up with main html pages for forumotion
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 6th 2019, 2:34 am

I'm on my phone currently and can't do much debugging. I'll look into the problem tomorrow.

I have something else to say though. Picture this. You're online. Visiting forums, reading articles, maybe listening to music. All of a sudden, you go on a forum and music starts randomly playing. You didn't want to hear any sound, you just wanted to browse a forum. Maybe you had your volume way too high and had a mini heart-attack when you heard music unexpectedly playing. Maybe there were other people near you and they were annoyed by the sound coming from your device. You realize that a site that autoplays music doesn't care much about what you and the other users want to see. You figure out that the admin is just adding random scripts thinking that more is always better. You probably decide to never visit that site again.
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 6th 2019, 4:28 am

You can control were the music plays I mostly only place it in portal or the main HTML page only the code can only be inputted manually by the admin in were you place it the code only works for were you place the code only it would not play over unless you have that tab over it only. Reason why you can remove the embed code to remove audio
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Storyteller of Wonderland August 6th 2019, 9:49 am

Nape4 wrote:
Spoiler:

@Nape4, hello!

I think the problem is a script conflict or something else on the forum. Most likely, for the player to work properly, it must be in the body of HTML5, and the phpbb2 version refers to the HTML4 version. Also the version of Jquary is lower than the latest version of this library.

I recommend that you find a ready-made audio player and use it if there is no conflict again. But this is a better option than trying to treat something incurable. In my native technical support forum, I was once told that a lot would not work. But do I manage to make a social network from a forum? Haha ...

I have a ready-made player, and I will try to check it for your version, of course, if you need it.
Storyteller of Wonderland
Storyteller of Wonderland
Forumember

Female Posts : 108
Reputation : 10
Language : Russian, German, French, English.
Location : Russia

http://milanwake.forum2x2.ru

Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 6th 2019, 10:25 am

Hello again,

System32 wrote:Things like you want to do are done by JS. If you wish can be done with jQuery. There must be a connection , a constant update. When I make Android application, I have to make server connection in order to send data to Android and notice user there is new version. When he click back, that data is sent back to me. After that I know what to do.
That is communication. With simple HTML it won't work.
Completely wrong. The audio element handles the connection/update that you are talking about. You don't need javascript for something like this.

Storyteller of Wonderland wrote:I think the problem is a script conflict or something else on the forum. Most likely, for the player to work properly, it must be in the body of HTML5, and the phpbb2 version refers to the HTML4 version. Also the version of Jquary is lower than the latest version of this library.
That is simple html code. It can't really conflict with anything.

Onto the actual issue here.
Code:
<audio width="300" height="48" autoplay="autoplay"><source src="http://mp3 link here" type="audio/mpeg"/>Your browser does not support HTML5 audio. Please update your browser to view this media content.</audio>
It seems like you are trying to play an mp3 file but set the type to audio/mpeg. The correct code would look like this:
Code:
<audio controls>
<source src="file.mp3" type="audio/mp3"/>Your browser does not support HTML5 audio. Please update your browser to view this media content.
</audio>
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Storyteller of Wonderland August 6th 2019, 10:33 am

Sentis wrote:Hello again,

Spoiler:

Hi buddy!

Yes, you are right that there can be no conflict, but there is something to argue with, but I don’t have time to point out some semantic rules in HTML. I am trying to solve my problem with the user list that eats up my brain.

I want to expand the solution to this problem, referring to one of the best sites:

https://www.w3schools.com/html/html5_audio.asp

Everything is perfectly shown there, and it is clear that to solve the problem, there are three types of files.

Okay Laughing Mr. Green

Have a good day!
Storyteller of Wonderland
Storyteller of Wonderland
Forumember

Female Posts : 108
Reputation : 10
Language : Russian, German, French, English.
Location : Russia

http://milanwake.forum2x2.ru

Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 6th 2019, 10:38 am

Storyteller of Wonderland wrote:
Sentis wrote:Hello again,

Spoiler:

Hi buddy!

Yes, you are right that there can be no conflict, but there is something to argue with, but I don’t have time to point out some semantic rules in HTML. I am trying to solve my problem with the user list that eats up my brain.

I want to expand the solution to this problem, referring to one of the best sites:

https://www.w3schools.com/html/html5_audio.asp

Everything is perfectly shown there, and it is clear that to solve the problem, there are three types of files.

Okay Laughing Mr. Green

Have a good day!

Bold of you to say that the problem is easy to solve after you've been randomly babbling without getting even close to a solution.
Anyway, there's no need for us to argue about this. Have a nice day and good luck with your user list!
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 6th 2019, 3:17 pm

I see what the issue is with the code
Code:
<audio width="300" height="48" controls="controls"[autoplay="autoplay"]><source src="mp3 here" type="audio/mpeg"/>Your browser does not support HTML5 audio. Please update your browser to view this media content.</audio>
in some way the autoplay doesn't work with html 5 I tested this with controls showing an I figured out the issue the code of this does work correctly when you preview/edit only on html page in admin cp. So some how autoplay code is not working with html if you care to try it out @ape on Android Google chrome please do

Site I use to generate embed code seen above http://jasonlau.biz/embedcodegenerator/ this site controls html 5 an 4 mp3 files
So autoplay code is not working correctly on normal html index only works properly on preview/html edit admin cp which is odd.

100% confirmed autoplay only works properly only in admin cp when ether editing html or page preview
Fails to work properly on normal HTML index without the preview or editing it but only works if control player is showing an you play it manually
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Ape August 6th 2019, 4:48 pm

I tested this my self and I found that the code is not 100% compatible with our HTML page after posted live.
the preview is not live it's just a browser preview that's why it works in the ACP.

sadly as this is a add on / "plug in" I can't see the team making any change to our systems to make it work.


Odd no audio code fails on tablet (on normal url entrance HTML page) Left1212Odd no audio code fails on tablet (on normal url entrance HTML page) Center11Odd no audio code fails on tablet (on normal url entrance HTML page) Right112
Odd no audio code fails on tablet (on normal url entrance HTML page) Ape_b110
Odd no audio code fails on tablet (on normal url entrance HTML page) Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19128
Reputation : 1993
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 6th 2019, 8:47 pm

Nape4 wrote:I see what the issue is with the code
Code:
<audio width="300" height="48" controls="controls"[autoplay="autoplay"]><source src="mp3 here" type="audio/mpeg"/>Your browser does not support HTML5 audio. Please update your browser to view this media content.</audio>
in some way the autoplay doesn't work with html 5 I tested this with controls showing an I figured out the issue the code of this does work correctly when you preview/edit only on html page in admin cp. So some how autoplay code is not working with html if you care to try it out @ape on Android Google chrome please do

Site I use to generate embed code seen above http://jasonlau.biz/embedcodegenerator/ this site controls html 5 an 4 mp3 files
So autoplay code is not working correctly on normal html index only works properly on preview/html edit admin cp which is odd.

100% confirmed autoplay only works properly only in admin cp when ether editing html or page preview
Fails to work properly on normal HTML index without the preview or editing it but only works if control player is showing an you play it manually
That code is partially wrong. There should be no brackets around autoplay and the type attribute should have the value audio/mp3. Also the controls attribute doesn't need to have a value(instead of controls="controls" you can just leave it as controls).

Browsers implemented a policy that blocks autoplay unless one of these happens:
1.The sound is muted
2.The user has already interacted with the site(which is why it works in the acp)
3,If the browser asks the user to grant autoplay permission. I'm not too sure what would trigger that behaviour.
More about this here:https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide

In other words, the only way to have autoplay sound is by waiting for the user to click somewhere then playing the sound. Supposing that you have this html code:
Code:
<audio width="300" height="48"><source src="http://soundbible.com/grab.php?id=2124&type=mp3" type="audio/mp3"/>Your browser does not support HTML5 audio. Please update your browser to view this media content.</audio>
The audio url is just some random sound I found online.

To make this work you will also need this javascript code:
Code:
document.addEventListener('DOMContentLoaded', function(){
var audio=document.querySelector('audio');
function handle(){
audio.play();
document.removeEventListener('click', handle, false);
}
document.addEventListener('click', handle, false);
})
This will wait for the user to click somewhere and just then play the sound. You can leave autoplay in the html code in case some older browsers stil allow it.

I still think that this whole idea of autoplaying sound is annoying for users, but in the end it's your choice. Phew, this was a long comment What a Face
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 6th 2019, 10:37 pm

The point why I used brackets in code is to point out the issue only which section of the code were its not working on normal HTML pages it's not apart of the code it's for point out.

Since I got an answer from @ape this subject is solved that it is a plug in removed to HTML
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by Guest August 6th 2019, 10:54 pm

A plugin in html? What? Did you at least try the codes from my last post?

I don't even know why am I wasting my time
avatar
Guest
Guest


Back to top Go down

Solved Re: Odd no audio code fails on tablet (on normal url entrance HTML page)

Post by skouliki August 8th 2019, 7:43 pm

marked as solved
Problem solved & topic archived.
Please read our forum rules:  ESF General Rules
skouliki
skouliki
Manager
Manager

Female Posts : 15143
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum