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

How do i make JW Player function like a TV Station?


Hi, i want to utilise the player the same way as it is done here

http://www.thewordnetwork.org/watch-twn

Where, a video plays at a particular time. I understand how to make and embed a playlist. But instead of the playlist playing from the begining for every visitor, i want the videos to play one video at a particular time. The same way that someone can watch the news at 2000hrs, is the same way i want to use the player. The link above has a great description, incase i did not use correct terminology

11 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

How about like this?

http://support.jwplayer.com/customer/portal/articles/1436942

jwplatform+mqKcpNy2

User  
0 rated :

Let me take a look at this. Im not a developer, but i think i can try

jwplatform+mqKcpNy2

User  
0 rated :

Saw it, not a lot of things i understand. Are they any JW plans, or people that can be paid to do this for me?

Ethan Feldman

JW Player Support Agent  
0 rated :

I mean, does the example do what you want to do? We don’t really do paid work though, sorry.

jwplatform+mqKcpNy2

User  
0 rated :

Hi, yes, the example seems to do what i want, as it makes the playlist appear like live TV, and hence, each video in the playlist can be programmed to play at a particular time.

So, where do i add this timecode? I got a local developer, but he has had trouble finding out where he should place the timecodes, so as to manipulate the videos to play at a particular time/.

Ethan Feldman

JW Player Support Agent  
0 rated :

The code is in the source:

<script src="http://p.jwpcdn.com/6/9/jwplayer.js"></script><script type="text/javascript"> jwplayer("container").setup({ playlist: "http://content.jwplatform.com/feeds/DrqpQIzP.rss", controls: "false" }); jwplayer().onDisplayClick(function() { jwplayer().pause(); }); jwplayer().onReady(function() { var seconds = new Date().getMinutes()*60 + new Date().getSeconds(); var playlist = this.getPlaylist(); var offset = 0; for (var index=0; index < playlist.length; index++) { var duration = Math.round(playlist[index]['duration']); if(offset + duration > seconds) { this.playlistItem(index); this.seek(seconds-offset); break; } else { offset += duration; } } }); </script>

jwplatform+mqKcpNy2

User  
0 rated :

Hi Ethan, i created a playlist, and named it Internet TV, when i want to emdedd the playlist, i am only getting one code.

<script type="text/javascript" src="http://content.jwplatform.com/players/1R2BrKvx-5O0gi1YS.js"></script>

Only.....

Whereas before i was getting two codes

This one to put in the head section

script src="http://jwpsrv.com/library/C7IBYPZLEeOs1iIACtqXBA.js"></script>

And this one to place where i want the video to appear

<div id='playerDhmAaziXgMZl'></div>
<script type='text/javascript'>
jwplayer('playerDhmAaziXgMZl').setup({
file: 'http://tv.graciousannointing.org.zw/TACGRACTV.MP4',
image: 'http://tv.graciousannointing.org.zw/IMG_18524333323228.jpeg',
title: 'Gracious Annointing Ministries Online TV',
width: '100%',
aspectratio: '16:9',
autostart: 'true',
repeat: 'true'
});
</script>

Now, i just got that one code i mentioned. And im not sure, should i put this code where the video appears, or in the head section. And secondly, that code that you said is in the source, where do i put it, in the head, on in the body where i want it appear?? And these var that control time, where do they go, in the header, or in the body

And how come the embedd playlist is only giving me one code, and not specifying which one is for the head, and which one for the body

jwplatform+mqKcpNy2

User  
0 rated :

Hi, so i placed the embedd code in the body section, and it says could not load player configuration. Which means there is some code for the header which i am not getting. I assume

jwplatform+mqKcpNy2

User  
0 rated :

If possible show me where i can see the example in the configuration reference. Or try and show me how to do it on the code for this playlist. As well as the other questions i asked.

jwplatform+mqKcpNy2

User  
0 rated :

So eventually i went onto the page with your example, which says how to mimick live tv, and i right clicked to views source, then copied the entire html code there and placed it in notepad ++ to view how the video playing there is configured, and i searched for 'seconds' var until i found the div which contains code for the video on that website, which is the one i copied here

<div>&nbsp;</div>
<script type="text/javascript">
jwplayer("container").setup({
playlist: "http://content.jwplatform.com/feeds/DrqpQIzP.rss",
controls: "false"
});
jwplayer().onDisplayClick(function() {
jwplayer().pause();
});
jwplayer().onReady(function() {
var seconds = new Date().getMinutes()*60 + new Date().getSeconds();
var playlist = this.getPlaylist();
var offset = 0;

for (var index=0; index < playlist.length; index++) {
var duration = Math.round(playlist[index]['duration']);
if(offset + duration > seconds) {
this.playlistItem(index);
this.seek(seconds-offset);
break;
} else {
offset += duration;
}
}
});
</script>

I have been through my playlist more than 5 times now, and can't seem to figure out how to produce this source code. If you check my earlier comments you will realise i mentioned something about the video not loading when i say embedd code, and that when i do that i only get one script code and no div code.

I noticed your example source code has rss stuff in it, tried to publish using that, and still can't get anything in. Its been almost a month since i paid for the service, and im worried with time running out, i may not be able to do what is needed here and that will present a challenge as i cant keep paying for the service when im struggling to use it

If possible, plase give me assistance in detail, on what to do., The playlist was created and name Internet TV, and if you can tell me what i need to do to embedd it, and where i can add the editions to the seconds var to get it to mimick live TV, as well as what i can add if i want the playlist to start playing at 0600GMT for example.

jwplatform+mqKcpNy2

User  
0 rated :

Sorry to bother, but i have since figured how to embedd the video. And its working well now. You can view it on http://tv.graciousannointing.org.zw

I did this by embedding this code into the place where i want the video to appear.

<script type="text/javascript" src="http://content.jwplatform.com/players/1R2BrKvx-5O0gi1YS.js"></script>

Now the million dollar question, where do i add the code that determines the time the playlist should load. And what do i write say i want the playlist to load from 0600hrs, and play one video after the other until done.

This question has received the maximum number of answers.