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

Playlist start time


how can configure the playlist in such a way that the video will be implemented on a fixed schedule?

88 Community Answers

JW Player

User  
0 rated :

Can you provide some more details?

JW Player

User  
0 rated :

ok excuse me for english.
I want the videos in the playlist are played at specific times.
example
video1.flv hours 10:00 a.m.
video2.flv hours 13:00
etc..
when I open the web pages the jw player must "read" the current time and play as scheduled in the playlist

thanks

JW Player

User  
0 rated :

You can:

1) enter the time in a meta element of the playlist:bc.. <meta rel='starttime'>10</meta>


2) when the player loads, it will get the playlist, look for the first starttime that is less than the current time and play that track.

Assuming that if the time is between 11 and 13 you want to play the same track, etc. Of course the details can be adjusted to match your exact requirements.

So as an example:bc.. TimeTrack
0-20
2-51
5-72
7-113
11-134
13-176
17-197
19-218
21-239
23-2410



JW Player

User  
0 rated :

i have no a rmtp server,
i,m use php streaming

can work the same

JW Player

User  
0 rated :

this is a example of my playlist, but not working.
where wrong ?

bc.. <?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>

<track>

<creator>Retro Bus</creator>
<title>retrobus</title>
<location>retrobus.flv</location>
<meta rel='starttime'>12</meta>


</track>

<track>

<creator>LipoPropulsion</creator>
<title>liposmall</title>
<location>liposmall.flv</location>
<meta rel='starttime'>13</meta>
</track>


</trackList>
</playlist>


JW Player

User  
0 rated :

You also need some JavaScript to parse the playlist and find the correct track by starttime.

I don't have time to do it now, but in afew days, I'll assemble the JS code.

JW Player

User  
0 rated :

ok
thanks you

JW Player

User  
0 rated :

i have tested your script, but not working.
i
this is my link

http://eurotechonline.altervista.org/prova

JW Player

User  
0 rated :

ok, it works.
you could do all this with the playlist on mysql db?

JW Player

User  
0 rated :

It doesn't matter where the playlist comes from, as long as it has the *starttime* meta element. So your playlist generator has to include some method of determining the starttime and including the meta element in the playlist.

JW Player

User  
0 rated :

ok.
the script sets the video to start, implement, and then not go ahead with the playlist but stops.
where is the problem?

JW Player

User  
0 rated :

could this be implemented, instead of a daily schedule, by specific day and time on a single month?

my situation is the following: i have several feeds that show live webcams, but i only want the live content from 9pm to 3am, only on weekends, and during the day (or non-weekends) i want the player to show another feed, that shows pre-recorded content.

would it be easier with the livestream plugin?

JW Player

User  
0 rated :

Any help with my problem please??

I want to create an xml mp3 playlist that plays 20 tracks. I want to start the playlist off at 18:00 GMT.

I then want to make it so that if another user logs on at 18:15 GMT then the playlist starts playing for them from 15 minutes in, which may be half way through the third track for example.

Can someone tell me if this is possible? I have tried to tweak the code posted by 'lefTy' on this thread, with no luck.

HELP!!

JW Player

User  
0 rated :

Hi,

how does the correct format looks like if you want to play a video at 3:34 pm?

I tried a lot, but nothing works.
- 3:34
- 3.34
- 15:34
- 15-34
...

Whats the right solution?

Greetz

JW Player

User  
0 rated :

The code posted above only checks the hours.

To check hours and minutes, you would have to enhance the code; something like this:bc.. functionstartTime()
{
playlist=player.getPlaylist();

if((playlist!==null)&&(playlist!==undefined))
{
varcurrentTime=newDate();
varhoursminutes=currentTime.getHours()+'.'+currentTime.getMinutes();

for(varjinplaylist)
{
//alert(hoursminutes+':'+playlist[j].starttime);
if(playlist[j].starttime>hoursminutes)
{
player.sendEvent('ITEM',(j-1));
gid('start').innerHTML='STARTTIME:'+playlist[j-1].starttime+'CURRENTTIME:'+hoursminutes+'ITEM:'+(j-1);
break;
}
}
}
else
{
setTimeout("startTime();",50);
}
};



Then write the time in a 24 hour decimal format of HH.MM so we don't have to split on a colon:bc.. <meta rel='starttime'>15.34</meta>



JW Player

User  
0 rated :

Very nice, thank you!

I just want to share a small bug, it wasn't easy to find the reason for it ;-)

Sometimes, the stream didn't start at my first visit, only after a simple reload of the browser. Why? I think the playlist comes up a bit too slow, so the player doesn't know where to start. After the reload, the playlist is already in the cache and the stream can start.

You can test this bug by switching off the browser cache.

The solution might be a preloader for the playlist. The playlist has to be load always at first, then the other stuff can follow.

Otherwise every new user will see nothing (or a wrong starttime). Just want to mention...

JW Player

User  
0 rated :

The function startTime() checks to see if the playlist is available from the player before it does anything.

If the playlist has not been loaded and parsed into an object, and is not available from the player, the function tries again in 100ms.

So something else is wrong.

Please post a link to a test page which displays the errant behavior.

JW Player

User  
0 rated :

This shows the alpha development:
=> Player: http://dev.clipcast.de/clipcast-live/
=> Playlist: http://dev.clipcast.de/fileadmin/user_upload/playlist/playlist.xml

Most of the time the playlist won't be load at first. After pressing F5 the player starts again at the right position. But sometimes it takes up to 10 reloads...

Btw: I use a RTMP-Stream, not the progressive download. A RTMP-Stream can start a bit faster. Perhaps a problem?

JW Player

User  
0 rated :

Sorry, I can't reproduce the errant behavior.

I tested many times:

1) change the computer's time,

2) clear the brosere's cache,

3) re-load your page.

The player always started on the correct track.

Any more details about the failure?

JW Player

User  
0 rated :

Yes, that's the problem :-(

In some cases the error is very hard to reproduce. I will test a bit more to give you a feedback soon...

Thank you for your effort, I really appreciate it!

JW Player

User  
0 rated :

I experienced a similar problem. Try adding in a small delay to your PlayerReady function.

setTimeout("startTime()", 650);

Adding in the delay solved the problem and the initial playlist that is loaded is parsed with the player starting at the right track.

Martin

JW Player

User  
0 rated :

Using a delay is very problematic. For most users, the delay is far too long, yet there is always the case where the delay isn't long enough and the application fails.

The method that we're using waits until it receives a valid playlist (usually between 50-100ms), then performs the indexing. This makes it both quick and robust.

