Skip to content
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-13946): Player core - Use shaka preload mechanism during playlist playback #262

Merged
merged 26 commits into from
Jul 16, 2024

Conversation

SivanA-Kaltura
Copy link
Collaborator

@SivanA-Kaltura SivanA-Kaltura commented Jun 6, 2024

Description of the Changes

  • Update shaka to version which has the new preload API + preload bug fixes
  • Use shaka preload API and save the result (preloadManager instance) in a cache
  • If we try to load a manifest url and it has been previously cached, shaka instance load() will accept the preloadManager instead of the manifest url. This results in a shortened load time.

preloadManager instances only work with the shaka player that they were created by, which required the following changes:

  • Instead of having one instance of shaka per adapter we now have one shared instance per player (mapped by video element id)

  • Destroying a shaka instance invalidates its preloadManagers and also renders it unusable (forcing creation of a new instance) so it can only be destroyed if it has no preloadManagers

  • On destroy, if the cache is EMPTY, the instance will be destroyed and later it will be recreated on the next call to _init

  • If the cache is NOT EMPTY, the shaka instance will be detached instead of destroyed

  • Add adapter setCachedUrls API which adds / removes items from the cache

  • Update tests and add new tests to cover the setCachedUrls API

Related PRs:
kaltura/playkit-js#780
kaltura/kaltura-player-js#792

Resolves FEC-13946

SivanA-Kaltura added a commit to kaltura/playkit-js that referenced this pull request Jun 23, 2024
…ylist playback (#780)

### Description of the Changes

- Add setCachedUrls API
- Pass the arguments to the adapter setCachedUrls API once an adapter is
available

Related PRs:
kaltura/playkit-js-dash#262
kaltura/kaltura-player-js#792

Resolves FEC-13946
@SivanA-Kaltura SivanA-Kaltura merged commit 6aa1864 into master Jul 16, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants