{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments/71481085","id":71481085,"diff_hunk":"@@ -126,14 +126,25 @@ - (AVPlayerItem *)constructPlayerItem\n {\n   ASDN::MutexLocker l(__instanceLock__);\n \n+  AVPlayerItem *playerItem = nil;\n   if (_asset != nil) {\n-    AVPlayerItem *playerItem = [[AVPlayerItem alloc] initWithAsset:_asset];\n-    playerItem.videoComposition = _videoComposition;\n-    playerItem.audioMix = _audioMix;\n-    return playerItem;\n+    if ([_asset isKindOfClass:[AVURLAsset class]] && [self hasURLAsset]) {\n+      playerItem = [[AVPlayerItem alloc] initWithURL:((AVURLAsset *)_asset).URL];\n+      _asset = [playerItem asset];\n+    } else {\n+      playerItem = [[AVPlayerItem alloc] initWithAsset:_asset];\n+    }\n   }\n \n-  return nil;\n+  playerItem.videoComposition = _videoComposition;\n+  playerItem.audioMix = _audioMix;\n+  return playerItem;\n+}\n+\n+- (BOOL)hasURLAsset\n+{\n+  // The array of AVAssetTrack objects available via the tracks property of an URL asset is typically empty for streaming-based media\n+  return _asset.tracks.count == 0;","path":"AsyncDisplayKit/ASVideoNode.mm","position":27,"original_position":27,"commit_id":"44a80672cbc7f4f5309deb1e2098d69eabace15c","original_commit_id":"44a80672cbc7f4f5309deb1e2098d69eabace15c","user":{"login":"Xinchi","id":1481896,"avatar_url":"https://avatars.githubusercontent.com/u/1481896?v=3","gravatar_id":"","url":"https://api.github.com/users/Xinchi","html_url":"https://github.com/Xinchi","followers_url":"https://api.github.com/users/Xinchi/followers","following_url":"https://api.github.com/users/Xinchi/following{/other_user}","gists_url":"https://api.github.com/users/Xinchi/gists{/gist_id}","starred_url":"https://api.github.com/users/Xinchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xinchi/subscriptions","organizations_url":"https://api.github.com/users/Xinchi/orgs","repos_url":"https://api.github.com/users/Xinchi/repos","events_url":"https://api.github.com/users/Xinchi/events{/privacy}","received_events_url":"https://api.github.com/users/Xinchi/received_events","type":"User","site_admin":false},"body":"The constructPlayerItem method is called once the requestedKeys are loaded in the prepareToPlayAsset: withKeys: method.. not sure how we can make it faster than that?","created_at":"2016-07-20T08:00:45Z","updated_at":"2016-07-20T08:00:45Z","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/1954#discussion_r71481085","pull_request_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1954","_links":{"self":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments/71481085"},"html":{"href":"https://github.com/facebook/AsyncDisplayKit/pull/1954#discussion_r71481085"},"pull_request":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1954"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1954","id":78065168,"html_url":"https://github.com/facebook/AsyncDisplayKit/pull/1954","diff_url":"https://github.com/facebook/AsyncDisplayKit/pull/1954.diff","patch_url":"https://github.com/facebook/AsyncDisplayKit/pull/1954.patch","issue_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1954","number":1954,"state":"open","locked":false,"title":"Hls issue","user":{"login":"Xinchi","id":1481896,"avatar_url":"https://avatars.githubusercontent.com/u/1481896?v=3","gravatar_id":"","url":"https://api.github.com/users/Xinchi","html_url":"https://github.com/Xinchi","followers_url":"https://api.github.com/users/Xinchi/followers","following_url":"https://api.github.com/users/Xinchi/following{/other_user}","gists_url":"https://api.github.com/users/Xinchi/gists{/gist_id}","starred_url":"https://api.github.com/users/Xinchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xinchi/subscriptions","organizations_url":"https://api.github.com/users/Xinchi/orgs","repos_url":"https://api.github.com/users/Xinchi/repos","events_url":"https://api.github.com/users/Xinchi/events{/privacy}","received_events_url":"https://api.github.com/users/Xinchi/received_events","type":"User","site_admin":false},"body":"Closing #1748 and opening this Pull Request, as the base in #1748 was still the old commit and after rebasing, it leads to the longest PR.   \r\n\r\n@gazreese @ejensen  @hannahmbanana @levi @maicki ","created_at":"2016-07-19T23:14:49Z","updated_at":"2016-07-20T08:00:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ebd0c3b75dc05ea90053b3f0125da735a7657a95","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1954/commits","review_comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1954/comments","review_comment_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1954/comments","statuses_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/44a80672cbc7f4f5309deb1e2098d69eabace15c","head":{"label":"Xinchi:HLS_issue","ref":"HLS_issue","sha":"44a80672cbc7f4f5309deb1e2098d69eabace15c","user":{"login":"Xinchi","id":1481896,"avatar_url":"https://avatars.githubusercontent.com/u/1481896?v=3","gravatar_id":"","url":"https://api.github.com/users/Xinchi","html_url":"https://github.com/Xinchi","followers_url":"https://api.github.com/users/Xinchi/followers","following_url":"https://api.github.com/users/Xinchi/following{/other_user}","gists_url":"https://api.github.com/users/Xinchi/gists{/gist_id}","starred_url":"https://api.github.com/users/Xinchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xinchi/subscriptions","organizations_url":"https://api.github.com/users/Xinchi/orgs","repos_url":"https://api.github.com/users/Xinchi/repos","events_url":"https://api.github.com/users/Xinchi/events{/privacy}","received_events_url":"https://api.github.com/users/Xinchi/received_events","type":"User","site_admin":false},"repo":{"id":51966015,"name":"AsyncDisplayKit","full_name":"Xinchi/AsyncDisplayKit","owner":{"login":"Xinchi","id":1481896,"avatar_url":"https://avatars.githubusercontent.com/u/1481896?v=3","gravatar_id":"","url":"https://api.github.com/users/Xinchi","html_url":"https://github.com/Xinchi","followers_url":"https://api.github.com/users/Xinchi/followers","following_url":"https://api.github.com/users/Xinchi/following{/other_user}","gists_url":"https://api.github.com/users/Xinchi/gists{/gist_id}","starred_url":"https://api.github.com/users/Xinchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xinchi/subscriptions","organizations_url":"https://api.github.com/users/Xinchi/orgs","repos_url":"https://api.github.com/users/Xinchi/repos","events_url":"https://api.github.com/users/Xinchi/events{/privacy}","received_events_url":"https://api.github.com/users/Xinchi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Xinchi/AsyncDisplayKit","description":"Smooth asynchronous user interfaces for iOS apps.","fork":true,"url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit","forks_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/forks","keys_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/teams","hooks_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/hooks","issue_events_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/issues/events{/number}","events_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/events","assignees_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/assignees{/user}","branches_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/branches{/branch}","tags_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/tags","blobs_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/statuses/{sha}","languages_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/languages","stargazers_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/stargazers","contributors_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/contributors","subscribers_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/subscribers","subscription_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/subscription","commits_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/contents/{+path}","compare_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/merges","archive_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/downloads","issues_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/issues{/number}","pulls_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/pulls{/number}","milestones_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/milestones{/number}","notifications_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/labels{/name}","releases_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/releases{/id}","deployments_url":"https://api.github.com/repos/Xinchi/AsyncDisplayKit/deployments","created_at":"2016-02-18T00:25:33Z","updated_at":"2016-05-13T21:42:13Z","pushed_at":"2016-07-20T03:25:39Z","git_url":"git://github.com/Xinchi/AsyncDisplayKit.git","ssh_url":"git@github.com:Xinchi/AsyncDisplayKit.git","clone_url":"https://github.com/Xinchi/AsyncDisplayKit.git","svn_url":"https://github.com/Xinchi/AsyncDisplayKit","homepage":"http://asyncdisplaykit.org","size":47272,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"fceae5d2f8f5f1188683f5bffd57345beccffe5d","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":21265042,"name":"AsyncDisplayKit","full_name":"facebook/AsyncDisplayKit","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/AsyncDisplayKit","description":"Smooth asynchronous user interfaces for iOS apps.","fork":false,"url":"https://api.github.com/repos/facebook/AsyncDisplayKit","forks_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/forks","keys_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/teams","hooks_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/hooks","issue_events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/events","assignees_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/tags","blobs_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/languages","stargazers_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/stargazers","contributors_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/contributors","subscribers_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/subscribers","subscription_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/subscription","commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/merges","archive_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/downloads","issues_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels{/name}","releases_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/deployments","created_at":"2014-06-27T05:29:02Z","updated_at":"2016-07-20T06:33:18Z","pushed_at":"2016-07-20T07:47:10Z","git_url":"git://github.com/facebook/AsyncDisplayKit.git","ssh_url":"git@github.com:facebook/AsyncDisplayKit.git","clone_url":"https://github.com/facebook/AsyncDisplayKit.git","svn_url":"https://github.com/facebook/AsyncDisplayKit","homepage":"http://asyncdisplaykit.org","size":73301,"stargazers_count":8706,"watchers_count":8706,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1476,"mirror_url":null,"open_issues_count":111,"forks":1476,"open_issues":111,"watchers":8706,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1954"},"html":{"href":"https://github.com/facebook/AsyncDisplayKit/pull/1954"},"issue":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1954"},"comments":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1954/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1954/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1954/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/44a80672cbc7f4f5309deb1e2098d69eabace15c"}}}}
{"actor":{"display_login":"Xinchi"}}