{"action":"closed","number":3736,"pull_request":{"url":"https://api.github.com/repos/videojs/video.js/pulls/3736","id":92215481,"html_url":"https://github.com/videojs/video.js/pull/3736","diff_url":"https://github.com/videojs/video.js/pull/3736.diff","patch_url":"https://github.com/videojs/video.js/pull/3736.patch","issue_url":"https://api.github.com/repos/videojs/video.js/issues/3736","number":3736,"state":"closed","locked":false,"title":"Add option to have remoteTextTracks automatically 'garbage-collected' when sources change","user":{"login":"imbcmdth","id":162465,"avatar_url":"https://avatars.githubusercontent.com/u/162465?v=3","gravatar_id":"","url":"https://api.github.com/users/imbcmdth","html_url":"https://github.com/imbcmdth","followers_url":"https://api.github.com/users/imbcmdth/followers","following_url":"https://api.github.com/users/imbcmdth/following{/other_user}","gists_url":"https://api.github.com/users/imbcmdth/gists{/gist_id}","starred_url":"https://api.github.com/users/imbcmdth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imbcmdth/subscriptions","organizations_url":"https://api.github.com/users/imbcmdth/orgs","repos_url":"https://api.github.com/users/imbcmdth/repos","events_url":"https://api.github.com/users/imbcmdth/events{/privacy}","received_events_url":"https://api.github.com/users/imbcmdth/received_events","type":"User","site_admin":false},"body":"## Description\r\nRight now \"remoteTextTracks\" persist between source changes and must be removed manually by the user. This is problematic in many cases. It means plugins that change sources, such as the playlist API or videojs-contrib-ads, have to be extremely careful about changes the source and take care to cleanup remoteTextTracks. \r\n\r\nWe do this because the Video.js API aligns very closely with the media element's native API. I propose that we could be doing more to iron-out the rough patches in the native API. In my opinion, the fact that previous changes to the media-element (adding text track elements) may change the behavior of a source is one of those rough patches.\r\n\r\n## Specific Changes proposed\r\n`Tech#addRemoteTextTrack` now accepts a second parameter - a boolean named `manualCleanup` which defaults to true preserving backwards compatibility. When that value is set to `false` the text track will be removed from the video element whenever a source change occurs.\r\n\r\nA new instance property named `autoRemoteTextTracks_` is added to `Tech` that keeps track of which TextTracks have automatic life-cycle management.\r\n\r\n## Requirements Checklist\r\n- [x] Feature implemented / Bug fixed\r\n- [ ] If necessary, more likely in a feature request than a bug fix\r\n  - [x] Unit Tests updated or fixed\r\n  - [ ] Docs/guides updated\r\n  - [ ] Example created ([starter template on JSBin](http://jsbin.com/axedog/edit?html,output))\r\n- [ ] Reviewed by Two Core Contributors\r\n\r\n","created_at":"2016-11-03T18:39:53Z","updated_at":"2016-11-09T21:08:00Z","closed_at":"2016-11-09T21:08:00Z","merged_at":"2016-11-09T21:08:00Z","merge_commit_sha":"f05a9271b831ad11c54f36bca1f6e1a822b15942","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/videojs/video.js/milestones/13","html_url":"https://github.com/videojs/video.js/milestones/5.13","labels_url":"https://api.github.com/repos/videojs/video.js/milestones/13/labels","id":2033063,"number":13,"title":"5.13","description":"","creator":{"login":"gkatsev","id":535884,"avatar_url":"https://avatars.githubusercontent.com/u/535884?v=3","gravatar_id":"","url":"https://api.github.com/users/gkatsev","html_url":"https://github.com/gkatsev","followers_url":"https://api.github.com/users/gkatsev/followers","following_url":"https://api.github.com/users/gkatsev/following{/other_user}","gists_url":"https://api.github.com/users/gkatsev/gists{/gist_id}","starred_url":"https://api.github.com/users/gkatsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkatsev/subscriptions","organizations_url":"https://api.github.com/users/gkatsev/orgs","repos_url":"https://api.github.com/users/gkatsev/repos","events_url":"https://api.github.com/users/gkatsev/events{/privacy}","received_events_url":"https://api.github.com/users/gkatsev/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":16,"state":"open","created_at":"2016-09-27T19:56:16Z","updated_at":"2016-11-09T21:08:00Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/videojs/video.js/pulls/3736/commits","review_comments_url":"https://api.github.com/repos/videojs/video.js/pulls/3736/comments","review_comment_url":"https://api.github.com/repos/videojs/video.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/videojs/video.js/issues/3736/comments","statuses_url":"https://api.github.com/repos/videojs/video.js/statuses/9359fa370a29809ffc4628f2d8e419ff6478b647","head":{"label":"videojs:auto-cleaup-texttracks","ref":"auto-cleaup-texttracks","sha":"9359fa370a29809ffc4628f2d8e419ff6478b647","user":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"repo":{"id":667006,"name":"video.js","full_name":"videojs/video.js","owner":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/videojs/video.js","description":"Video.js - open source HTML5 & Flash video player","fork":false,"url":"https://api.github.com/repos/videojs/video.js","forks_url":"https://api.github.com/repos/videojs/video.js/forks","keys_url":"https://api.github.com/repos/videojs/video.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/videojs/video.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/videojs/video.js/teams","hooks_url":"https://api.github.com/repos/videojs/video.js/hooks","issue_events_url":"https://api.github.com/repos/videojs/video.js/issues/events{/number}","events_url":"https://api.github.com/repos/videojs/video.js/events","assignees_url":"https://api.github.com/repos/videojs/video.js/assignees{/user}","branches_url":"https://api.github.com/repos/videojs/video.js/branches{/branch}","tags_url":"https://api.github.com/repos/videojs/video.js/tags","blobs_url":"https://api.github.com/repos/videojs/video.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/videojs/video.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/videojs/video.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/videojs/video.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/videojs/video.js/statuses/{sha}","languages_url":"https://api.github.com/repos/videojs/video.js/languages","stargazers_url":"https://api.github.com/repos/videojs/video.js/stargazers","contributors_url":"https://api.github.com/repos/videojs/video.js/contributors","subscribers_url":"https://api.github.com/repos/videojs/video.js/subscribers","subscription_url":"https://api.github.com/repos/videojs/video.js/subscription","commits_url":"https://api.github.com/repos/videojs/video.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/videojs/video.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/videojs/video.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/videojs/video.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/videojs/video.js/contents/{+path}","compare_url":"https://api.github.com/repos/videojs/video.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/videojs/video.js/merges","archive_url":"https://api.github.com/repos/videojs/video.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/videojs/video.js/downloads","issues_url":"https://api.github.com/repos/videojs/video.js/issues{/number}","pulls_url":"https://api.github.com/repos/videojs/video.js/pulls{/number}","milestones_url":"https://api.github.com/repos/videojs/video.js/milestones{/number}","notifications_url":"https://api.github.com/repos/videojs/video.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/videojs/video.js/labels{/name}","releases_url":"https://api.github.com/repos/videojs/video.js/releases{/id}","deployments_url":"https://api.github.com/repos/videojs/video.js/deployments","created_at":"2010-05-14T18:45:10Z","updated_at":"2016-11-09T18:51:42Z","pushed_at":"2016-11-09T21:08:00Z","git_url":"git://github.com/videojs/video.js.git","ssh_url":"git@github.com:videojs/video.js.git","clone_url":"https://github.com/videojs/video.js.git","svn_url":"https://github.com/videojs/video.js","homepage":"www.videojs.com","size":114628,"stargazers_count":14145,"watchers_count":14145,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":4100,"mirror_url":null,"open_issues_count":220,"forks":4100,"open_issues":220,"watchers":14145,"default_branch":"master"}},"base":{"label":"videojs:master","ref":"master","sha":"b6d521f472087085f5dd4e31f4237b1f31e34ca1","user":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"repo":{"id":667006,"name":"video.js","full_name":"videojs/video.js","owner":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/videojs/video.js","description":"Video.js - open source HTML5 & Flash video player","fork":false,"url":"https://api.github.com/repos/videojs/video.js","forks_url":"https://api.github.com/repos/videojs/video.js/forks","keys_url":"https://api.github.com/repos/videojs/video.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/videojs/video.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/videojs/video.js/teams","hooks_url":"https://api.github.com/repos/videojs/video.js/hooks","issue_events_url":"https://api.github.com/repos/videojs/video.js/issues/events{/number}","events_url":"https://api.github.com/repos/videojs/video.js/events","assignees_url":"https://api.github.com/repos/videojs/video.js/assignees{/user}","branches_url":"https://api.github.com/repos/videojs/video.js/branches{/branch}","tags_url":"https://api.github.com/repos/videojs/video.js/tags","blobs_url":"https://api.github.com/repos/videojs/video.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/videojs/video.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/videojs/video.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/videojs/video.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/videojs/video.js/statuses/{sha}","languages_url":"https://api.github.com/repos/videojs/video.js/languages","stargazers_url":"https://api.github.com/repos/videojs/video.js/stargazers","contributors_url":"https://api.github.com/repos/videojs/video.js/contributors","subscribers_url":"https://api.github.com/repos/videojs/video.js/subscribers","subscription_url":"https://api.github.com/repos/videojs/video.js/subscription","commits_url":"https://api.github.com/repos/videojs/video.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/videojs/video.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/videojs/video.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/videojs/video.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/videojs/video.js/contents/{+path}","compare_url":"https://api.github.com/repos/videojs/video.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/videojs/video.js/merges","archive_url":"https://api.github.com/repos/videojs/video.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/videojs/video.js/downloads","issues_url":"https://api.github.com/repos/videojs/video.js/issues{/number}","pulls_url":"https://api.github.com/repos/videojs/video.js/pulls{/number}","milestones_url":"https://api.github.com/repos/videojs/video.js/milestones{/number}","notifications_url":"https://api.github.com/repos/videojs/video.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/videojs/video.js/labels{/name}","releases_url":"https://api.github.com/repos/videojs/video.js/releases{/id}","deployments_url":"https://api.github.com/repos/videojs/video.js/deployments","created_at":"2010-05-14T18:45:10Z","updated_at":"2016-11-09T18:51:42Z","pushed_at":"2016-11-09T21:08:00Z","git_url":"git://github.com/videojs/video.js.git","ssh_url":"git@github.com:videojs/video.js.git","clone_url":"https://github.com/videojs/video.js.git","svn_url":"https://github.com/videojs/video.js","homepage":"www.videojs.com","size":114628,"stargazers_count":14145,"watchers_count":14145,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":4100,"mirror_url":null,"open_issues_count":220,"forks":4100,"open_issues":220,"watchers":14145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/videojs/video.js/pulls/3736"},"html":{"href":"https://github.com/videojs/video.js/pull/3736"},"issue":{"href":"https://api.github.com/repos/videojs/video.js/issues/3736"},"comments":{"href":"https://api.github.com/repos/videojs/video.js/issues/3736/comments"},"review_comments":{"href":"https://api.github.com/repos/videojs/video.js/pulls/3736/comments"},"review_comment":{"href":"https://api.github.com/repos/videojs/video.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/videojs/video.js/pulls/3736/commits"},"statuses":{"href":"https://api.github.com/repos/videojs/video.js/statuses/9359fa370a29809ffc4628f2d8e419ff6478b647"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"gkatsev","id":535884,"avatar_url":"https://avatars.githubusercontent.com/u/535884?v=3","gravatar_id":"","url":"https://api.github.com/users/gkatsev","html_url":"https://github.com/gkatsev","followers_url":"https://api.github.com/users/gkatsev/followers","following_url":"https://api.github.com/users/gkatsev/following{/other_user}","gists_url":"https://api.github.com/users/gkatsev/gists{/gist_id}","starred_url":"https://api.github.com/users/gkatsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkatsev/subscriptions","organizations_url":"https://api.github.com/users/gkatsev/orgs","repos_url":"https://api.github.com/users/gkatsev/repos","events_url":"https://api.github.com/users/gkatsev/events{/privacy}","received_events_url":"https://api.github.com/users/gkatsev/received_events","type":"User","site_admin":false},"comments":1,"review_comments":15,"commits":7,"additions":193,"deletions":60,"changed_files":5}}
{"actor":{"display_login":"gkatsev"}}