Go
Not registered? Sign up!

Auto seek on HD switch

Google Translate
7 posts | return to the Plugins forum | get the rss feed for this thread

Nov. 05, 2009kisscool82

Hi,

I'd like to auto seek to the current position when I switch to HD mode instead of restart from the begining.

I'm using pseudo streaming with the apache module h264.

I can get the current position with a time listener.
I can detect the switch with the item controller event and the plugin state. But I can't seek to current position 'cause it has already changed when I switch.

Nov. 05, 2009kisscool82

I got it !
I just store the previous time position too and seek grin

Last thing : when I switch to HD, the player load the HD file, play from the beginning and then seek to my current position. What a waste of bandwidth !
How can I start to play directly from my current position ?

Nov. 05, 2009hobbs

 
Seeking to the current positin when you switch the HD mode is automatic if you have serverside support for streaming.

For instance, I'm using the FLV and H.264 streaming modules for LightTPD and nginx.

When I switch from SD (the FLV) to HD (the MP4) the player sends a request to the sever that looks like this:"GET /video/ThingsFallApart.mp4?start=19.2 HTTP/1.1" 200 4925406
As you can see, the player requested the MP4, starting at 19.2seconds, which is the point in the FLV where I clicked the HD button. Playing resumed at 19.2seconds with the HD file.

Nov. 05, 2009kisscool82

there's no start var in the http request....
Indeed I use mp4 and H264 streaming module for apache.

I use playlist, but it seems not to be the cause.

<script type="text/javascript">
var flashvars = {
id: "video",
file: "playlists/playlist.xml",
playlist: "right",
playlistsize: 280,
repeat: "list",
displayclick: "link",
linktarget: "_self",

plugins: "hd",

"hd.file": "playlists/playlistHD.xml",
"hd.state": false
};

var params = {
wmode: "opaque",
allowfullscreen: true,
allowscriptaccess: "always"
};
var attributes = {
id: "video",
name: "video"
};
swfobject.embedSWF("player.swf", "container", "920", "370", "9","expressInstall.swf", flashvars, params, attributes);

</script>


playlist :
<track>
<title>My video</title>
<location>videos/video.mp4</location>
<meta rel="type">http</meta>
<info><![CDATA[javascript:linkURI();]]></info>
</track>


playlistHD :
<track>
<title>My video HD</title>
<location>videos/video-hd.mp4</location>
<meta rel="type">http</meta>
<info><![CDATA[javascript:linkURI();]]></info>
</track>

Nov. 05, 2009hobbs

 
It seems that things are a bit "broken" if you use a playlist with the HD plugin.

I'm getting a request for the HD file that looks like this:"GET /video/ThingsFallApart.mp4?start=0 HTTP/1.1" 200 5242898

My playlists:

SD
<?xml version='1.0' encoding='UTF-8'?>
<playlist version='1' xmlns='http://xspf.org/ns/0/' xmlns:jwplayer='http://developer.longtailvideo.com/trac/wiki/FlashFormats'>
  <trackList>
    <track>
      <jwplayer:title>Things Fall Apart - SD</jwplayer:title>
      <jwplayer:file>http://willswonders.myip.org:8079/video/ThingsFallApart.flv</jwplayer:file>
      <jwplayer:type>http</jwplayer:type>
    </track>
  </trackList>
</playlist>


HD
<?xml version='1.0' encoding='UTF-8'?>
<playlist version='1' xmlns='http://xspf.org/ns/0/' xmlns:jwplayer='http://developer.longtailvideo.com/trac/wiki/FlashFormats'>
  <trackList>
    <track>
      <jwplayer:title>Things Fall Apart - HD</jwplayer:title>
      <jwplayer:file>http://willswonders.myip.org:8079/video/ThingsFallApart.mp4</jwplayer:file>
      <jwplayer:type>http</jwplayer:type>
    </track>
  </trackList>
</playlist>

Nov. 06, 2009kisscool82

there's nothing to do...
It works perfectly but not when I use a playlist.
How can I do ?

Nov. 16, 2009Zachary Ozer

Sorry - what's this issue here? Should the player not be tacking on '?start=x'?

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.