Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8114481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:09:31+00:00 2026-06-06T03:09:31+00:00

I want to use a javascript countdown function similar to this http://jsfiddle.net/Apnu2/6/ when a

  • 0

I want to use a javascript countdown function similar to this http://jsfiddle.net/Apnu2/6/
when a ‘title’ element in my xml file has a value of ‘R15’, ‘R30’, ‘R45’, or ‘R60’. The numeric value after the letter ‘R’ is the countdown time I want to pass the javascript function.

Here is a sample layout. The first element will play a video. The second element should call the javascript function mentioned above, and the third element is another video that should play after the countdown javascript functions reaches zero.

<?xml version="1.0"?>
<rss xmlns:media="http://search.yahoo.com/mrss/"xmlns:jwplayer="http://developer.longtailvideo.com/trac/" version="2.0">
<Channel>
  <Title>MRSS Playlist Playlist</Title>
    <item>
      <title>04:48</title>
      <media:content url="videos/Set1_mid.flv"></media:content>
      <media:thumbnail url="thumbs/set1_mid.jpg"></media:thumbnail>
      <description>5 minute cardio with handweights</description>
      <jwplayer:duration>288</jwplayer:duration>
      <jwplayer:start>0</jwplayer:start>
    </item>
    <item>
      <title>R15</title>
      <media:content url="nothing"></media:content>
      <media:thumbnail url="nothing"></media:thumbnail>
      <description>rest option</description>
      <jwplayer:duration>15</jwplayer:duration>
      <jwplayer:start>0</jwplayer:start>
    </item>
    <item>
      <title>01:20</title>
      <media:content url="http://youtu.be/WG2N0WKmquE"></media:content>
      <media:thumbnail url="http://img.youtube.com/vi/WG2N0WKmquE/3.jpg"></media:thumbnail>
      <description>harder than what it looks</description>
      <jwplayer:duration>580</jwplayer:duration>
      <jwplayer:start>500</jwplayer:start>
    </item>
</Channel>
</rss>

Right now my playlist just plays one video after the next, which is good; but I’m having trouble listening for the title value mentioned above, running the javascript code, then returning back to the next element in the playlist when the javascript function is complete.

Please let me know if my questions doesn’t make sense. I’d be glad to clarify and post additional code I’m using if need be.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:09:33+00:00Added an answer on June 6, 2026 at 3:09 am

    Here is the code:

    onPlaylistItem: function(event){
    
                               var getMessage = jwplayer("container").getPlaylistItem().message;
    
                               if (getMessage.substr(0,1)=="R"){
    
    
                                   $("#bottomtimer").hide();
                                   $("#bottomRestTimer").show();
                                   var restTime = getMessage.substr(1,2);
                                   var minutes = 0;
                                   var time = minutes*60 + restTime;
    
    
                                   var interval = setInterval(function(){
    
                                       if (time == 0 ){
    
                                       clearInterval(interval);                                       
                                       $("#bottomRestTimer").hide("slow");
                                       //$("#bottomtimer").show("slow");
                                       $("#bottomtimer").fadeIn(5000);
    
                                       jwplayer().playlistNext();
    
    
                                       }
                                       var minutes = (Math.floor(time/60 ));
                                       //this code add a zero like 01:15 which I like but I need to add
                                       //the same logic to the routine countdown
                                       //if (minutes < 10) minutes = "0" + minutes;
                                       var seconds = time % 60;
                                       if (seconds < 10) seconds = "0" + seconds;
                                       var text = minutes + ":" + seconds;
    
                                      document.getElementById('resttimer').innerHTML = text;
    
                                      time--;
    
                                   }, 1000);
    
    
                               } else {
                                   document.getElementById('topstatus').innerHTML = getMessage; 
    
                               }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use javascript / jquery to determine if an xml file exists.
I want to use Javascript Alert function in my ASP.NET page. For example like
I was creating a countdown timer using javascript; I can use jQuery. I want
I have an HTML file and I want to use javascript to call a
I want to use a JavaScript file, lying in the root folder. How can
I want to use javascript to create a textfile, so I used : This
i want to use js this function: i have a string[] s={11111,2222,33333,...} how to
I want to use javascript to display a hidden element on click, in each
I want to use JavaScript to make a simple http get. I used jQuery
I have a string like this /folder1/folder2/folder3/IMG_123456_PP.jpg I want to use JavaScript / jQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.