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

Starting playback in mp4 file at a point other than the beginning Safari issue


I am switching between synchronized video files based on the current playhead time. Things work great on Chrome and Firefox, but on Safari the loaded file always starts at the beginning. I am using strictly html5 which should support seeking to video that has not yet been buffered. Media server is Wowza.

Button code:

jwplayer("videocontainer").addButton(
'/img/large.png',
'Eye',
function () {
timePoint = jwplayer("videocontainer").getPosition();
jwplayer("videocontainer").load({
sources: [{
file: "{{ 'http://' . $onDemandExperienceModel['streamingMediaEdge'] . ':1935/VOD/_definst_/mp4:amazons3/ifta-vod-experiences/' . 'Eye_2Mbps.mp4' . '/playlist.m3u8' }}"
}],
start: timePoint
}).play(true);
},
'button1'
);

32 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

glennolsen

User  
0 rated :

I will tonight

glennolsen

User  
0 rated :

Actually, I will have to put this on our production site, so I would like to put it up while you look and take it down when you are done. My email is glenn@impreciv.com. Email me so I can coordinate with you. Thanks Ethan.

glennolsen

User  
0 rated :

Ethan,

http://iflytheairshow.com/onDemandExperiences/test-ondemand

Ethan Feldman

JW Player Support Agent  
0 rated :

You should use:

primary: ‘flash’,

glennolsen

User  
0 rated :

Not sure I understand why. I want to ensure that I use html5 don't I? I have not configured pseudo streaming. I'll give it a try though.

Ethan Feldman

JW Player Support Agent  
0 rated :

Please try it and let me know if that helps.

glennolsen

User  
0 rated :

That did the trick. Thanks Ethan

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

glennolsen

User  
0 rated :

iPhone and iPad? Did the a question posted about this with no answer. Not working on iOS. Apple issue? Are you testing with iOS 8 and does this get addressed?

Ethan Feldman

JW Player Support Agent  
0 rated :

It should still fall back to html5 for those devices.

glennolsen

User  
0 rated :

That is probably happening, but it is not positioning the play head to the time I set. All videos start at the beginning of the file. Is this normal for iOS or is it not working properly.

Ethan Feldman

JW Player Support Agent  
0 rated :

On http://iflytheairshow.com/onDemandExperiences/test-ondemand I don’t see it starting at any other position other than the start? On the desktop too?

glennolsen

User  
0 rated :

Desktop works fine. In other words, the start parameter of the load function call seeks the playhead to the right point before play starts. On iOS, the same code sets the playhead to the start of the file even though the start parameter of the load function is set.

Ethan Feldman

JW Player Support Agent  
0 rated :

There is no start parameter in JW6.

glennolsen

User  
0 rated :

That's interesting. I am using the latest version of JWPlayer and using the start parameter successfully in Chrome, IE, FF and Safari as indicated in the code above.

My research shows that iOS supports the html5 video currentTime property being set after a canplaythrough event is received.

So I am confused Ethan. Nothing new on that front though....

Ethan Feldman

JW Player Support Agent  
0 rated :

How are you using start here? Your player always plays back at the beginning on your URL.

If you want to start at another part other than 0 with JW6, you need to use the API and seek().

glennolsen

User  
0 rated :

Refer to the code posted at the beginning. It is a parameter set in the load API call.

start: timePoint

It always plays back at the beginning on IOS, but on desktop browsers the load call will play at the time I specify with

start: timePoint

Ethan Feldman

JW Player Support Agent  
0 rated :

start is not a valid JW Player variable, and your link only starts at the beginning of playback, even on the desktop.

glennolsen

User  
0 rated :

Sorry, I need you to "purchase" the OnDemand Experience. Register for an account and when I see that you have I will set you up with enough credits to test. The link that I gave above takes you to the sample which is a single VOD file.

Ethan Feldman

JW Player Support Agent  
0 rated :

Ok, can you send me a sample account then?

developer

User  
0 rated :

hi glennolsen,


be sure that ios8 is a beta version, some of the features are not available in the native player on iOS - i have the same trouble with some hls files - doesn't show the settings for audio language change and produce an error in audio languages when setting an subtitle language as default...

please try out with the latest official version (iOS 7.x) - can you reproduced your errors on it ???

glennolsen

User  
0 rated :

Ethan,

Visit http://iflytheairshow.com

Register as a user

I will then set your account up with the necessary credits to access the area to which I am having my issues.

glennolsen

User  
0 rated :

I have not yet taken a device to iOS beta. I am testing on latest iOS 7 (7.1.2) on both iPhone and iPad as well as latest versions of Xcode's iOS simulator (7.1).

glennolsen

User  
0 rated :

However, I just checked iPad and iPhone and now I am getting stream play errors.

Error loading medai
File can not be played.

But, it works fine in the iOS simulator.

Trying to track this down now so you can look into my original problem.

glennolsen

User  
0 rated :

May be that the video is encoded as Main 4.2 and it appears iOS wants no greater than 4.0. Had this playing with these files before, but I am re-econding to eliminate the variable.

glennolsen

User  
0 rated :

Stand by on looking into this further. I have to re-encode a bunch of files. Check back tomorrow. Thanks...

Glenn

Ethan Feldman

JW Player Support Agent  
0 rated :

Ok, np.

glennolsen

User  
0 rated :

Ethan, when you are ready, I am ready. Register as a user and when I see that you are registered, I will post a link here that will demonstrate the issue. Thanks for hanging in there with me.

Glenn

Ethan Feldman

JW Player Support Agent  
0 rated :

Can’t you just give me a sample account? Are you sure you want sample usernames posted in a public forum?

glennolsen

User  
0 rated :

Thought this would be more covert. How do I get you tine information privately?

Ethan Feldman

JW Player Support Agent  
0 rated :

support <at> jwplayer <dot> com.

This question has received the maximum number of answers.