Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Wrong visualization on Android devices (site in Wordpress)

I am creating a site and I have to include a live video.
Company that created the live video gave me the following code:

<div class="wpb_raw_code wpb_content_element wpb_raw_html">
<div class="wpb_wrapper">
<div style="position: relative; display: block; width: 754px; height: 424px;" id="player"><object class="jwswf" name="player" id="player"bgcolor="#000000"data="" type="
application/x-shockwave-flash" height="100%" width="100%"><param value="true" name="allowfullscreen"><param value="always"name="allowscriptaccess"><param value="true" name="seamlesstabbing"><param
value="opaque"name="wmode"></object><div id="player"style="display: none;"></div></div>
<script src=""></script>
<script type="text/javascript">
if(navigator.userAgent.match(/android/i) != null){
jwplayer("player").setup({file: "",
type: "mp4",
primary: "html5"
} else {
sources: [{
file: "rtmp://"
file: ""
rtmp: {
bufferlength: 3,
'autostart': 'true',

title: 'Rtr99',
width: '754',
height: '424',
aspectratio: '16:9',
autostart: 'true',
repeat: 'true',
fallback: false,
logo: {

position: "top-right",
abouttext: "",
aboutlink: "",
}); }

It works fine on PC and iOS devices (I tested it with a real iPad and iPhone5) but on an Android device (real Galaxy Note 3) the player is displayed larger than the smartphone width.

Where I am wrong?


5 Community Answers


JW Player Support Agent  
0 rated :

Hi, Paolo.

I’m not sure why they told you to include the <object> element as you definitely don’t need that. That may be the object that is making larger than the viewport of the phone. Have you tried removing the <object> element?

Also, you really do not need to use that if…else statement to check if the user is using an Android. If you just use the setup that it’s in your “else” section, then the player will see that it can’t play the RTMP stream and use the HLS stream instead.

Thank you.


0 rated :

Hi Alex

I tried your suggestion but results are the same.

I also tried the Quick Publish on jwplayer site: works on PC but on mobile devices gives an error.

I have to include a streaming video on wordpress site.

Could you give me, please, a simple code in order to display correcty, on PC and mobile devices, a streaming video?



JW Player Support Agent  
0 rated :

Hi, Paolo.

All you should have to do is the following:

var playerInstance = jwplayer("myElement");
  file: ""

You can see this code working at

Please let me know if you need any more help or have any other questions.

Thank you!


0 rated :

It works now!

THANKS A LOT!!!!!!!!


JW Player Support Agent  
0 rated :

Not a problem!

This question has received the maximum number of answers.