Questions tagged [avplayerlayer]

AVPlayerLayer is a subclass of CALayer to which an AVPlayer object can direct its visual output.

During playback, AVPlayer may compensate for temporal drift between its visual output and its audible output to one or more independently-clocked audio output devices by adjusting the timing of its associated player layers. The effects of these adjustments are usually very small; however, clients that wish to remain entirely unaffected by such adjustments may wish to place other layers for which timing is important into independently timed subtrees of their layer trees.

You can create arbitrary numbers of player layers with the same AVPlayer object. Only the most-recently-created player layer will actually display the video content on-screen.

Click Here for Apple documentation of AVPlayerLayer.

248 questions
2
votes
1 answer

iOS 8.4 specific: AVPlayer not playing both video & audio and no errors

EDIT: Tested in 8.3 simulator too, same issue. I have an app which works perfectly fine in iOS 9.0 onwards (all versions). However specific to iOS 8.4, the AVPlayer doesn't play anything. No audio & video. Happens on both iPad and iPhone. I have…
2
votes
1 answer

AVPLayer show black screen when screen load

I am using AVPLayer to player video in UITableView. Video play properly but sometime initially when video played, sound is coming but screen in black. Video is visible after 5-6 second of video is played. I am using following code: AVURLAsset…
Mohit kumar
  • 248
  • 3
  • 12
2
votes
1 answer

How to make the AVPlayer resize with the parent view?

I've got an AVPlayerView created as proposed in Apple docs: https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/02_Playback.html So I add that UIView subclass as subview of my UIViewController. It…
Krystian
  • 3,193
  • 2
  • 33
  • 71
2
votes
1 answer

Video width and height of HLS in iOS

I am developing an iOS application with HLS streaming. I am using AVPlayer playerWithURL to play the video. Is there any way I can get the actual video dimensions (width and height) from the stream or player? AVPlayerLayer videoRect returns the…
Anwer
  • 689
  • 1
  • 7
  • 10
2
votes
1 answer

AVPlayer stops playing when buffer is full and dosent resume

I have a collection view with an AVPlayer inside the cell and the AVPlayer starts playing the AVPlayerItem in a loop when -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView gets called. this works well but the problem is that after the…
aviv_elk
  • 416
  • 1
  • 9
  • 21
2
votes
1 answer

How to stop downloading a streaming HLS video after navigating away from AVPlayer view?

I am trying to play a HLS stream using AVPlayer. The player plays the stream fine, however, after navigating away from the player view, it does not seem to stop downloading data for the HLS stream. I see a network data spinner on the status bar for…
basum
  • 319
  • 1
  • 3
  • 18
2
votes
2 answers

Playback Video in iOS inside a custom view

I am trying to build a simple app that allows me to record a video and then watch it. I am using two views, AVCamPreviewView on the left side of the screen (which displays a live video stream from the iPhone's camera) and AVPlayerLayerView on the…
Christian
  • 1,589
  • 1
  • 18
  • 36
2
votes
1 answer

AVPlayerLayer Stopped by Music

I am using an AVPlayerLayer to play a video. The video has no sound. However, if a user is playing music in the background and the AVPlayerLayer is displayed, the music stops. If the user swipes up and hits play, the video stops. I have even set the…
benjih555
  • 931
  • 2
  • 10
  • 25
2
votes
0 answers

Why a UIView's animation will perform incorrectly when the AVPlayer who under that UIView is playing?

The UIView is a topBar who is used to dismiss the UIViewController. If there is no animation for the topBar, it show and hides well. But When a slide animation was add to the topBar, it flashes when the animation executes. And strangely, if I pause…
William
  • 59
  • 1
  • 8
2
votes
0 answers

AVPlayer and black video

I'm recording a video in the first UIViewController, writing this video to file and I want to show this video in the second UIViewController but sometimes (quite often) there is just a black frame instead of video. player.status.rawValue and…
lithium
  • 1,272
  • 1
  • 14
  • 28
2
votes
0 answers

ios 9 closed caption is always on

I am using AVPlayer on my app and it seems that closed caption is always on when is on iOS 9 devices. It doesn't respect the propery - 'closedCaptionDisplayEnabled' at all. Also I made sure the accessibility closed caption option on the device…
CLDev
  • 1,076
  • 3
  • 12
  • 20
2
votes
1 answer

ios: Move AVPlayerLayer to fullscreen

I have view hierarchy like following: UIViewController UIView (Top most view) UIView (ContainerView) UIView (MoviePlayer.swift) (with layer as AVPlayerLayer) The MoviePlayer file is posted here. Now I want to make the…
meteors
  • 1,747
  • 3
  • 20
  • 40
2
votes
1 answer

AVPlayer - UILabel not visible when video starts playing in ios

I have a UILabel over my video player. On load of the video controller the label is showing, as soon as the video starts its hiding. I have already tried these below steps to overcome this issue but no luck:- 1) self.captionLbl.layer.zPosition =…
userAB
  • 21
  • 1
2
votes
1 answer

Swift: How to add AVPlayerLayer to back layer of NSView

I have an NSView in interface builder like so: I have buttons and a label inside the view (videoView) for playback control of a video. When I add an AVPlayerLayer (myPlayerLayer) to the view like so:…
bigelerow
  • 533
  • 2
  • 14
2
votes
0 answers

iOS: AVPlayer live stream preventing playback skips when returning from background

So I am working on an app that plays a live video and audio stream using AVPlayer and AVPlayerLayer. I want to allow the audio to play in the background when the user leaves the app or locks the device, and so far it is working pretty well. My code…
spacesloth
  • 33
  • 3