JW Player

User  
0 rated :

Sorry,

So as I understood, this script will play the track from where it should be started?

for example, I have many tracks, and one of them scheduled to play at 13:00 am, lets call it track007, and the track duration is 5:24 minutes. Now, a visitor opened the website at 13:02:00 am , then track007 will start from minute 2:01 ?

is this possible?

JW Player

User  
0 rated :

And I forgot to say, that I'm using mix between rtmp, and fake php stream, or as you call it, scheduled play-list with files, and the files in the sever not rtmp....

JW Player

User  
0 rated :

The script starts the track at 00:00.

You could enhance the script to SEEK to a position within the selected track, that was based upon the amount of time that had elapsed since your start time.

After the index, calculate the offset and send a seek.
bc.. player.sendEvent('ITEM', (j - 1));
var offset = hoursminutes - playlist[j - 1].starttime;
player.sendEvent('SEEK', offset);



JW Player

User  
0 rated :

I agree that using a delay is not a good idea, so I have replaced the delay with a listener in an addlisteners function that is called by the playerReady function.

player.addModelListener("STATE", "startTime");

Then removed it before instructing the player.

player.removeModelListener("STATE", "startTime");
player.sendEvent('STOP');
player.sendEvent('ITEM', (j-1));

This works, once for the page, and once correctly again if the page is re-loaded. Then the playlist will simply carry on in sequential order.

I'm not sure if this is the most efficient way of solving this problem (ie using ModelListener), so any better solutions would be interesting. Thanks for the "seek" enhancement, I'll test this too, particularly if the time elapsed is greater than the length of the item.

Martin

JW Player

User  
0 rated :

Re; The SEEK calculation. I think that the "offset" as worked out above is in 1/100's of minutes, so you need to multiply it by 100 and then by 60 to convert it into seconds.

JW Player

User  
0 rated :

thanks for the above contributions.

if any one is interested in extending the above code examples (for pay) to a solution that lets you schedule what gets played per week, per day, per hour, right down to the minute;

i am aware that Longtail mentions they don't take any flash work for less than $2000, so freelancers please reply. i'm sure this work is nowhere near $2000.

i'm sending this to the longttailvideo contact form too.

Cesar satamusic@gmail.com

JW Player

User  
0 rated :

Hey all,

some nice suggestions above, thank you!

Anyway... by now I'm not very happy with this type of schedule. Using Javascript to read the current position in the playlist is always a bit risky. Thinking about different plattforms (e.g. mobile devices) or gaming devices, they will often block JS (whops!) or something else.

Currently I try to build a playlist with the known structure, but all the videos should be stored in a live-instance of my Adobe Flash Media Server. So we get one RTMP-Link for the Player. I like the approach of a server-side playlist and not one on the client side.

Does anyone has some experience with this?

JW Player

User  
0 rated :

Thanks to all of those who participated in this thread. I've been pondering this problem for a while and you've all helped immensely. *Gratzie*!

JW Player

User  
0 rated :

thanks again for your contributions. Longtail has not replied to me, they might not be interested in small projects under $5000 (hint*hint*contactus!).

any developers willing to implement this please contact me @ satamusic@gmail.com

alivepubs.com

JW Player

User  
0 rated :

I have tryed the supported script but i did not work. I did everything i had read here but nothing works. The player always started with the first clip. Can someone please look at it ?
http://www.videosdelen.nl/flvplayer/index2.html

xml :

http://www.videosdelen.nl/flvplayer/playlist2.html

I also had another question. is the time that you fill in the xml file the server time or the time of windows ?

JW Player

User  
0 rated :

The time in the playlist is the time on the client.

This should work better tested & working.
bc.. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<htmllang="en">

<head>

<title>SimplePlayOnSchedule-JWMPv4.4.x-swfobjectv2.1</title>

<scripttype="text/javascript"src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>

<scripttype="text/javascript">
varflashvars=
{
'file':'playlist_domenico.xml',
'playlist':'right',
'playlistsize':'400',
'repeat':'none',
'shuffle':'false',
'stretching':'none',
'skin':'bright',
'frontcolor':'86C29D',//text&icons(green)
'backcolor':'003367',//playlistbackground(blue)
'lightcolor':'C286BA',//selectedtext/trackhighlight(red)
'screencolor':'000000',//screenbackground(white)
'id':'playerID1',
'autostart':'true'
};

varparams=
{
'allowfullscreen':'true',
'allowscriptaccess':'always',
'bgcolor':'#000000'
};

varattributes=
{
'name':'playerID1',
'id':'playerID1'
};

swfobject.embedSWF('player-4.5.223.swf','player1','900','327','9.0.124',false,flashvars,params,attributes);
</script>

<scripttype="text/javascript">
varplayer=null;
varplaylist=null;


functionplayerReady(obj)
{
player=gid(obj.id);
startTime();
};


functionstartTime()
{
playlist=player.getPlaylist();

if(playlist.length>0)
{
varcurrentTime=newDate();
varhoursminutes=1*(currentTime.getHours()+'.'+currentTime.getMinutes());

for(varjinplaylist)
{
alert(hoursminutes+':'+playlist[j].starttime);
if(playlist[j].starttime>hoursminutes)
{
alert('Track:'+j+'StartTime:'+playlist[j].starttime);
player.sendEvent('ITEM',(j-1));
gid('start').innerHTML='STARTTIME:'+playlist[j-1].starttime+'CURRENTTIME:'+hoursminutes+'ITEM:'+(j-1);
break;
}
}
}
else
{
setTimeout("startTime();",100);
}
};


functiongid(name)
{
returndocument.getElementById(name);
};
</script>

</head>

<body>

<divid="playercontainer1"class="playercontainer"><aid="player1"class="player"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheAdobeFlashPlayertoseethisvideo.</a></div>
<divid="start"style="font-family:arial;">STARTTIME:CURRENTTIME:ITEM:</div>

</body>

</html>



*_Change the playlist filename and the player version._*

Comment out the alerts when they get annoying.

JW Player

User  
0 rated :

