I want to get AVPlayer button events

Asked 2 years ago, Updated 2 years ago, 32 views

I use AVPlayerViewController to play videos.
After playing the video I gave to Player, I would like to play the next video with the Fast Forward/Skip button (>>|).
However, I don't know how to get key button events.

I'm thinking about the following behavior:
1.Generate AVPlayerController Playback Screen
2. Hand over the video you want to play to Player
3. Playback
4. Play to the end, stop
5. Press the Fast Forward/Skip button
6.Recognize button press event ← I don't know where it is!!
7. Load the following videos
8. Play the next video after loading

Instead of automatically playing the next video, I would like to set the next video and play it when I skip it with the button. Is there any way?

I've looked into various things, but I'm in trouble because it hasn't been solved.
I'm sorry, thank you for your cooperation.

swift ios

2022-09-30 19:08

1 Answers

How about the Reactive method that you recently learned about?I will post the URL that I am referring to.
However, I still only understand what's written in the beginning, but I think it's convenient just to use it a little bit!
http://qiita.com/yoching/items/ea0cee3669de1e3fa4fb

As for the content, the code flows from above, but by using it, it informs the code that has already flowed and converts the implementation.I don't mind if the button action is 1 or anything, but when I got a notification, I wondered if I could do it like that.


2022-09-30 19:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.