{"action":"created","comment":{"url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/comments/51623280","id":51623280,"diff_hunk":"@@ -67,6 +67,20 @@ define([\n             'returns a directory url ending with a forward slash \"'+ scriptPath +'\"');\n     });\n \n+    test('parser.getMediaId', function(assert) {\n+        var path = parser.getMediaId(null);\n+        assert.equal(path, null, 'returns null when no file name is provided');\n+\n+        var mediaId = parser.getMediaId('/test/with/short/mediaid.js');\n+        assert.equal(mediaId, null, 'returns null when media is not 8 characters long');\n+\n+        mediaId = parser.getMediaId('/test/with/dash/mediaid1-dash.js');\n+        assert.equal(mediaId, 'mediaid1', 'returns media id correctly with dash');\n+\n+        mediaId = parser.getMediaId('/test/with/mediaid2.js');\n+        assert.equal(mediaId, 'mediaid2', 'returns media id correctly');","path":"test/unit/parser-test.js","position":15,"original_position":15,"commit_id":"c4680a4bf2fce8e35ee899a6fdf4c594ebc93de8","original_commit_id":"c4680a4bf2fce8e35ee899a6fdf4c594ebc93de8","user":{"login":"robwalch","id":333258,"avatar_url":"https://avatars.githubusercontent.com/u/333258?v=3","gravatar_id":"","url":"https://api.github.com/users/robwalch","html_url":"https://github.com/robwalch","followers_url":"https://api.github.com/users/robwalch/followers","following_url":"https://api.github.com/users/robwalch/following{/other_user}","gists_url":"https://api.github.com/users/robwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/robwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwalch/subscriptions","organizations_url":"https://api.github.com/users/robwalch/orgs","repos_url":"https://api.github.com/users/robwalch/repos","events_url":"https://api.github.com/users/robwalch/events{/privacy}","received_events_url":"https://api.github.com/users/robwalch/received_events","type":"User","site_admin":false},"body":"Use real examples, with and without http(s):\r\n\r\n//content.jwplatform.com/manifests/IMUjQRAB.m3u8\r\n//content.jwplatform.com/videos/IMUjQRAB-injeKYZS.mp4\r\n//content.jwplatform.com/videos/IMUjQRAB-rjiewRbX.ogg\r\n","created_at":"2016-02-02T19:42:58Z","updated_at":"2016-02-02T19:42:58Z","html_url":"https://github.com/jwplayer/jwplayer/pull/1045#discussion_r51623280","pull_request_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/1045","_links":{"self":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/comments/51623280"},"html":{"href":"https://github.com/jwplayer/jwplayer/pull/1045#discussion_r51623280"},"pull_request":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/1045"}}},"pull_request":{"url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/1045","id":58015969,"html_url":"https://github.com/jwplayer/jwplayer/pull/1045","diff_url":"https://github.com/jwplayer/jwplayer/pull/1045.diff","patch_url":"https://github.com/jwplayer/jwplayer/pull/1045.patch","issue_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/1045","number":1045,"state":"open","locked":false,"title":"Make a function to get media id from file path","user":{"login":"pajong","id":13631194,"avatar_url":"https://avatars.githubusercontent.com/u/13631194?v=3","gravatar_id":"","url":"https://api.github.com/users/pajong","html_url":"https://github.com/pajong","followers_url":"https://api.github.com/users/pajong/followers","following_url":"https://api.github.com/users/pajong/following{/other_user}","gists_url":"https://api.github.com/users/pajong/gists{/gist_id}","starred_url":"https://api.github.com/users/pajong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pajong/subscriptions","organizations_url":"https://api.github.com/users/pajong/orgs","repos_url":"https://api.github.com/users/pajong/repos","events_url":"https://api.github.com/users/pajong/events{/privacy}","received_events_url":"https://api.github.com/users/pajong/received_events","type":"User","site_admin":false},"body":"We want to be able to find media id based on playlist item file path, so that we can use that for analytics purposes.\r\nJW7-1942","created_at":"2016-02-02T16:56:29Z","updated_at":"2016-02-02T19:42:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a53ba78de11a7ab5441709b3bc4fe2a8f81e724f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/1045/commits","review_comments_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/1045/comments","review_comment_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/1045/comments","statuses_url":"https://api.github.com/repos/jwplayer/jwplayer/statuses/c4680a4bf2fce8e35ee899a6fdf4c594ebc93de8","head":{"label":"jwplayer:feature/expose-media-id","ref":"feature/expose-media-id","sha":"c4680a4bf2fce8e35ee899a6fdf4c594ebc93de8","user":{"login":"jwplayer","id":5090060,"avatar_url":"https://avatars.githubusercontent.com/u/5090060?v=3","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"repo":{"id":18307175,"name":"jwplayer","full_name":"jwplayer/jwplayer","owner":{"login":"jwplayer","id":5090060,"avatar_url":"https://avatars.githubusercontent.com/u/5090060?v=3","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jwplayer/jwplayer","description":"JW Player is a the world's most popular embeddable media player. For documentation and support, please visit the JW Player Support Site:","fork":false,"url":"https://api.github.com/repos/jwplayer/jwplayer","forks_url":"https://api.github.com/repos/jwplayer/jwplayer/forks","keys_url":"https://api.github.com/repos/jwplayer/jwplayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwplayer/jwplayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwplayer/jwplayer/teams","hooks_url":"https://api.github.com/repos/jwplayer/jwplayer/hooks","issue_events_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/events{/number}","events_url":"https://api.github.com/repos/jwplayer/jwplayer/events","assignees_url":"https://api.github.com/repos/jwplayer/jwplayer/assignees{/user}","branches_url":"https://api.github.com/repos/jwplayer/jwplayer/branches{/branch}","tags_url":"https://api.github.com/repos/jwplayer/jwplayer/tags","blobs_url":"https://api.github.com/repos/jwplayer/jwplayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwplayer/jwplayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwplayer/jwplayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwplayer/jwplayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwplayer/jwplayer/statuses/{sha}","languages_url":"https://api.github.com/repos/jwplayer/jwplayer/languages","stargazers_url":"https://api.github.com/repos/jwplayer/jwplayer/stargazers","contributors_url":"https://api.github.com/repos/jwplayer/jwplayer/contributors","subscribers_url":"https://api.github.com/repos/jwplayer/jwplayer/subscribers","subscription_url":"https://api.github.com/repos/jwplayer/jwplayer/subscription","commits_url":"https://api.github.com/repos/jwplayer/jwplayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwplayer/jwplayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwplayer/jwplayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwplayer/jwplayer/contents/{+path}","compare_url":"https://api.github.com/repos/jwplayer/jwplayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwplayer/jwplayer/merges","archive_url":"https://api.github.com/repos/jwplayer/jwplayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwplayer/jwplayer/downloads","issues_url":"https://api.github.com/repos/jwplayer/jwplayer/issues{/number}","pulls_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls{/number}","milestones_url":"https://api.github.com/repos/jwplayer/jwplayer/milestones{/number}","notifications_url":"https://api.github.com/repos/jwplayer/jwplayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwplayer/jwplayer/labels{/name}","releases_url":"https://api.github.com/repos/jwplayer/jwplayer/releases{/id}","deployments_url":"https://api.github.com/repos/jwplayer/jwplayer/deployments","created_at":"2014-03-31T20:34:20Z","updated_at":"2016-02-02T07:53:08Z","pushed_at":"2016-02-02T18:54:20Z","git_url":"git://github.com/jwplayer/jwplayer.git","ssh_url":"git@github.com:jwplayer/jwplayer.git","clone_url":"https://github.com/jwplayer/jwplayer.git","svn_url":"https://github.com/jwplayer/jwplayer","homepage":"http://support.jwplayer.com","size":78877,"stargazers_count":581,"watchers_count":581,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":306,"mirror_url":null,"open_issues_count":19,"forks":306,"open_issues":19,"watchers":581,"default_branch":"master"}},"base":{"label":"jwplayer:master","ref":"master","sha":"08ba04ff9f887a3bbeb01b1ae7f5ab19cad770dc","user":{"login":"jwplayer","id":5090060,"avatar_url":"https://avatars.githubusercontent.com/u/5090060?v=3","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"repo":{"id":18307175,"name":"jwplayer","full_name":"jwplayer/jwplayer","owner":{"login":"jwplayer","id":5090060,"avatar_url":"https://avatars.githubusercontent.com/u/5090060?v=3","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jwplayer/jwplayer","description":"JW Player is a the world's most popular embeddable media player. For documentation and support, please visit the JW Player Support Site:","fork":false,"url":"https://api.github.com/repos/jwplayer/jwplayer","forks_url":"https://api.github.com/repos/jwplayer/jwplayer/forks","keys_url":"https://api.github.com/repos/jwplayer/jwplayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwplayer/jwplayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwplayer/jwplayer/teams","hooks_url":"https://api.github.com/repos/jwplayer/jwplayer/hooks","issue_events_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/events{/number}","events_url":"https://api.github.com/repos/jwplayer/jwplayer/events","assignees_url":"https://api.github.com/repos/jwplayer/jwplayer/assignees{/user}","branches_url":"https://api.github.com/repos/jwplayer/jwplayer/branches{/branch}","tags_url":"https://api.github.com/repos/jwplayer/jwplayer/tags","blobs_url":"https://api.github.com/repos/jwplayer/jwplayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwplayer/jwplayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwplayer/jwplayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwplayer/jwplayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwplayer/jwplayer/statuses/{sha}","languages_url":"https://api.github.com/repos/jwplayer/jwplayer/languages","stargazers_url":"https://api.github.com/repos/jwplayer/jwplayer/stargazers","contributors_url":"https://api.github.com/repos/jwplayer/jwplayer/contributors","subscribers_url":"https://api.github.com/repos/jwplayer/jwplayer/subscribers","subscription_url":"https://api.github.com/repos/jwplayer/jwplayer/subscription","commits_url":"https://api.github.com/repos/jwplayer/jwplayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwplayer/jwplayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwplayer/jwplayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwplayer/jwplayer/contents/{+path}","compare_url":"https://api.github.com/repos/jwplayer/jwplayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwplayer/jwplayer/merges","archive_url":"https://api.github.com/repos/jwplayer/jwplayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwplayer/jwplayer/downloads","issues_url":"https://api.github.com/repos/jwplayer/jwplayer/issues{/number}","pulls_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls{/number}","milestones_url":"https://api.github.com/repos/jwplayer/jwplayer/milestones{/number}","notifications_url":"https://api.github.com/repos/jwplayer/jwplayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwplayer/jwplayer/labels{/name}","releases_url":"https://api.github.com/repos/jwplayer/jwplayer/releases{/id}","deployments_url":"https://api.github.com/repos/jwplayer/jwplayer/deployments","created_at":"2014-03-31T20:34:20Z","updated_at":"2016-02-02T07:53:08Z","pushed_at":"2016-02-02T18:54:20Z","git_url":"git://github.com/jwplayer/jwplayer.git","ssh_url":"git@github.com:jwplayer/jwplayer.git","clone_url":"https://github.com/jwplayer/jwplayer.git","svn_url":"https://github.com/jwplayer/jwplayer","homepage":"http://support.jwplayer.com","size":78877,"stargazers_count":581,"watchers_count":581,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":306,"mirror_url":null,"open_issues_count":19,"forks":306,"open_issues":19,"watchers":581,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/1045"},"html":{"href":"https://github.com/jwplayer/jwplayer/pull/1045"},"issue":{"href":"https://api.github.com/repos/jwplayer/jwplayer/issues/1045"},"comments":{"href":"https://api.github.com/repos/jwplayer/jwplayer/issues/1045/comments"},"review_comments":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/1045/comments"},"review_comment":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/1045/commits"},"statuses":{"href":"https://api.github.com/repos/jwplayer/jwplayer/statuses/c4680a4bf2fce8e35ee899a6fdf4c594ebc93de8"}}}}