Skip to content

Cleanup stream initialization

Vinay Rosenberg requested to merge github/fork/cablelabs/stream-init into development

Created by: greg80303

There are many methods in StreamController, Stream, and EventController that are only used when the object is being initialized. It is cleaner to just pass these items to the initialize() function and ensure they are properly reset in the reset() function

Moved the instantiation of PlaybackController into Stream. StreamController was already calling Stream.getPlaybackController() to subscribe/unsubscribe PlaybackController events. Also, StreamController was previously subscribing Stream to PlaybackController events while Stream was unsubscribing from those events itself in Stream.reset(). Better to just let Stream own PlaybackController.

Also cleaned up the handling of videoModel. Most objects that need VideoModel only need it in their private closure data. Moved videoModel to private in MediaPlayer, Stream, StreamController, and EventController.

Merge request reports