It did not work for me :( when i set the time in the playlist on 15:05 and 15:11 and i visit the site onn 15:11 i get two messages that you can see in the screenshot i uploaded. And than the player start with the first movie file !

http://img1.foto-hosting.nl/33427playlist1.jpg

http://img1.foto-hosting.nl/229035playlist2.jpg

JW Player

User  
0 rated :

Here's the exact code that I posted above, functioning correctly: *http://willswonders.myip.org:8074/Roy.html*

The playlist is available at: *http://willswonders.myip.org:8074/playlist_domenico.xml* if it would be helpful to you.

See brokenString's post of Apr. 21, 2009 for the correct time format if you are using hours and minutes.

JW Player

User  
0 rated :

i copied your code exactly but it didn't work for me. You can see it on this url :

http://www.videosdelen.nl/flvplayer/index2.html

http://www.videosdelen.nl/flvplayer/playlist2.xml

JW Player

User  
0 rated :

You have a mistake here:bc.. <location>*/Movie*http://www.videosdelen.nl/flv/video3.flv</location>



JW Player

User  
0 rated :

changed it but it gives the same problem...

JW Player

User  
0 rated :

You need to add a few more tracks to your playlist because it will always go backward one track.

In other words, if the local time is 16:30 and the starttime is 17, the player will load the previous track with a starttime of 16 until the local time is 17:01, if there is a starttime greater than 17.

The last track should have a starttime of 24, which will never be played, because it will always go back one track.

JW Player

User  
0 rated :

Oke i got it working now with hours. But when i do it with minutes it do not work. It always plays the first track.

Working version with hours :
http://www.videosdelen.nl/flvplayer/index2.html

Not working version with hours and minutes :
http://www.videosdelen.nl/flvplayer/index3.html

http://www.videosdelen.nl/flvplayer/playlist3.xml

JW Player

User  
0 rated :

Damn strings!

Replace this whole function.bc.. functionstartTime()
{
playlist=player.getPlaylist();

if(playlist.length>0)
{
varcurrentTime=newDate();
varhoursminutes=1*(currentTime.getHours()+'.'+((currentTime.getMinutes()<10)?'0'+currentTime.getMinutes():currentTime.getMinutes()));
//alert('hoursminutes:'+hoursminutes);

for(varjinplaylist)
{
gid('start').innerHTML='ITEM:'+j+'STARTTIME:'+playlist[j].starttime+'CURRENTTIME:'+hoursminutes;
//alert(j+':'+hoursminutes+':'+playlist[j].starttime);

if((1*playlist[j].starttime)>hoursminutes)
{
player.sendEvent('ITEM',(j-1));
gid('start').innerHTML='ITEM:'+(j-1)+'STARTTIME:'+playlist[j-1].starttime+'CURRENTTIME:'+hoursminutes;
//alert('Track:'+(j-1)+'StartTime:'+playlist[j-1].starttime);
break;
}
}
}
else
{
setTimeout("startTime();",100);
}
};



I also took care of the case where minutes have a leading zero.

JW Player

User  
0 rated :

It works perfectly now !!!! Thanks you for all your help !!

JW Player

User  
0 rated :

You're welcome.Enjoy!


*_Good Luck!_*

JW Player

User  
0 rated :

I am a developer new to using the JWPlayer. So far, so good.

As an OOP I like reuse. Therefore, my implementation includes the use of XML playlist. However, my host is smart to the FLV extension. I am certain they are blocking binaries with no extension and those with FLV.

I did find that I can play file with extension TXT while setting flashvar 'type' to 'video'. If only a playlist 'type' entry was supported.

Would support 'type' in the playlist be a worthy feature request? If so, how do I log such?

Thanks,

Adam

http://adamcox.net
http://vorba.com

JW Player

User  
0 rated :

You can put any of the *File properties* flashvars that you want in the playlist using a meta element for XSPF or the jwplayer namespace for MediaRSS. You can also use your own flashvars for special needs.

XSPFbc.. <meta rel='type'>video</meta>

MediaRSSbc.. <jwplayer:type>video</jwplayer:type>

See: *http://developer.longtailvideo.com/trac/wiki/FlashFormats#XMLPlaylists*

File properties: *http://developer.longtailvideo.com/trac/wiki/FlashVars#Fileproperties*

JW Player

User  
0 rated :

I was "lost" and now I'm found. Appreciate it!

JW Player

User  
0 rated :

Is it possible to have 'statday' and 'time', like 'startday 091201T00:00' instead of just the 'starttime'?

JW Player

User  
0 rated :


It's easiest to do a numerical comparison, so use only numerical characters with leading zeros with the largest time unit first.

YYYYMMDDHHMMSS

So December 15, 2009 at 1:25:24 PM would be 20091215132524.

Then you can retrieve the date and time and iterate through the playlist doing a simple comparison.

JavaScript Date object reference here: *http://www.w3schools.com/jsref/jsref_obj_date.asp*

JW Player

User  
0 rated :

Hmm, like '<meta rel='starttime'>20091215132524</meta>?

JW Player

User  
0 rated :


I updated the *Test Page* to use the full time:

*http://willswonders.myip.org:8074/Simple_PlayOnSchedule.html*

Playlist:

*http://willswonders.myip.org:8074/domenico-1.xml*


Seems to work you might want to check the edge cases at midnight.

JW Player

User  
0 rated :

Hobbs
Thank you for your help!
But I cant make my playlist work.

<?xml version="1.0" encoding="UTF8" ?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<meta rel='starttime'>20091201000000</meta>
<title>UNT KALENDER</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091201Kalenderjingel.flv</location>
<description>This is a place to have some information about the video</description>
<creator>UNT TV</creator>
</track>
<track>
<meta rel='starttime'>20091208000000</meta>
<title>UNT KALENDER 08</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091208Kalender.flv</location>
<description>This is a place to have some information about the video</description>
<creator>UNT TV</creator>
</track>
<track>
<meta rel='starttime'>20091207000000</meta>
<title>UNT KALENDER 07</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091207Kalender.flv</location>
<creator>UNT TV</creator>
</track>
<track>
<meta rel='starttime'>20091206000000</meta>
<title>UNT KALENDER 06</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091206Kalender.flv</location>
<creator>UNT TV</creator>
</track>
<track>
<meta rel='starttime'>20091205000000</meta>
<title>UNT KALENDER 05</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091205Kalender.flv</location>
<creator>UNT TV</creator>
</track>
<track>
<meta rel='starttime'>20091204000000</meta>
<title>UNT KALENDER 04</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091204Kalender.flv</location>
<creator>UNT TV</creator>
</track>
<track>
<meta rel='starttime'>20091203000000</meta>
<title>UNT KALENDER 03</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091203Kalender.flv</location>
<creator>UNT TV</creator>
</track>
<track>
<meta rel='starttime'>20091202000000</meta>
<title>UNT KALENDER 02</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091202Kalender.flv</location>
<creator>UNT TV</creator>
</track>
<track>
<meta rel='starttime'>20091201000000</meta>
<title>UNT KALENDER 01</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091201Kalender.flv</location>
<creator>UNT TV</creator>
</track>
</trackList>
</playlist>

I want my videos to be played "repeat = list" for each specific date.
http://img.unt.se/webbtv/09Kalender/WithDate.html

Had in mind a variant with no visible playlist beside / below the image.

JW Player

User  
0 rated :


Your playlist is in the wrong order. The earliest date must be first.

Also, you have two *starttime=20091201000000*

And I'm not sure if this works with the v5 player. I tested it with the v4.7.707 player.

bc.. <?xmlversion="1.0"encoding="UTF-8"?>
<playlistxmlns="http://xspf.org/ns/0/"version="1">
<trackList>
<track>
<metarel="starttime">20091201000000</meta>
<title>UNTKALENDER</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091201Kalenderjingel.flv</location>
<description>Thisisaplacetohavesomeinformationaboutthevideo</description>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091201000000</meta>
<title>UNTKALENDER01</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091201Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091202000000</meta>
<title>UNTKALENDER02</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091202Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091203000000</meta>
<title>UNTKALENDER03</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091203Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091204000000</meta>
<title>UNTKALENDER04</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091204Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091205000000</meta>
<title>UNTKALENDER05</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091205Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091206000000</meta>
<title>UNTKALENDER06</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091206Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091207000000</meta>
<title>UNTKALENDER07</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091207Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091208000000</meta>
<title>UNTKALENDER08</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091208Kalender.flv</location>
<description>Thisisaplacetohavesomeinformationaboutthevideo</description>
<creator>UNTTV</creator>
</track>
</trackList>
</playlist>



JW Player

User  
0 rated :

Hobbs
The purpose with my playlist is that the first video "091201Kalenderjingel.flv" always shall start first, then the video with correct date.
It does not matter if the videos after corret date would be played as "&repeat=list"
I downloaded version 5 ( could not find 4.7). Have license for 4.3.

JW Player

User  
0 rated :

Im very grateful for your help! That it would be so complex, I could not imagine!!
I ran your files first, and what happened (with player 4.7 (thanks again) was that "091201Kalenderjingel.flv" was played twice and then did all files played regardless of date.
BTW, it seems that all files was played in the "09Kalender"-map. Now there is only the files that should be played.
I have changed to different design "09Kalender.html" file (is that OK? or are somewhat dependent on your design?).
Also changed "09Kalender.xml" so that the latest date should always come first. But all files are played without regard to date.
-------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>

<title>Simple Play On Schedule - JWMP v4.7.x - swfobject v2.2</title>
<!-- Always plays first track first, one time! -->

<script src="http://www.google.com/jsapi"></script>

<script>google.load('swfobject', '2.2');</script>

<script type="text/javascript">
var flashvars =
{
'file': '09Kalender.xml',
'playlist': 'none',
'playlistsize': '0',
'repeat': 'list',
'shuffle': 'false',
'stretching': 'none',
'skin': 'snel-2.swf',
'frontcolor': '86C29D', // text & icons (green)
'backcolor': '003367', // playlist background (blue)
'lightcolor': 'C286BA', // selected text/track highlight (maroon)
'screencolor': '000000', // screen background (black)
'id': 'playerID',
'autostart': 'true'
};

var params =
{
'allowfullscreen': 'true',
'allowscriptaccess': 'always',
'bgcolor': '#000000'
};

var attributes =
{
'name': 'playerID',
'id': 'playerID'
};

swfobject.embedSWF('http://img.unt.se/webbtv/09Kalender/Hobbs/player.swf', 'player', '468', '283', '9', false, flashvars, params, attributes);
</script>

<script type="text/javascript">
var player = null;
var playlist = null;
var firstPlay = true;


function playerReady(obj)
{
player = gid(obj.id);
addListeners();
};


function addListeners()
{
playlist = player.getPlaylist();

if(playlist.length > 0)
{
player.addControllerListener('ITEM', 'itemMonitor');
itemMonitor({index:0});
}
else
{
setTimeout("startTime();", 100);
}
};


function itemMonitor(obj)
{
if((obj.index > 0) && (firstPlay))
{
firstPlay = false;
startTime();
}
};


function startTime()
{
var currentDate = new Date();
var currentTime = ((currentDate.getMonth() < 10) ? '0' + (currentDate.getMonth() + 1) : (currentDate.getMonth() + 1)) + ((currentDate.getDate() < 10) ? '0' + currentDate.getDate() : currentDate.getDate()) + ((currentDate.getHours() < 10) ? '0' + currentDate.getHours() : currentDate.getHours()) + ((currentDate.getMinutes() < 10) ? '0' + currentDate.getMinutes() : currentDate.getMinutes()) + ((currentDate.getSeconds() < 10) ? '0' + currentDate.getSeconds() : currentDate.getSeconds());
currentTime = currentDate.getFullYear() + currentTime;

//alert('Current Time: ' + currentTime);

for(var j in playlist)
{

//alert(j + ':\n' + currentTime + '\n' + playlist[j].starttime);

if((1 * playlist[j]['starttime']) > currentTime)
{
player.sendEvent('ITEM', (j - 1));
gid('start').innerHTML = 'ITEM: ' + (j - 1) + ' START TIME: ' + playlist[j - 1]['starttime'] + ' CURRENT TIME: ' + currentTime;

//alert('Track: ' + (j - 1) + ' Start Time: ' + playlist[j - 1]['starttime']);

break;
}
}
};


function gid(name)
{
return document.getElementById(name);
};
</script>

</head>

<body>

<div id="playercontainer" class="playercontainer"><a id="player" class="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>
<!-- <div id="start" style="font-family:arial;">ITEM: START TIME: CURRENT TIME:</div> -->

</body>

</html>
---------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" version="1">
<trackList>
<track>
<meta rel="starttime">0</meta>
<title>UNT KALENDER</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091201Kalenderjingel.flv</location>
<description>This is a place to have some information about the video</description>
<creator>UNT TV</creator>
</track>
<track>
<meta rel="starttime">20091208000000</meta>
<title>UNT KALENDER 01</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091120julsmart.flv</location>
<creator>UNT TV</creator>
</track>
<track>
<meta rel="starttime">20091207000000</meta>
<title>UNT KALENDER 02</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091118jultvunget.flv</location>
<creator>UNT TV</creator>
</track>
<track>
<meta rel="starttime">20091206000000</meta>
<title>UNT KALENDER 03</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091115julljus.flv</location>
<creator>UNT TV</creator>
</track>
<track>
<meta rel="starttime">20091205000000</meta>
<title>UNT KALENDER 04</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091113julresa.flv</location>
<creator>UNT TV</creator>
</track>
</trackList>
</playlist>

JW Player

User  
0 rated :


Do you want the files to be played backwards?

Your playlist is in the order 08, 07, 06, 05.

Make your first track a number larger than 12...bc.. <meta rel="starttime">50000000000000</meta>



Replace this function:bc.. functionstartTime()
{
varcurrentDate=newDate();
varcurrentTime=((currentDate.getMonth()<10)?'0'+(currentDate.getMonth()+1):(currentDate.getMonth()+1))+((currentDate.getDate()<10)?'0'+currentDate.getDate():currentDate.getDate())+((currentDate.getHours()<10)?'0'+currentDate.getHours():currentDate.getHours())+((currentDate.getMinutes()<10)?'0'+currentDate.getMinutes():currentDate.getMinutes())+((currentDate.getSeconds()<10)?'0'+currentDate.getSeconds():currentDate.getSeconds());
currentTime=currentDate.getFullYear()+currentTime;

//alert('CurrentTime:'+currentTime);

for(varjinplaylist)
{

//alert(j+':\n'+currentTime+'\n'+playlist[j].starttime);

if((1*playlist[j]['starttime'])<currentTime)
{
player.sendEvent('ITEM',(j));
gid('start').innerHTML='ITEM:'+(j)+'STARTTIME:'+playlist[j]['starttime']+'CURRENTTIME:'+currentTime;

//alert('Track:'+(j-1)+'StartTime:'+playlist[j-1]['starttime']);

break;
}
}
};




Should:

1) play the first track,

2) find today's date and play it,

