shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
239 stars 62 forks source link

No reference to the player in ShakaPlayerClient callbacks #94

Closed jgongo closed 4 years ago

jgongo commented 4 years ago

There is no reference to the ShakaPlayerView firing the events received by the client. This forces the user of the library to either store a shared variable pointing to the player (if the client is implemented in the same class which creates the player) or create the client providing the player as a parameter of the constructor (if extracting the client functionality elsewhere).

It is common practice of the delegate pattern in the iOS SDK to provide the object firing the event as a parameter to the delegate method being invoked to avoid this (some examples: UIScrollViewDelegate, UICollectionViewDelegate...)

Can you please add the ShakaPlayerView firing the event as a parameter to every method of ShakaPlayerClient?