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

Need ability to access inner AVPlayer #33

Open
lostchopstik opened this issue Nov 9, 2022 · 1 comment
Open

Need ability to access inner AVPlayer #33

lostchopstik opened this issue Nov 9, 2022 · 1 comment

Comments

@lostchopstik
Copy link

Is your feature request related to a problem? Please describe.
My company uses a third-party analytics platform that requires an instance of AVPlayer in order to hook to their adapter. I cannot cast AudioPlayer to an AVPlayer and there is no property for it.

Describe the solution or feature you would like
It would be handy if there was a property like innerPlayer that gives access to the AVPlayer inside the wrapper.

Describe alternatives you've considered
None at present other than having to ditch this library and be sad.

@rolandvar
Copy link

rolandvar commented May 21, 2024

Hello everyone,
My company would also have this need, we could possibly work on a push request, so as to expose the player to the outside world.

Our idea would be to:

  • Create a property in AVPlayerWrapper.swift and modify the related AVPlayerWrapperProtocol.swift
public var playerInner: AVPlayer? = nil
  • Initialize playerInner in the setupAVPlayer() method:
playerInner = avPlayer
  • Expose the proriety for external access in AudioPlayer.swift:
public var playerInner: avPlayer? {
      wrapper.playerInner
}

Could this kind of solution be in line with the design?
If so, we could proceed with a pull request.

We look forward to hearing from you on whether to proceed or evaluate other solutions.

We thank you for your work.

Regards,
Roland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants