Questions tagged [avplayerview]

25 questions
37
votes
3 answers

Swift: AVPlayer playing video is showing this error: [AVOutputContext] WARNING: AVF context unavailable for sharedAudioPresentationContext

I'm trying to play a video from bundle directory but I'm getting this error: video[29054:2968406] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for sharedAudioPresentationContex This is my implementation: import UIKit import…
user2924482
  • 8,380
  • 23
  • 89
  • 173
9
votes
1 answer

error connection to service named rtcreportingd using AVPlayer on MacOS

I have a very simply MacOS app where I am trying to use AVPlayerView/AVPlayer on MacOS to play a small mp4 from a remote url. I constantly get errors about a connection to service com.apple.rtcreportingd. Here's a full log of the errors I…
Andrei Stanescu
  • 6,353
  • 4
  • 35
  • 64
5
votes
2 answers

How to Disable Mouse Wheel Event in AVPlayerView?

While AVPlayerView Watching, Sliding Mouse Wheel makes pause movie then fast forward or rewind. this makes process error. I set AVPlayerView Mode as NONE, btw. let me know how to disable mouse wheel event on AVPlayerView.
Killery
  • 51
  • 3
3
votes
1 answer

Hide Titlebar when mouse is idle - Swift (Cocoa OS X)

In my Application, I'm trying to make it so that my AVPlayerView hides the titlebar when the mouse is idle. Screenshot: https://i.stack.imgur.com/rMcrv.png Basically I want the the same effect the video controls have in which it automatically…
user3063455
  • 123
  • 1
  • 11
3
votes
0 answers

OSX AVPlayerView resizing when play starts

I have an AVPlayerView as the 2nd NSSplitViewItem in a NSSplitViewController. The 1st split item is a list of videos. When I select a video, it plays in the AVPlayerView. The problem is, after I call [self.videoView.player play]; my…
Darren
  • 10,182
  • 20
  • 95
  • 162
2
votes
2 answers

In a Cocoa Swift macOS application, is there a way to subclass AVPlayerView to get round corners and a shadow?

I have a Cocoa Swift macOS application that I am developing. I would like to obtain an AVPlayerView with round corners and a shadow. If I enable the shadow in interface builder it shows correctly there but not when I run the app, and drawRect in my…
Alfonso Tesauro
  • 1,730
  • 13
  • 21
2
votes
1 answer

Swift Mac OS - How to play another video/change the URL of the video with AVPlayer upon a button click?

I am new to swift and I am trying to make a Mac OS app that loops a video from the app's resources using AVPlayer as the background of the window once the app has been launched. When the user selects a menu item/clicks a button the background video…
2
votes
1 answer

AVPlayerView Mac: How to disable all user interaction?

I'm making a mac app that plays a video using AVPlayerView. I want to control the player programmatically. I've set the controlStyle to none, so that the user can't press the buttons to control the player. theplayer.controlsStyle =…
Developer
  • 406
  • 1
  • 4
  • 18
2
votes
1 answer

How to handle AVPlayer when device changes orientation?

My app only supports portrait orientation. But I have used AVPlayerViewController in one screen. App has UINavigationViewController and UITabBarViewController. When device is rotated to landscape mode during video play, I am having hard time to…
1
vote
0 answers

AVPlayerView Question. .canBeginTrimming == false

I am using an AVPlayerView and I'm trying to call the beginTrimming method. However it isn't working (ie. not entering trimming mode), so I checked its .canBeginTrimming property and found that it is false. The .mov files I am using are local and…
psb
  • 89
  • 5
1
vote
0 answers

Detect Whether Or Not Video Clip Is Copy Protected

I have a desktop (macOS) application that reads video clips (.mov, .m4v, .mp4...). The application reads a video clip as an avAsset object as follows. import Cocoa import AVKit class VideoViewController: NSViewController { var videoPlayer:…
El Tomato
  • 6,479
  • 6
  • 46
  • 75
1
vote
0 answers

Running an AVPlayerView in its own NSWindowController

I want to run an NSPlayer (with anNSPlayerView) in its own window where I can show demo and tutorial videos about my app. I started with an IBOutlet NSPlayerView. However, when I open the window containing the view ([self.demoWindowController…
1
vote
1 answer

AVPlayerLayer not rendering offline HLS video in iOS 11

I am facing a weird issue in iOS 11. I have an App where I am playing HLS video in AVPlayer. In case of offline HLS video after starting video audio is playing but video content is not getting rendered on AVPlayerLayer. This issue is occurring only…
Martin
  • 846
  • 1
  • 9
  • 23
1
vote
1 answer

Add Trick Play feature with AVPlayerViewController in Swift

I implemented a video player function with AVPlayer in Swift 3. Currently, I can play the video well. I would like to add the feature of "Trick Play" with the speed of 2x,3x,4x. However, I didn't find anything googling. Can anyone help me please?
1
vote
1 answer

Mac OSX swift resize video view

I need to display a video in my app, and would like to be able to resize it. On a button, i have a Modal Segue. The code of the view is : import Cocoa import AVKit import AVFoundation import MediaPlayer class NSViewController2: NSViewController { …
n savoini
  • 422
  • 1
  • 3
  • 13
1
2