{"action":"created","issue":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/502","labels_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/502/labels{/name}","comments_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/502/comments","events_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/502/events","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/502","id":67040930,"number":502,"title":"Cleanup stream initialization","user":{"login":"greg80303","id":1928462,"avatar_url":"https://avatars.githubusercontent.com/u/1928462?v=3","gravatar_id":"","url":"https://api.github.com/users/greg80303","html_url":"https://github.com/greg80303","followers_url":"https://api.github.com/users/greg80303/followers","following_url":"https://api.github.com/users/greg80303/following{/other_user}","gists_url":"https://api.github.com/users/greg80303/gists{/gist_id}","starred_url":"https://api.github.com/users/greg80303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg80303/subscriptions","organizations_url":"https://api.github.com/users/greg80303/orgs","repos_url":"https://api.github.com/users/greg80303/repos","events_url":"https://api.github.com/users/greg80303/events{/privacy}","received_events_url":"https://api.github.com/users/greg80303/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-08T03:34:00Z","updated_at":"2015-04-10T16:52:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/pulls/502","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/502","diff_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/502.diff","patch_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/502.patch"},"body":"There are many methods in StreamController, Stream, and EventController\r\nthat are only used when the object is being initialized.  It is cleaner\r\nto just pass these items to the initialize() function and ensure they\r\nare properly reset in the reset() function\r\n\r\nMoved the instantiation of PlaybackController into Stream.  StreamController was\r\nalready calling Stream.getPlaybackController() to subscribe/unsubscribe\r\nPlaybackController events.  Also, StreamController was previously subscribing\r\nStream to PlaybackController events while Stream was unsubscribing from those\r\nevents itself in Stream.reset().  Better to just let Stream own PlaybackController.\r\n\r\nAlso cleaned up the handling of videoModel.  Most objects that need VideoModel only\r\nneed it in their private closure data.  Moved videoModel to private in MediaPlayer,\r\nStream, StreamController, and EventController."},"comment":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/comments/91619635","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/502#issuecomment-91619635","issue_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/502","id":91619635,"user":{"login":"greg80303","id":1928462,"avatar_url":"https://avatars.githubusercontent.com/u/1928462?v=3","gravatar_id":"","url":"https://api.github.com/users/greg80303","html_url":"https://github.com/greg80303","followers_url":"https://api.github.com/users/greg80303/followers","following_url":"https://api.github.com/users/greg80303/following{/other_user}","gists_url":"https://api.github.com/users/greg80303/gists{/gist_id}","starred_url":"https://api.github.com/users/greg80303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg80303/subscriptions","organizations_url":"https://api.github.com/users/greg80303/orgs","repos_url":"https://api.github.com/users/greg80303/repos","events_url":"https://api.github.com/users/greg80303/events{/privacy}","received_events_url":"https://api.github.com/users/greg80303/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T16:52:47Z","updated_at":"2015-04-10T16:52:47Z","body":"@KozhinM On second thought, hold off on this.  I see a couple of problems.  Since this has become such a small change, I think I'm going to work them into my next pull request (I'll be touching those functions anyway)"}}