javascriptyoutubeyoutube-apijwplayerjwplayer7

jwplayer v7.xx _.getVideoData is not a function issue


From today I have the following issue on youtube hosted videos when I want to change dynamically the video on my site.

_.getVideoData is not a function

Uncaught TypeError: _.getVideoData is not a function
at M (ssl.p.jwpcdn.com/player/v/7.12.11/provider.youtube.js:1)
at load (ssl.p.jwpcdn.com/player/v/7.12.11/provider.youtube.js:1)
at l.a (ssl.p.jwpcdn.com/player/v/7.12.11/provider.youtube.js:1)
at l.<anonymous> 
(ssl.p.jwpcdn.com/player/v/7.12.11/provider.youtube.js:1)
at P (ssl.p.jwpcdn.com/player/v/7.12.11/provider.youtube.js:1)
at K.f.I (s.ytimg.com/yts/jsbin/www-widgetapi-vflnzpyZ4/www-
widgetapi.js:66)
at W.f.l (s.ytimg.com/yts/jsbin/www-widgetapi-vflnzpyZ4/www-
widgetapi.js:114)
at W.f.J (s.ytimg.com/yts/jsbin/www-widgetapi-vflnzpyZ4/www-
widgetapi.js:127)
at S.g (s.ytimg.com/yts/jsbin/www-widgetapi-vflnzpyZ4/www-
widgetapi.js:143)
at g (s.ytimg.com/yts/jsbin/www-widgetapi-vflnzpyZ4/www-
widgetapi.js:95)

Until today it worked fine. (The jwplayer 8 version show the same issue)


Solution

  • JW Player 7.12.x uses the youtube-iframe-api. The getVideoData method was removed without warning, and we would like Google to put it back to restore functionality to integrations that use it.

    The source to the JW Player Youtube provider can be found and forked here:

    https://github.com/jwplayer/jwplayer/blob/v7.12.x/src/js/providers/youtube.js

    And this issue is being tracked in the project here:

    https://github.com/jwplayer/jwplayer/issues/2525