3) continue playing through the rest of your playlist.

JW Player

User  
0 rated :

> Do you want the files to be played backwards?
No, just that the latest video/date starts first.
Unfortunately, all the videos are played despite the date.

> Make your first track a number larger than 12 ...
Yes! "091201Kalenderjingel.flv" is now played only once.

http://img.unt.se/webbtv/09Kalender/Hobbs/09Kalender.html

JW Player

User  
0 rated :

Hi lefty !
thank u for ur code.

kindly set up my problem:-

i copied ur code and executed ..
first video is working properly(playing and displaying). But from the second one,
video is playing but not displaying in the player.


can anyone plz help me soon..

Thank u.

JW Player

User  
0 rated :

bc.. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<htmllang="en">

<head>

<title>SimplePlayOnSchedule-JWMPv4.4.x-swfobjectv2.2</title>

<scripttype="text/javascript"src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>

<scripttype="text/javascript">
varflashvars=
{
'file':'playlist_domenico.xml',
'playlist':'right',
'playlistsize':'400',
'repeat':'none',
'shuffle':'false',
'stretching':'none',
'skin':'bright',
'frontcolor':'86C29D',//text&icons(green)
'backcolor':'003367',//playlistbackground(blue)
'lightcolor':'C286BA',//selectedtext/trackhighlight(red)
'screencolor':'000000',//screenbackground(white)
'id':'playerId1',
'autostart':'false'
};

