I want to play iOS videos at the same time.

Asked 1 years ago, Updated 1 years ago, 114 views

How should I implement it to play iOS videos simultaneously?

I want to play 4 videos simultaneously on my iPad.

It can be implemented in the application of iOS app development company TouchPress.
https://www.youtube.com/watch?v=nK54PvY_nAQ&feature=youtu.be&t=72

ios swift objective-c xcode swift2

2022-09-30 21:12

2 Answers

It's not a complete answer, but if it's a YouTube video, I've been able to play multiple simultaneous views using the following LBYouTubeView before.


2022-09-30 21:12

@Nyoho
Thank you! Try LBYouTubeView.

Actually, I was able to play it with multiple AVPlayerViewControllers.

Generate multiple AVPlayer, set each AVPlayer to the AVPlayerViewController, and locate each AVPlayerViewController.

let movieUrl:NSURL=NSURL.fileURLWithPath(path)

let each_player = AVPlayer (URL: movieUrl)
letach_playerController=AVPlayerViewController()

each_playerController.player=each_player
each_playerController.showsPlaybackControls=false

letx_position —CGFloat=self.thumbnailMovieWidth*contents_count
each_playerController.view.frame = CGRectMake(x_position, 0, self.thumbnailMovieWidth, self.thumbnailMovieHeight)

self.addChildViewController(each_playerController)

// Put thumbnail into scroll view
self.buttonThumbnailMoviesScrollView.addSubview(each_playerController.view)


2022-09-30 21:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.