{"action":"created","comment":{"url":"https://api.github.com/repos/google/shaka-player/pulls/comments/39063600","id":39063600,"diff_hunk":"@@ -0,0 +1,800 @@\n+/**\n+ * Copyright 2015 Google Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ *\n+ * @fileoverview A polyfill to stub out {@link http://goo.gl/blgtZZ EME draft","path":"lib/polyfill/patchedmediakeys_20140218.js","position":16,"original_position":16,"commit_id":"e8c68f4525032f45f9b62690f5242e9122499651","original_commit_id":"e8c68f4525032f45f9b62690f5242e9122499651","user":{"login":"joeyparrish","id":6843156,"avatar_url":"https://avatars.githubusercontent.com/u/6843156?v=3","gravatar_id":"","url":"https://api.github.com/users/joeyparrish","html_url":"https://github.com/joeyparrish","followers_url":"https://api.github.com/users/joeyparrish/followers","following_url":"https://api.github.com/users/joeyparrish/following{/other_user}","gists_url":"https://api.github.com/users/joeyparrish/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyparrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyparrish/subscriptions","organizations_url":"https://api.github.com/users/joeyparrish/orgs","repos_url":"https://api.github.com/users/joeyparrish/repos","events_url":"https://api.github.com/users/joeyparrish/events{/privacy}","received_events_url":"https://api.github.com/users/joeyparrish/received_events","type":"User","site_admin":false},"body":"Please move this info to the install method, as in 4cc4e96","created_at":"2015-09-09T16:15:41Z","updated_at":"2015-09-09T16:15:41Z","html_url":"https://github.com/google/shaka-player/pull/176#discussion_r39063600","pull_request_url":"https://api.github.com/repos/google/shaka-player/pulls/176","_links":{"self":{"href":"https://api.github.com/repos/google/shaka-player/pulls/comments/39063600"},"html":{"href":"https://github.com/google/shaka-player/pull/176#discussion_r39063600"},"pull_request":{"href":"https://api.github.com/repos/google/shaka-player/pulls/176"}}},"pull_request":{"url":"https://api.github.com/repos/google/shaka-player/pulls/176","id":44558354,"html_url":"https://github.com/google/shaka-player/pull/176","diff_url":"https://github.com/google/shaka-player/pull/176.diff","patch_url":"https://github.com/google/shaka-player/pull/176.patch","issue_url":"https://api.github.com/repos/google/shaka-player/issues/176","number":176,"state":"open","locked":false,"title":"Add support for IE/Edge/PlayReady","user":{"login":"jonoward","id":12513117,"avatar_url":"https://avatars.githubusercontent.com/u/12513117?v=3","gravatar_id":"","url":"https://api.github.com/users/jonoward","html_url":"https://github.com/jonoward","followers_url":"https://api.github.com/users/jonoward/followers","following_url":"https://api.github.com/users/jonoward/following{/other_user}","gists_url":"https://api.github.com/users/jonoward/gists{/gist_id}","starred_url":"https://api.github.com/users/jonoward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonoward/subscriptions","organizations_url":"https://api.github.com/users/jonoward/orgs","repos_url":"https://api.github.com/users/jonoward/repos","events_url":"https://api.github.com/users/jonoward/events{/privacy}","received_events_url":"https://api.github.com/users/jonoward/received_events","type":"User","site_admin":false},"body":"Added new EME polyfill for v20140218 which is the flavour of EME implemented by IE11/Edge. No support for peristent licenses, not 100% sure if this is possible in IE11/Edge. Not tested on live streams, don't have suitable content.\r\n\r\nAlso had to make some changes to work-around browser specific issues:\r\n1. Had to increase shaka.player.Player.UNDERFLOW_THRESHOLD_ from 0.2 to 0.5; because IE11 + Edge would automatically halt video before playhead reached the underflow theshold, a state it couldn't exit out of.\r\n\r\n2. Had to tweak shaka.util.FakeEventTarget.prototype.dispatchEvent to only define properties once as this caused an issue in IE11 (Edge OK). Also, IE11 didn't like the properties being defined with value/writable, only got it to work properly with get/set funcs. Issue was that event.target was always null, even if it was being set on the preceding line. I did experiment with using Object.defineProperty for each, instead of Object.defineProperties, as was discussed a little while back, but I had the same issue.\r\n\r\n3. Not sure if this is a browser bug in IE11, but when I handled PSSH data in the msneedkey event (within the new EME polyfill), I was occasionally getting the PSSH data duplicated back-to-back (e.g. if media contained PlayReady PSSH \"ABC\", sometime event.initData in msneedkey would have \"ABC\", and sometimes it would have \"ABCABC\"). Never found a reason why this was happening. This eventually caused an exception in IE11. So I tweaked the PSSH parser to keep track of the boundaries for each distinct PSSH box within a given array, which is used by the EME polyfil to remove duplicates within the msneedkey handler.\r\n\r\n4. EME manager uses shaka.util.Uint8ArrayUtils.key() to generate a unique key for a PSSH data array by converting to a comma separated string, which was later used as a property on an object. There must be a limit to the length of property names in IE11, as large values generated by the key() method (when PSSH data is large) caused the value of object.key to always be undefined. Modified this method to keep string representations of the given array internally, and assign it a randomly generated ID if it's not already present in the cache.\r\n\r\nTests:\r\nUnit tests are passing, but am having some flakiness in the integration tests, in both this branch as well as latest master:\r\n\r\nPR branch failing tests:\r\nPlayer end-of-stream behavior permits looping\r\n\r\nMaster failing tests:\r\nPlayer setPlaybackRate plays in reverse for negative rates\r\nPlayer end-of-stream behavior permits looping\r\n\r\nAny idea if there are known issues with the integration tests?","created_at":"2015-09-09T14:42:25Z","updated_at":"2015-09-09T16:15:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2729c2152139ac1ae9bd53c9c3e3707ed5311ea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/shaka-player/pulls/176/commits","review_comments_url":"https://api.github.com/repos/google/shaka-player/pulls/176/comments","review_comment_url":"https://api.github.com/repos/google/shaka-player/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/shaka-player/issues/176/comments","statuses_url":"https://api.github.com/repos/google/shaka-player/statuses/e8c68f4525032f45f9b62690f5242e9122499651","head":{"label":"blinkbox:pull-request/ie-edge-playready-support","ref":"pull-request/ie-edge-playready-support","sha":"e8c68f4525032f45f9b62690f5242e9122499651","user":{"login":"blinkbox","id":1805309,"avatar_url":"https://avatars.githubusercontent.com/u/1805309?v=3","gravatar_id":"","url":"https://api.github.com/users/blinkbox","html_url":"https://github.com/blinkbox","followers_url":"https://api.github.com/users/blinkbox/followers","following_url":"https://api.github.com/users/blinkbox/following{/other_user}","gists_url":"https://api.github.com/users/blinkbox/gists{/gist_id}","starred_url":"https://api.github.com/users/blinkbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blinkbox/subscriptions","organizations_url":"https://api.github.com/users/blinkbox/orgs","repos_url":"https://api.github.com/users/blinkbox/repos","events_url":"https://api.github.com/users/blinkbox/events{/privacy}","received_events_url":"https://api.github.com/users/blinkbox/received_events","type":"Organization","site_admin":false},"repo":{"id":34394213,"name":"shaka-player","full_name":"blinkbox/shaka-player","owner":{"login":"blinkbox","id":1805309,"avatar_url":"https://avatars.githubusercontent.com/u/1805309?v=3","gravatar_id":"","url":"https://api.github.com/users/blinkbox","html_url":"https://github.com/blinkbox","followers_url":"https://api.github.com/users/blinkbox/followers","following_url":"https://api.github.com/users/blinkbox/following{/other_user}","gists_url":"https://api.github.com/users/blinkbox/gists{/gist_id}","starred_url":"https://api.github.com/users/blinkbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blinkbox/subscriptions","organizations_url":"https://api.github.com/users/blinkbox/orgs","repos_url":"https://api.github.com/users/blinkbox/repos","events_url":"https://api.github.com/users/blinkbox/events{/privacy}","received_events_url":"https://api.github.com/users/blinkbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blinkbox/shaka-player","description":"JavaScript player library / DASH client / MSE-EME player","fork":true,"url":"https://api.github.com/repos/blinkbox/shaka-player","forks_url":"https://api.github.com/repos/blinkbox/shaka-player/forks","keys_url":"https://api.github.com/repos/blinkbox/shaka-player/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blinkbox/shaka-player/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blinkbox/shaka-player/teams","hooks_url":"https://api.github.com/repos/blinkbox/shaka-player/hooks","issue_events_url":"https://api.github.com/repos/blinkbox/shaka-player/issues/events{/number}","events_url":"https://api.github.com/repos/blinkbox/shaka-player/events","assignees_url":"https://api.github.com/repos/blinkbox/shaka-player/assignees{/user}","branches_url":"https://api.github.com/repos/blinkbox/shaka-player/branches{/branch}","tags_url":"https://api.github.com/repos/blinkbox/shaka-player/tags","blobs_url":"https://api.github.com/repos/blinkbox/shaka-player/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blinkbox/shaka-player/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blinkbox/shaka-player/git/refs{/sha}","trees_url":"https://api.github.com/repos/blinkbox/shaka-player/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blinkbox/shaka-player/statuses/{sha}","languages_url":"https://api.github.com/repos/blinkbox/shaka-player/languages","stargazers_url":"https://api.github.com/repos/blinkbox/shaka-player/stargazers","contributors_url":"https://api.github.com/repos/blinkbox/shaka-player/contributors","subscribers_url":"https://api.github.com/repos/blinkbox/shaka-player/subscribers","subscription_url":"https://api.github.com/repos/blinkbox/shaka-player/subscription","commits_url":"https://api.github.com/repos/blinkbox/shaka-player/commits{/sha}","git_commits_url":"https://api.github.com/repos/blinkbox/shaka-player/git/commits{/sha}","comments_url":"https://api.github.com/repos/blinkbox/shaka-player/comments{/number}","issue_comment_url":"https://api.github.com/repos/blinkbox/shaka-player/issues/comments{/number}","contents_url":"https://api.github.com/repos/blinkbox/shaka-player/contents/{+path}","compare_url":"https://api.github.com/repos/blinkbox/shaka-player/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blinkbox/shaka-player/merges","archive_url":"https://api.github.com/repos/blinkbox/shaka-player/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blinkbox/shaka-player/downloads","issues_url":"https://api.github.com/repos/blinkbox/shaka-player/issues{/number}","pulls_url":"https://api.github.com/repos/blinkbox/shaka-player/pulls{/number}","milestones_url":"https://api.github.com/repos/blinkbox/shaka-player/milestones{/number}","notifications_url":"https://api.github.com/repos/blinkbox/shaka-player/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blinkbox/shaka-player/labels{/name}","releases_url":"https://api.github.com/repos/blinkbox/shaka-player/releases{/id}","created_at":"2015-04-22T14:11:11Z","updated_at":"2015-05-06T09:39:29Z","pushed_at":"2015-09-09T14:10:26Z","git_url":"git://github.com/blinkbox/shaka-player.git","ssh_url":"git@github.com:blinkbox/shaka-player.git","clone_url":"https://github.com/blinkbox/shaka-player.git","svn_url":"https://github.com/blinkbox/shaka-player","homepage":"","size":15759,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"d0b8c68b04288bc879943dc84db16e85144f775e","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":28246472,"name":"shaka-player","full_name":"google/shaka-player","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/shaka-player","description":"JavaScript player library / DASH client / MSE-EME player","fork":false,"url":"https://api.github.com/repos/google/shaka-player","forks_url":"https://api.github.com/repos/google/shaka-player/forks","keys_url":"https://api.github.com/repos/google/shaka-player/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/shaka-player/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/shaka-player/teams","hooks_url":"https://api.github.com/repos/google/shaka-player/hooks","issue_events_url":"https://api.github.com/repos/google/shaka-player/issues/events{/number}","events_url":"https://api.github.com/repos/google/shaka-player/events","assignees_url":"https://api.github.com/repos/google/shaka-player/assignees{/user}","branches_url":"https://api.github.com/repos/google/shaka-player/branches{/branch}","tags_url":"https://api.github.com/repos/google/shaka-player/tags","blobs_url":"https://api.github.com/repos/google/shaka-player/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/shaka-player/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/shaka-player/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/shaka-player/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/shaka-player/statuses/{sha}","languages_url":"https://api.github.com/repos/google/shaka-player/languages","stargazers_url":"https://api.github.com/repos/google/shaka-player/stargazers","contributors_url":"https://api.github.com/repos/google/shaka-player/contributors","subscribers_url":"https://api.github.com/repos/google/shaka-player/subscribers","subscription_url":"https://api.github.com/repos/google/shaka-player/subscription","commits_url":"https://api.github.com/repos/google/shaka-player/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/shaka-player/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/shaka-player/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/shaka-player/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/shaka-player/contents/{+path}","compare_url":"https://api.github.com/repos/google/shaka-player/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/shaka-player/merges","archive_url":"https://api.github.com/repos/google/shaka-player/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/shaka-player/downloads","issues_url":"https://api.github.com/repos/google/shaka-player/issues{/number}","pulls_url":"https://api.github.com/repos/google/shaka-player/pulls{/number}","milestones_url":"https://api.github.com/repos/google/shaka-player/milestones{/number}","notifications_url":"https://api.github.com/repos/google/shaka-player/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/shaka-player/labels{/name}","releases_url":"https://api.github.com/repos/google/shaka-player/releases{/id}","created_at":"2014-12-19T21:12:18Z","updated_at":"2015-09-08T12:52:58Z","pushed_at":"2015-09-09T14:42:25Z","git_url":"git://github.com/google/shaka-player.git","ssh_url":"git@github.com:google/shaka-player.git","clone_url":"https://github.com/google/shaka-player.git","svn_url":"https://github.com/google/shaka-player","homepage":"","size":17445,"stargazers_count":293,"watchers_count":293,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":22,"forks":63,"open_issues":22,"watchers":293,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/shaka-player/pulls/176"},"html":{"href":"https://github.com/google/shaka-player/pull/176"},"issue":{"href":"https://api.github.com/repos/google/shaka-player/issues/176"},"comments":{"href":"https://api.github.com/repos/google/shaka-player/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/google/shaka-player/pulls/176/comments"},"review_comment":{"href":"https://api.github.com/repos/google/shaka-player/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/shaka-player/pulls/176/commits"},"statuses":{"href":"https://api.github.com/repos/google/shaka-player/statuses/e8c68f4525032f45f9b62690f5242e9122499651"}}}}