varparams=
{
'allowfullscreen':'true',
'allowscriptaccess':'always',
'bgcolor':'#000000'
};

varattributes=
{
'name':'playerId1',
'id':'playerId1'
};

swfobject.embedSWF('player-4.4.189.swf','player1','900','327','9.0.124',false,flashvars,params,attributes);
</script>

<scripttype="text/javascript">
varplayer=null;
varplaylist=null;


functionplayerReady(obj)
{
player=gid(obj.id);
startTime();
};


functionstartTime()
{
playlist=player.getPlaylist();

if((playlist!==null)&&(playlist!==undefined))
{
varcurrentTime=newDate();
varhours=currentTime.getHours();

for(varjinplaylist)
{
//alert(hours+':'+playlist[j].starttime);
if(playlist[j].starttime>hours)
{
player.sendEvent('ITEM',(j-1));
gid('start').innerHTML='STARTTIME:'+playlist[j-1].starttime+'   CURRENTTIME:'+hours+'   ITEM:'+(j-1);
break;
}
}
}
else
{
setTimeout("startTime();",50);
}
};


functiongid(name)
{
returndocument.getElementById(name);
};
</script>

</head>

<body>

<divid="playercontainer1"class="playercontainer"><aid="player1"class="player1"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheAdobeFlashPlayertoseethisvideo.</a></div>
<divid="start"style="font-family:arial;">STARTTIME:     CURRENTTIME:     ITEM:</div>

</body>

</html>



bc.. <?xmlversion="1.0"encoding="UTF-8"?>
<playlistversion="1"xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<creator>RetroBus</creator>
<title>retrobus</title>
<location>/Movies/video1.flv</location>
<metarel='starttime'>0</meta>
</track>
<track>
<creator>LipoPropulsion</creator>
<title>liposmall</title>
<location>/Movies/video2.flv</location>
<metarel='starttime'>4</meta>
</track>
<track>
<creator>RetroBus</creator>
<title>retrobus</title>
<location>/Movies/video3.flv</location>
<metarel='starttime'>8</meta>
</track>
<track>
<creator>LipoPropulsion</creator>
<title>liposmall</title>
<location>/Movies/video4.flv</location>
<metarel='starttime'>12</meta>
</track>
<track>
<creator>RetroBus</creator>
<title>retrobus</title>
<location>/Movies/video5.flv</location>
<metarel='starttime'>16</meta>
</track>
<track>
<creator>LipoPropulsion</creator>
<title>liposmall</title>
<location>/Movies/video.flv</location>
<metarel='starttime'>20</meta>
</track>
<track>
<creator>LipoPropulsion</creator>
<title>liposmall</title>
<location>/Movies/video.flv</location>
<metarel='starttime'>24</meta>
</track>
</trackList>
</playlist>



JW Player

User  
0 rated :

Works for me: *http://willswonders.myip.org:8082/Simple_PlayOnSchedule.html*

JW Player

User  
0 rated :

bc.. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<htmllang="en">

<head>

<title>SimplePlayOnSchedule-JWMPv4.7.x-swfobjectv2.2</title>
<!-- Always plays first track first, one time! -->

<scriptsrc="http://www.google.com/jsapi"></script>

<script>google.load('swfobject','2.2');</script>

