dash-shaka-playback icon indicating copy to clipboard operation
dash-shaka-playback copied to clipboard

Playback ready event logic issue

Open kslimani opened this issue 4 years ago • 7 comments

I have done some debug with this plugin, to understand why the "CORE_READY" event is not trigger when a Clappr player instance is created.

In the current latest version, it seems that the "CORE_READY" event is trigger only when play() method is called.

I think this is because the PLAYBACK_READY event is trigger in _onShakaReady() method. (this method is called only after shaka instance is ready, and therefore after calling play() method).

It seems to be not consistent with other playbacks.

The first possible solution which come to my mind is to move the "PLAYBACK_READY" trigger in the _ready method which is currently "no-op". But if we do this, some changes will be required in several methods, to add additional checks. (ie: check if shaka instance is created, some getter may return null, etc...)

/ping @leandromoreira @jhonatangomes what do you think ?

kslimani avatar Jan 29 '20 13:01 kslimani

I think it's best to add complexities as you mentioned than not to be complient with the API semantics of core ready. Btw, thanks for the work 🥂

leandromoreira avatar Jan 29 '20 13:01 leandromoreira

I pushed #75 to attempt to fix this issue.

kslimani avatar Jan 29 '20 14:01 kslimani

I'm in favor that we also update shaka to release the new version.

leandromoreira avatar Jan 29 '20 16:01 leandromoreira

@leandromoreira please note that i added an additionnal commit to fix an issue with Safari on macOS. I explain why in the PR.

kslimani avatar Jan 29 '20 16:01 kslimani

@leandromoreira do you want me to also add a commit in the PR to bump Shaka to 2.5.8 ?

kslimani avatar Jan 29 '20 16:01 kslimani

I'm okay with that, what do you think @jhonatangomes ?

leandromoreira avatar Jan 29 '20 16:01 leandromoreira

/bump @jhonatangomes :turtle: :grin:

kslimani avatar Mar 06 '20 14:03 kslimani