By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript jw player stops after a couple hours


Active Coder
Their forum hasn't been active for yeears, i'm hoping y'all can help.
My "Dashradio" music player, thanks to you, is working beautifully: The DashRadio page
After a couple hours, it just stops. Last time on "Dindi," I mention because I believe the LAST time it was also on Dindi. There is no code error or XML error according to w3c. This has worked fine for 15 years, but probably has always had the glitch. wanted 8 hours, I get about 2. If anyone has ideas, I'd love to hear 'em. Is this a system issue or am I missing something? Here are the relevant pieces, I'll post the whole thing if you think it matters, but I don't think it is...

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<title>DashRadio - The Soundsmith Channel</title>

<media:content url="https://www.davidkempton.com/wp-content/uploads/01-Beach-Girls.mp3" />
<media:thumbnail url="https://www.davidkempton.com/pix/esp4web.gif" />
<title>Beach Girls</title>
<description>Especially For Groovers</description>

<media:content url="https://www.davidkempton.com/wp-content/uploads/02.Laura_.mp3" />
<media:thumbnail url="https://www.davidkempton.com/pix/esp1icn.gif" />
<description>Especially For You</description>

<media:content url="https://www.davidkempton.com/wp-content/uploads/03.Dindi.mp3" />
<media:thumbnail url="https://www.davidkempton.com/pix/esp1icn.gif" />
<description>Especially For You</description>

<media:content url="https://www.davidkempton.com/wp-content/uploads/04.Arthurs_Theme.mp3" />
<media:thumbnail url="https://www.davidkempton.com/pix/esp1icn.gif" />
<title>Arthur's Theme</title>
<description>Especially For You</description>


Here are what appears to be the relevant pieces of code, thrown in together. I can post the whole thing, but doubt it will help:

    div#cas {
            background: url(https://www.davidkempton.com/wp-content/uploads/carradio.gif);
            position: absolute;
            margin-left: -190px;
            margin-top: 38px;
            background-repeat: no-repeat;
            width: 920px;
            height: 370px;
<!-- location of the display --> 
    #radio {
            position: absolute;
            margin-left: 200px;
            margin-top: 65px;
            height: 113px;
            width: 537px;
            z-index: -100;

    function deCod(linkStr) {
        var str = linkStr;
        return str;

<!-- used when changing playlists and new list items --> 
    function swapAlbum() {
            var newProj = jwplayer(radio).getPlaylistItem().description;
            if (newProj == thisProj) {
            } else {
                    thisProj = newProj;

<!-- generate the player and load XML playlist --> 
    function createPlayer() {
                    playlistfile: 'https://www.davidkempton.com/xml/radioall.xml',
                    "playlist.position": "top",
                    "playlist.size": 113,
                    skin: 'https://https://www.davidkempton.com/wp-content/uploads/car2.xml',
                    shuffle: "true",
                    autostart: "true",
                    controlbar: "bottom",
                    height: 113,
                    width: 537,
                    volume: 66,
                    "logo.file": "https://www.davidkempton.com/wp-content/uploads/dashhd80.gif",
                    "logo.position": "bottom-right",
                    "logo.margin": "3",
                    "logo.out": "0.77",
                    repeat: 'always',
                    events: {
                            onPlaylistItem: function(event) {

  <body  onload="createPlayer()">

<!-- main controls --> 
        <li><a id="btn3" class="button3" title="Play" onclick="jwplayer(radio).play('true');">Play</a></li>
        <li><a id="btn4" class="button3" title="Pause" onclick="jwplayer(radio).play('false');">Pause</a></li>
        <li><a id="btn5" class="button3" title="New Song" onclick="jwplayer(radio).playlistNext();">New</a></li>


Thanks for your help.
I think I found the problem. Apparently WordPress stripped apostrophes from the mp3 filenames, but the XML files left them in. THis may not be the answer, but it looks right. I'm calling this resolved, and thaks again for the help.
When things break after running for some time in a consistent way, memory leaks are always an obvious suspect.
Eg: in the swap method, if something somewhere is retaining a reference to the old playlist there’s the potential for running out of memory.
Do you have the tooling to check if it’s running out of memory?
I can say with fair confidence it's not a memory leak or such. I watched it bring up a new tune and never play it, while memory, disk and network access remained quiet. Changed playlists, New, change volume - nothing but short activity for memory and disk, then quiet again.
I have finally received a replay from the jw player people with a support link, There may be an update (I have used the same code since 2008, if it's not broke don't fix it...) I'll report back, for now they are the best bet. Thanks for your help.
I think I found the problem. Apparently WordPress stripped apostrophes from the mp3 filenames, but the XML files left them in. THis may not be the answer, but it looks right. I'm calling this resolved, and thaks again for the help.

New Threads

Latest posts

Buy us a coffee!

Top Bottom