<scripttype="text/javascript">
varflashvars=
{
'file':'09Kalender.xml',
'playlist':'right',
'playlistsize':'400',
'repeat':'list',
'shuffle':'false',
'stretching':'none',
'skin':'snel-2.swf',
'frontcolor':'86C29D',//text&icons(green)
'backcolor':'003367',//playlistbackground(blue)
'lightcolor':'C286BA',//selectedtext/trackhighlight(maroon)
'screencolor':'000000',//screenbackground(black)
'id':'playerID',
'autostart':'false'
};

varparams=
{
'allowfullscreen':'true',
'allowscriptaccess':'always',
'bgcolor':'#000000'
};

varattributes=
{
'name':'playerID',
'id':'playerID'
};

swfobject.embedSWF('player-4.7.707.swf','player','900','327','9.0.124',false,flashvars,params,attributes);
</script>

<scripttype="text/javascript">
varplayer=null;
varplaylist=null;
varfirstPlay=true;


functionplayerReady(obj)
{
player=gid(obj.id);
addListeners();
};


functionaddListeners()
{
playlist=player.getPlaylist();

if(playlist.length>0)
{
player.addControllerListener('ITEM','itemMonitor');
itemMonitor({index:0});
}
else
{
setTimeout("startTime();",100);
}
};


functionitemMonitor(obj)
{
if((obj.index>0)&&(firstPlay))
{
firstPlay=false;
startTime();
}
};


functionstartTime()
{
varcurrentDate=newDate();
varcurrentTime=((currentDate.getMonth()<10)?'0'+(currentDate.getMonth()+1):(currentDate.getMonth()+1))+((currentDate.getDate()<10)?'0'+currentDate.getDate():currentDate.getDate())+((currentDate.getHours()<10)?'0'+currentDate.getHours():currentDate.getHours())+((currentDate.getMinutes()<10)?'0'+currentDate.getMinutes():currentDate.getMinutes())+((currentDate.getSeconds()<10)?'0'+currentDate.getSeconds():currentDate.getSeconds());
currentTime=currentDate.getFullYear()+currentTime;

//alert('CurrentTime:'+currentTime);

for(varjinplaylist)
{

//alert(j+':\n'+currentTime+'\n'+playlist[j].starttime);

if((1*playlist[j]['starttime'])>currentTime)
{
player.sendEvent('ITEM',(j-1));
gid('start').innerHTML='ITEM:'+(j-1)+'STARTTIME:'+playlist[j-1]['starttime']+'CURRENTTIME:'+currentTime;

//alert('Track:'+(j-1)+'StartTime:'+playlist[j-1]['starttime']);

break;
}
}
};


functiongid(name)
{
returndocument.getElementById(name);
};
</script>

</head>

<body>

<divid="playercontainer"class="playercontainer"><aid="player"class="player"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheAdobeFlashPlayertoseethisvideo.</a></div>
<divid="start"style="font-family:arial;">ITEM:STARTTIME:CURRENTTIME:</div>

</body>

</html>



bc.. <?xmlversion="1.0"encoding="UTF-8"?>
<playlistxmlns="http://xspf.org/ns/0/"version="1">
<trackList>
<track>
<metarel="starttime">0</meta>
<title>UNTKALENDER</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091201Kalenderjingel.flv</location>
<description>Thisisaplacetohavesomeinformationaboutthevideo</description>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091201000000</meta>
<title>UNTKALENDER01</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091201Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091202000000</meta>
<title>UNTKALENDER02</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091202Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091203000000</meta>
<title>UNTKALENDER03</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091203Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091204000000</meta>
<title>UNTKALENDER04</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091204Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091205000000</meta>
<title>UNTKALENDER05</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091205Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091206000000</meta>
<title>UNTKALENDER06</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091206Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091207000000</meta>
<title>UNTKALENDER07</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091207Kalender.flv</location>
<creator>UNTTV</creator>
</track>
<track>
<metarel="starttime">20091208000000</meta>
<title>UNTKALENDER08</title>
<location>http://qstream-down.qbrick.com/04823/09Kalender/091208Kalender.flv</location>
<description>Thisisaplacetohavesomeinformationaboutthevideo</description>
<creator>UNTTV</creator>
</track>
</trackList>
</playlist>




v4.7.707 player: *http://developer.longtailvideo.com/trac/log/trunk/as3/player.swf*

Click on the release that you want in the *Rev* column.

JW Player

User  
0 rated :

Does this work with the HTML5 player? And if so, is there any specific configuration to make it work? All my files are hosted on bitsontherun and I need to make this work with that. So as to really create a feel of a linear TV experience. Anyone, please help.

Ethan Feldman

JW Player Support Agent  
0 rated :

@Martin – Start times only work with streaming, which is not supported by HTML5’s <video> tag.

JW Player

User  
0 rated :

Hi all,

First, wondering what it would take to have a video not just play at the right date or time, but also to start into the video depending on what time of day (hour-minute) a visitor enters the site (the full illusion of television like broadcast in a pseudo streaming situation).

I noticed Ethan suggested start times do not work for html 5... but perhaps for non-html 5 versions, start times could be used to help in this regard.

It seems that the above 09kalender approach [ http://img.unt.se/webbtv/09Kalender/Hobbs/09Kalender.html
] as well as the http://www.videosdelen.nl/flvplayer/index3.html example are the best "start at a given date/time" examples still up and running, though both have xml pages with timelines that are now outdated.

Could these or other examples be used to go a step furhter and to show how at 10am, the start of a video might show, whereas someone first visiting the site at 10:15 am would see the video start 15 minutes in, and at 11:00am a new visotor would see a new video would start, and at 11:15am show 15 minutes in, etc. etc.

I am happy to use the code in the examples above as a base, though it would be really cool to have the example populated with a player and videos that do not have the sandbox or similar security issues in the way, thus allowing us all to quickly experiment with the examples and changing players and videos later.

I look forward to any input, and of course, if there is anything I should clarify, just let me know, I am new at this!

Thanks,
Kwinn

JW Player

User  
0 rated :

Hi All,
As a follow up, here is some code I was working with (taken from 09kalendar example http://img.unt.se/webbtv/09Kalender/Hobbs/09Kalender.html
), but it is not working on my site at all.

First, I loaded JW player on and it plays the test video fine (lady showing and dropping signs). So I know the JW Player works.

Second, I uploaded the 09kalender videos onto my site (two of them anyway).

Then I made my index site the following (see below), adjusting the player address, etc. (the videos are loaded into the same folder, so they should work I assume).

Then I loaded the xml file in (see below). I trimmed it to two videos for convenience.

