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

Faulty repeat setting on mobile + setting html5 as default


Hello,

setting repeat:"always" will result in a rather faulty behaviour on mobile devices (android). Once the video ends playing the screen turns black and the loading gif is displayed for a few seconds making the transition rough and not what I'd like to achieve. What I'd like to achieve is to mimic a gif. Here is what I'm talking about: http://idleevening.com/how-neck-snapped

Also how do I set html5 as default player, which would seem to be the way to go by now.

Thank you,
Catalin

6 Community Answers

MisterNeutron

User  
0 rated :

There's no Flash on a mobile device, so it's always using the HTML5 player.

The "repeat" attribute takes either true or false, not "always."

The repeat is smooth on a desktop, so any rough transitions are down to the HTML5 video player of the device itself (which is what JW Player is using - the script doesn't actually contain a "player" of its own).

support

User  
0 rated :

Repeat also seems to be taking "always", trust me, it works. Must be some historic value. Completely not important, but it works.

I maybe not understanding how things work, but the html5 player has the same design in terms of circular loading gif, control bar and play button as the flash one, so it seems it has something related to the JWPlayer itself, so the behaviour may not be entirely up to the device itself..

Even so aren't there any parameters that would make the transition smoother when the video it repeated, and not have the loading gif displayed for a couple of seconds ? There must be something to be done, I'm thinking, becasue other websites playing html5 gifs don't have this issue at all...

Cooper Reid

JW Player Support Agent  
0 rated :

Hi All-

Regarding the repeat parameter:
{repeat: ’always’} will work because the string ‘aways’ is truthy (javascript fundamental). You should really use true or false here.

I came up with a solution that works a lot better on mobile:
jwplayer(“player”).setup({
file: ‘video.mp4’,
image: ‘video.jpg’,
width:‘100%’,
autostart: true
});
jwplayer().onTime(function(e) {
if(Math.round(e.position) === e.duration) {
jwplayer().seek(0);
}
});

Best Regards,
Cooper

support

User  
0 rated :

Hello Cooper,

the thing is that on Android and I believe on iOs it's the same thing

autostart: true

is disabled, so at the end of the video it completely stops and displays the Replay button. If on addition to your code I add

repeat: true

It will look exactly as my initial code, big pause between end and beginning of a new loop, during which the loading gif is displayed

The overall result being totally ugly and unusable.

Any other ideas, before building my own thing for mobile ? I think this shouldn't be all that hard to achieve with jwplayer ...

Thank you
Catalin

support

User  
0 rated :

PS. How about making the player html5 default for desktop version ?

Cooper Reid

JW Player Support Agent  
0 rated :

You can do that by using primary: ‘html5’. There is not much that can be done with mobile playback because playback takes place natively in fullscreen.
Cooper

This question has received the maximum number of answers.