Youtube-TV icon indicating copy to clipboard operation
Youtube-TV copied to clipboard

Channel doesn't work

Open polikin opened this issue 11 years ago • 1 comments

I have this error and I don't know why..

TypeError: video.stats is undefined

window.onload = function(){

    window.controller = new YTV('frame', {
        user: 'LesJeuxduQuebec',
        accent: '#008D54',
        browsePlaylists: true,
        controls: false,
        autoplay: true
    });

};

polikin avatar Sep 18 '13 15:09 polikin

I just noticed the same error.

I made a quick fix and just replaced the part where video.stats is added to the output string. It's at the line 229 in the ytv.js file.

So I replaced this line:

list +='<div class="ytv-content"><b>'+(video.title)+'</b><span class="ytv-views">'+utils.addCommas(video.stats.viewCount)+' Views</span></div>';

With this:

list +='<div class="ytv-content"><b>'+(video.title)+'</b><span class="ytv-views"></span></div>';

It really is a quick fix because I don't have the time to find the real reason now. The viewcount is not very important feature to me but I would still be nice to have it there. So I'll be waiting for someone with the time to make a real fix!

mMoovs avatar Oct 02 '13 12:10 mMoovs