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

Browse through AVFoundation / AVKit APIs #97

Closed
6 tasks done
defagos opened this issue Oct 11, 2022 · 2 comments
Closed
6 tasks done

Browse through AVFoundation / AVKit APIs #97

defagos opened this issue Oct 11, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@defagos
Copy link
Member

defagos commented Oct 11, 2022

As a developer I need to know which tools are available natively from the player I use. Those have been extended in recent years and some might be extremely handy in implementing features we desire.

Acceptance criteria

  • AVFoundation APIs have been covered.
  • AVKit APIs have been covered.

Tasks

  • Read AVFoundation framework headers.
  • Read AVKit framework headers.
  • Read AVFoundation documentation.
  • Read AVKit documentation.
  • Link useful documentation in our wiki.
  • Produce a list of which APIs could be investigated / used for some features. Also see comments written in the Letterbox PoC issue.
@defagos
Copy link
Member Author

defagos commented Oct 11, 2022

AVPlayer APIs

Some old and new APIs which might be useful someday:

  • setRate(_ rate:time:atHostTime:): Could this be helpful for setting a relationship between stream time and clock time in DVR streams?
  • preroll(atRate:) for faster startup in some cases?
  • automaticallyWaitsToMinimizeStalling, though how this flag is set should also take into account whether a resource loader is attached to the asset and what it does (see associated documentation).
  • timeControlStatus and reasonForWaitingToPlay.
  • rate, defaultRate and play() / playImmediately(atRate:).

AVPlayerItem APIs

  • configuredTimeOffsetFromLive, recommendedTimeOffsetFromLive and automaticallyPreservesTimeOffsetFromLive to fine-tune behavior when playing livestreams. See corresponding WWDC 19 talk.
  • forwardPlaybackEndTime and reversePlaybackEndTime: Could these be useful to implement behavior at content edges with |rate| > 1, e.g. when approaching the live edge at high playback rates?
  • timebase: Could it be useful to learn about the relationship between stream time and clock time?
  • step(byCount:): For skip forward / backward?
  • canUseNetworkResourcesForLiveStreamingWhilePaused: Could it be used to reduce network usage when playing DVR streams without negatively impacting the user experience?
  • preferredForwardBufferDuration (could be helpful to prevent livestream buffering).

AVAsset APIs

  • minimumTimeOffsetFromLive: Can probably be used to guess the DVR live edge size from the asset itself.
  • ...

@defagos defagos added the documentation Improvements or additions to documentation label Oct 24, 2022
@defagos
Copy link
Member Author

defagos commented Jan 23, 2023

Guess that's enough for now. We readily use a number of new APIs (control center, async loading, live offset preservation, etc.) and can keep the above list as reference.

@defagos defagos closed this as completed Jan 23, 2023
@defagos defagos moved this from 📋 Backlog to ✅ Done in Pillarbox Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Archived in project
Development

No branches or pull requests

1 participant