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

jwplayer().play() on mobile devices


Hi,
Does jwplayer().play() should work on mobile browsers?

14 Community Answers

developer

Best Answer 

a bit nicer

<script>
function play(b){
jwplayer(b).play();
}
</script>

<div onclick="play(this.getAttribute['data-id']);" data-id="YOUR-JWPlayer-ID">Play</div>

View in conversation

developer

User  
0 rated :

YES

on iOS auto play doesn't work...

ben1189

User  
0 rated :

I just try it again with no success.
I'm using chrome inspect to debug chrome 36 on galaxy s3.
the player is in buffering mode and doesn't play.
(test this:http://support.jwplayer.com/customer/portal/articles/1406723-mp4-video-embed)

developer

User  
0 rated :

<script>function play(){
jwplayer("container").play();
}
</script>

<div onclick="play">Play</div>


should work ;-)

developer

User  
0 rated :

"container" is the ID of your jwPlayer, you define in setup ...

Ethan Feldman

JW Player Support Agent  
0 rated :

play() should work fine, as long as it is from a link on the page, for example.

developer

Best Answer  User  
0 rated :

a bit nicer

<script>
function play(b){
jwplayer(b).play();
}
</script>

<div onclick="play(this.getAttribute['data-id']);" data-id="YOUR-JWPlayer-ID">Play</div>

ben1189

User  
0 rated :

@Ethan,
please check this example:
http://jsfiddle.net/UAR3U/30/show
player start after 5 seconds by using jwplayer().play();
works fine in desktop but not in mobile.

developer

User  
1 rated :

this can not work - you simulate a auto play function with the setTimeout() or setInterval() function.

if you try this with a button, it will work...

Ethan Feldman

JW Player Support Agent  
1 rated :

Exactly. This is trying to fake autostart on mobile.

ben1189

User  
0 rated :

Thank you both

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

nasirbashir

User  
0 rated :

can i use this JW player on nokia xl please answer i am wating

Ethan Feldman

JW Player Support Agent  
0 rated :

No…

kevinvw2000

User  
0 rated :

Do you know how YouTube's mobile web page works? (It sort of auto plays).

(On iPhone 5) -

You go to http://m.youtube.com and it shows you a bunch of images of videos.
When you touch one of the images it then appears to reload the page with a query string - e.g.
https://m.youtube.com/watch?v=PkWxVG77xVk

And as soon as the page reloads, the video starts to play.

Is it possible to do something similar with JWPlayer ?

This question has received the maximum number of answers.