-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(FEC-10669): add ability to pass options to loadMedia request #374
Conversation
mediaConfig.playback = mediaConfig.playback || {}; | ||
mediaConfig.sources = mediaConfig.sources || {}; | ||
const {startTime} = mediaOptions; | ||
if (typeof startTime === 'number') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dan-ziv I think it would make a problem cause it'll be saved for the next media as we have today with startTime.
I think the better option is to set startTime on sources instead of playback config and it'll be possible to pass it on setMedia
as well for specific media.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, this will require changes in playkit-js where startTime can come from source.
I would actually remove playkit-js startTime config from playback all together and move it to sources level and align it here in kaltura-player to merge it if it was given on playback config with deprecated warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after discussing with @dan-ziv we should handle this in separate PR.
This PR solves issue with being able to pass mediaOptions
in run time without requiring app to do reset, configure, loadMedia and just do loadMedia.
the startTime is indeed an issue to take care of, but as mentioned it will be done separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, we need to add to this PR to remove the playback config from setMedia config as well.
Description of the Changes
We have too many times where we want to override the provider config with data for sources object and then we need to explain to people how to do:
Instead, let's include the source config for the loadMedia request and add startTime to it (and of course not able to do preload or autoplay in this case).
New loadMedia signature will be:
CheckLists