-1
I need a code that identifies if the browser is Firefox and then runs a code block and otherwise runs another. The code block is HTML5
pure.
The code is to be used within Wordpress, so I believe only accept HTML
, but if there is no other way it can be in PHP
or Javascript
.
Brother, I am using the wordpress module on a site of my own. What I want to do is the following: The site is a news portal. I put a player on my radio online. The code is as follows::
<iframe src="http://player.srvstm.com/player-barra/19378/000000" frameborder="0" width="100%" height="31"></iframe>
I realized that this player does not run in Firefox and wanted to put an alternative code only for it in Html5, this below:
<div id="player-html5" class="players">
<audio id="radios-player" controls="" preload="none" autoplay="" src="http://stm3.srvstm.com:19378/;"></audio>
I thought about using an IF in some language to identify the browser, but I do not know if it is the most viable solution.
The website is: www.planetariosdigital.com.br
Wordpress is made in PHP, you can change "everything" in it. If you are using https://wordpress.com you will really only be able to use HTML. More details are needed.
– Inkeliz
I added more details above. See if you can understand now
– LeandroCabral
Does HTML 5 code work on all browsers (including Firefox) correctly? Why don’t you use it by default?! You can do this by using Firefox
is.js
(http://is.js.org/), then useif(is.firefox()){ }else{}
. However, if one code works on all, use it. The alternative search situation specifies for each browser is when each requires a different "code", which is not the case, because one code can work on all (the second option).– Inkeliz
I didn’t use the
html5
by default why I didn’t find customization for it. It pure is very simple, but I’ll keep looking for customization for the player onhtml5
. Thanks for the tip– LeandroCabral