{"action":"created","issue":{"url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/39","repository_url":"https://api.github.com/repos/brightcove/videojs-playlist","labels_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/39/comments","events_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/39/events","html_url":"https://github.com/brightcove/videojs-playlist/issues/39","id":148108276,"number":39,"title":"Requirejs : define videojs-playlist return undefined","user":{"login":"br3aking-bad","id":15798998,"avatar_url":"https://avatars.githubusercontent.com/u/15798998?v=3","gravatar_id":"","url":"https://api.github.com/users/br3aking-bad","html_url":"https://github.com/br3aking-bad","followers_url":"https://api.github.com/users/br3aking-bad/followers","following_url":"https://api.github.com/users/br3aking-bad/following{/other_user}","gists_url":"https://api.github.com/users/br3aking-bad/gists{/gist_id}","starred_url":"https://api.github.com/users/br3aking-bad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/br3aking-bad/subscriptions","organizations_url":"https://api.github.com/users/br3aking-bad/orgs","repos_url":"https://api.github.com/users/br3aking-bad/repos","events_url":"https://api.github.com/users/br3aking-bad/events{/privacy}","received_events_url":"https://api.github.com/users/br3aking-bad/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-13T16:03:30Z","updated_at":"2016-04-26T15:39:23Z","closed_at":"2016-04-22T12:47:39Z","body":"Hello,\r\n\r\nI am using requirejs to import videojs-playlist, but when I do it, the type returned by requirejs  is undefined instead of a function. \r\n\r\nPart of my code : \r\n\r\n**loadplaylist.js**\r\n```\r\ndefine([\"jquery\",'mod_playlist/jsrender',\"mod_playlist/video\"], function($,jsrender,videojs) {\r\nvar t;\r\n t = {\r\n     init : function( param1) {\r\n          require(['mod_playlist/videojs-playlist'], function(videojsplaylist) {\r\n....\r\n....\r\n```\r\n\r\nI add the following line at the beginning of my videojs-playlist.js\r\n\r\n` define([\"mod_playlist/video\"], function(videojs) {\r\n`\r\n\r\nVideojs work well, I can use it, and the type of the object videojs is a function, in addition it seems to me that there is no circular dependencies. Do you have an idea how to solve this problem ? "},"comment":{"url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/comments/214786693","html_url":"https://github.com/brightcove/videojs-playlist/issues/39#issuecomment-214786693","issue_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/39","id":214786693,"user":{"login":"br3aking-bad","id":15798998,"avatar_url":"https://avatars.githubusercontent.com/u/15798998?v=3","gravatar_id":"","url":"https://api.github.com/users/br3aking-bad","html_url":"https://github.com/br3aking-bad","followers_url":"https://api.github.com/users/br3aking-bad/followers","following_url":"https://api.github.com/users/br3aking-bad/following{/other_user}","gists_url":"https://api.github.com/users/br3aking-bad/gists{/gist_id}","starred_url":"https://api.github.com/users/br3aking-bad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/br3aking-bad/subscriptions","organizations_url":"https://api.github.com/users/br3aking-bad/orgs","repos_url":"https://api.github.com/users/br3aking-bad/repos","events_url":"https://api.github.com/users/br3aking-bad/events{/privacy}","received_events_url":"https://api.github.com/users/br3aking-bad/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T15:39:23Z","updated_at":"2016-04-26T15:39:23Z","body":"The good point is that I have a big javascript file that is like a \"standalone\", and it's a lot easier to manage in my current project with moodle !\r\n\r\n"}}