Swift 2 AVPlayer - Play Next video Previous Video

后端 未结 2 2021
逝去的感伤
逝去的感伤 2021-01-23 03:15

I am delving this part more than one day. Please suggest any idea.

I have to accomplish to play video.I have a list of videos. If the user makes it full-screen video, th

2条回答
  •  臣服心动
    2021-01-23 03:47

    I did create a demo project where it is shown how to put a custom buttons on top of AVPlayer and they responds to clicks.

    What was done:

    • Xib (uses auto layout) file created which hold custom buttons like next, replay and others.
    • Buttons were connected to the source which prints what needs to do. Like: play next or replay.
    • Was added observer which observe when video is finished to play.
    • When video is finished to play xib file with buttons will be shown.

提交回复
热议问题