But the page does not load well (a step five playlist is not accessed error#1088 usually).

This solution does work on the UNTV / 09Kalender site listed above, but not on my site. I assume there are some changes (or lack of changes) on my html I am missing, but not sure. I do know the dates are off... but they work this way (at least videos play) on the existing site, so I left them that way until I at least get videos to play. Any help on this?


----------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>
<object> <script type='text/javascript' src='swfobject.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
var so = new SWFObject('player.swf','ply','470','320','9','#000000');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://content.longtailvideo.com/videos/flvplayer.flv');
so.write('mediaspace');
</script></object>

<title>Simple Play On Schedule - JWMP v4.7.x - swfobject v2.2</title>
<!-- Always plays first track first, one time! -->

<script src="http://www.google.com/jsapi"></script>

<script>google.load('swfobject', '2.2');</script>

<script type="text/javascript">
var flashvars =
{
'file': '09kalender.xml',
'playlist': 'none',
'playlistsize': '0',
'repeat': 'list',
'shuffle': 'false',
'stretching': 'none',
'skin': 'snel-2.swf',
'frontcolor': '86C29D', // text & icons (green)
'backcolor': '003367', // playlist background (blue)
'lightcolor': 'C286BA', // selected text/track highlight (maroon)
'screencolor': '000000', // screen background (black)
'id': 'playerID',
'autostart': 'true'
};

var params =
{
'allowfullscreen': 'true',
'allowscriptaccess': 'always',
'bgcolor': '#000000'
};

var attributes =
{
'name': 'playerID',
'id': 'playerID'
};

swfobject.embedSWF('player.swf', 'player', '468', '283', '9', false, flashvars, params, attributes);
</script>

<script type="text/javascript">
var player = null;
var playlist = null;
var firstPlay = true;


function playerReady(obj)
{
player = gid(obj.id);
addListeners();
};


function addListeners()
{
playlist = player.getPlaylist();

if(playlist.length > 0)
{
player.addControllerListener('ITEM', 'itemMonitor');
itemMonitor({index:0});
}
else
{
setTimeout("startTime();", 100);
}
};


function itemMonitor(obj)
{
if((obj.index > 0) && (firstPlay))
{
firstPlay = false;
startTime();
}
};


function startTime()
{
var currentDate = new Date();
var currentTime = ((currentDate.getMonth() < 10) ? '0' + (currentDate.getMonth() + 1) : (currentDate.getMonth() + 1)) + ((currentDate.getDate() < 10) ? '0' + currentDate.getDate() : currentDate.getDate()) + ((currentDate.getHours() < 10) ? '0' + currentDate.getHours() : currentDate.getHours()) + ((currentDate.getMinutes() < 10) ? '0' + currentDate.getMinutes() : currentDate.getMinutes()) + ((currentDate.getSeconds() < 10) ? '0' + currentDate.getSeconds() : currentDate.getSeconds());
currentTime = currentDate.getFullYear() + currentTime;

//alert('Current Time: ' + currentTime);

for(var j in playlist)
{

//alert(j + ':\n' + currentTime + '\n' + playlist[j].starttime);

if((1 * playlist[j]['starttime']) < currentTime)
{
player.sendEvent('ITEM', (j));
gid('start').innerHTML = 'ITEM: ' + (j) + ' START TIME: ' + playlist[j]['starttime'] + ' CURRENT TIME: ' + currentTime;

//alert('Track: ' + (j - 1) + ' Start Time: ' + playlist[j - 1]['starttime']);

break;
}
}
};


</script>

</head>

<body>

<div id="playercontainer" class="playercontainer"><a id="player" class="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>
<!-- <div id="start" style="font-family:arial;">ITEM: START TIME: CURRENT TIME:</div> -->

</body>

</html>
-------------------------------------------------




<?xml version="1.0" encoding="UTF-8" ?>
- <playlist xmlns="http://xspf.org/ns/0/" version="1">
- <trackList>
- <track>
<meta rel="starttime">50000000000000</meta>
<title>UNT KALENDER</title>
<location>091201Kalenderjingel.flv</location>
<description>This is a place to have some information about the video</description>
<creator>UNT TV</creator>
</track>
- <track>
<meta rel="starttime">20091208000000</meta>
<title>UNT KALENDER 01</title>
<location>091120julsmart.flv</location>
<creator>UNT TV</creator>
</track>
</trackList>
</playlist>

JW Player

User  
0 rated :

Hi Zach,
No problem at all. The above topics in this thread seemed to match, but I am very happy to shift it to the Java section. Thank you for taking a look!
Sincerely,
Kwinn

Below is the link to the new thread in case anyone is interested.
http://www.longtailvideo.com/support/forums/jw-player/javascript-interaction/14304/seeking-fully-schedulable-playlist-that-also-has-a-time-based-start-point-for-the-videos-ymdhm-start-time

JW Player

User  
0 rated :

Hi, I successfully embed the video using the [jwplayer config = "myplayer" file = "http://www.mywebsite.com/myvideo.flv"]

Please tell me where you want to paste the script above in the JW Player Plugin for Wordpress record to start playing at a specified time?

Ethan Feldman

JW Player Support Agent  
0 rated :

[jwplayer config = “myplayer” file = “http://www.mywebsite.com/myvideo.flv” start= “value”]

Note, you need to use streaming to use the start flashvar…

JW Player

User  
0 rated :

Hi Ethan

It seems that Google translator does not exactly told the meaning of my post.

Help me please.
I prepared flv files (encoded into ffmpeg, prescribed metadnnye and made ??playlist). Now I want to lose these files as follows:
File 1 at 13.00,
file 2 in 14.30,
file 3 in 15.05.

How do I implement it?

Script in this thread above, I have not worked.

Ethan Feldman

JW Player Support Agent  
0 rated :

You need to do this with a playlist.

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/24/creating-a-playlist

JW Player

User  
0 rated :

Hi Ethan

I took as an example of a script from this topic

bc.. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">


<head>


<title>Play On Schedule</title>


<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js">
</script>


<script type="text/javascript">
var flashvars = { file:'http://metaportal.tv/proba2/pl_Latex_y.xml', 'repeat':'list', 'provider':'http', 'http.startparam':'starttime', 'start':'38756224' };

var params = { allowfullscreen:'true', allowscriptaccess:'always' };
var attributes = { id:'player1', name:'player1' };

swfobject.embedSWF('player.swf','container1','480','270','9.0.115','false',
flashvars, params, attributes);
</script>

<script type="text/javascript">
var player = null;
var playlist = null;


function playerReady(obj)
{
player = gid(obj.id);
startTime();
};


function startTime()
{
playlist = player.getPlaylist();


if((playlist !== null) && (playlist !== undefined))
{
var currentTime = new Date();
var hoursminutes = currentTime.getHours() + '.' + currentTime.getMinutes();

for(var j in playlist)
{
//alert(hoursminutes + ' : ' + playlist[j].starttime);
if(playlist[j].starttime > hoursminutes)
{
player.sendEvent('ITEM', (j - 1));
gid('start').innerHTML = 'START TIME: ' + playlist[j - 1].starttime + ' CURRENT TIME: ' + hoursminutes + ' ITEM: ' + (j -1);
break;
}
}
}
else
{
setTimeout("startTime();", 50);
}
};


function gid(name)
{
return document.getElementById(name);
};
</script>


</head>


<body>


<p id="container1">Please install the Flash Plugin</p>
<p></p>
<div id="start" style="font-family:arial;">????? ???? ????? ???-?? ????????</div>


</body>


</html>



hooked up the xml file

bc.. <?xml version='1.0' encoding='UTF-8'?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<creator>Alex</creator>
<title>Clip1</title>
<location>http://metaportal.tv/proba/t001.png</location>
<duration>00:00:60</duration>
<meta rel="starttime">22.25</meta>
</track>
<track>
<creator>Alex</creator>
<title>Clip2</title>
<location>http://metaportal.tv/proba/Lateks_y.flv</location>
<duration>00:05:00</duration>
<meta rel="starttime">22.26</meta>
</track>
<track>
<creator>Alex</creator>
<title>Clip3</title>
<location>http://metaportal.tv/proba/t002.png</location>
<duration>00:10:00</duration>
<meta rel="starttime">21.31</meta>
</track>
</trackList>
</playlist>



but the file does not start at a specified time

where did I go wrong?

http://metaportal.tv/proba2/index.html

JW Player

User  
0 rated :

Do I understand correctly that if the start time specified for example 12.00, a user who visited the site at 12.05 should not see a movie from the beginning? I've also played all the time playlist from the beginning ...

Ethan Feldman

JW Player Support Agent  
0 rated :

Are you using streaming? The start flashvar only works with streaming.

JW Player

User  
0 rated :

I do so

bc.. var flashvars = { file:'http://metaportal.tv/proba2/pl_Latex_y.xml', 'repeat':'list', 'provider':'http', 'http.startparam':'starttime', 'start':'38756224' };



can not that enough?

Ethan Feldman

JW Player Support Agent  
0 rated :

That should be, please note, that you don’t need start in the flashvars, and it should be start in your playlist xml, not starttime

JW Player

User  
0 rated :

Explain, please, I do not understand...

Ethan Feldman

JW Player Support Agent  
0 rated :

Remove start from your flashvars.

In your XML change starttime to start.

JW Player

User  
0 rated :

removed the option "start"

bc.. var flashvars = { file:'http://metaportal.tv/proba2/pl_Latex_y.xml', 'repeat':'list', 'provider':'http', 'http.startparam':'starttime' };



parameter "starttime" replaced the "start"

bc.. <?xml version='1.0' encoding='UTF-8'?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<creator>Alex</creator>
<title>Clip1</title>
<location>http://metaportal.tv/proba/t001.png</location>
<duration>00:00:60</duration>
<meta rel="start">01.20</meta>
</track>
<track>
<creator>Alex</creator>
<title>Clip2</title>
<location>http://metaportal.tv/proba/Lateks_y.flv</location>
<duration>00:05:00</duration>
<meta rel="start">01.21</meta>
</track>
<track>
<creator>Alex</creator>
<title>Clip3</title>
<location>http://metaportal.tv/proba/t002.png</location>
<duration>00:10:00</duration>
<meta rel="start">01.31</meta>
</track>
</trackList>
</playlist>



...just stopped working... : (

JW Player

User  
0 rated :


You don't seem to have a functioning pseudostreaming server.

Either of these requests return the full FLV file of 37MB.
*
http://metaportal.tv/proba/Lateks_y.flv?start=10000000

http://metaportal.tv/proba/Lateks_y.flv?starttime=10000000
*

Have you installed and correctly configured some kind of FLV streaming module on your Apache server?

JW Player

User  
0 rated :

Hi tweedledum

you're a little wrong address

not

http://metaportal.tv/proba

must

http://metaportal.tv/proba2

JW Player

User  
0 rated :

Yes, you're probably right, and psevdostriming does not really work ...

Ethan Feldman

JW Player Support Agent  
0 rated :

That would be it…

JW Player

User  
0 rated :

well, i'm trying your codes, but videos always start from 1st to the latest also changing starttimes value.

I try to explain what i think the perfect webtv's code:
- a "really working" starting time +

- selectable "loop on file" (until next starting time)
so if i want to show a movie (length 50min.) from 20:00 till the end, and next movie must start at 21:00 i could like to add a short movie (a sort of 10 secs animated "logo") that start at the end of the movie and go on (in a loop) until next starting time (21:00) arrives,
Example
...
<track>
<file>movie1.mp4</file>
<starttime>20:00</starttime>
<loopuntilnext>no</loopuntilnext>
</track>
<track>
<file>TvLogo.mp4</file> (a few seconds movie)
<starttime>20:50</starttime>
<loopuntilnext>yes</loopuntilnext>
</track>
<track>
<file>movie2.mp4</file>
<starttime>21:00</starttime>
<loopuntilnext>no</loopuntilnext>
</track>
....

- 2nd wish: youtube has a #t variable that starts movie in a exact point of a movie; should be nice to have a similar variable in our playlists, from the difference between programmed startTime and actualTime (so going in the same point of movie that other users are watching)
Example: i come in at 20:12 while programmed starting time was at 20:00. i should be able to watch the movie from the 12th minute (and NOT from the beginning NOR directly to the next programmed movie)

is it possible to create them or is this only a dream?

Ethan Feldman

JW Player Support Agent  
0 rated :

Can I see where you are running this?

What is “loopuntilnext” ? That is not a valid JW layer variable…

JW Player

User  
0 rated :

Hello I read all the posts but I can not make it work ...
I want to start the video schedule. You can post the complete code to insert? also to the playlist

JW Player

User  
0 rated :

possibilmente se c' qualche italiano che ha gia testato il codice e vuole postarlo :)

Ethan Feldman

JW Player Support Agent  
0 rated :

I Don’t understand what you are asking…

JW Player

User  
0 rated :

correct script to play video at set time

Ethan Feldman

JW Player Support Agent  
0 rated :

That doesn’t help clarify, sorry.

This question has received the maximum number of answers.