Remove Quicktime logo from AVPlayerViewController
Asked Answered
C

1

7

I was implementing a video player using AVPlayerViewController. it showing quick time logo on iOS 11 devices while streaming the video. How to remove this? I need to use a custom image as placeholder.enter image description here plase find my code :

AVPlayerItem *playerItem = [[AVPlayerItem alloc] initWithURL:[NSURL URLWithString:self.currentPlayingURL]];
Crankpin answered 1/12, 2017 at 9:29 Comment(2)
David Do You find any solution?Cleodel
@Cleodel Not yetCrankpin
K
0

You need to add your custom image to AVPlayerController's built in contentOverlayView which is a view that displays between the video content and the playback controls.

Use the content overlay view to add noninteractive custom views, such as a logo or watermark, between the video content and the controls.

Swift

let playerController = AVPlayerViewController()  
let mediaPlayer = AVPlayer(url: mediaURL)  
let playerController?.player = mediaPlayer  

// these next two lines are your answer
let customImageView = UIImageView(image: UIImage(named: "myCustomImage"))
playerController.contentOverlayView?.addSubview(customImageView)

obj-c

[yourPlayerViewController.contentOverlayView addSubview: addYourCustomImageViewHere]
Khichabia answered 14/9, 2021 at 10:48 Comment(1)
While your answer may solve the question, including an explanation of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. You can edit your answer to add explanations and give an indication of what limitations and assumptions apply. - From ReviewQuartzite

© 2022 - 2024 — McMap. All rights reserved.