Post

Replies

Boosts

Views

Activity

Thread 1: EXC_BAD_ACCESS (code=2, address=0x16f6a3ea0)
I am trying to use AVPlayerView Controller But when i try to play the video its crash This is my Code `import UIKit import AVKit import SwiftyJSON import Alamofire import EffyIosFramework class VideoViewController: UIViewController, AVPlayerViewControllerDelegate { var player : AVPlayer! var vc = AVPlayerViewController() var isVideoPlaying = false var instance = VideoViewController() //View Did Load override func viewDidLoad() { super.viewDidLoad() vc.delegate = self } //Play Video func playVideo(url: URL) { player = AVPlayer(url: url) vc.player = player player.automaticallyWaitsToMinimizeStalling = false vc.delegate = self vc.showsPlaybackControls = false vc.videoGravity = AVLayerVideoGravity.resizeAspectFill let playerLayer = AVPlayerLayer(player: player) playerLayer.opacity = 0 self.isVideoPlaying = true self.vc.player?.play() DispatchQueue.main.asyncAfter(wallDeadline: .now()+0.2) { self.vc.view.frame = self.view.window!.bounds self.vc.view.backgroundColor = .clear DispatchQueue.main.async { self.vc.view.addSubview(self.view) } self.view.window?.addSubview(self.vc.view) } } }
2
0
2.6k
May ’22
Rich-push notifications
For notifications, I am using a firebase api [cloud messaging ]. I am getting normal notifications in all app states. when I try notifications with the attached image URL, in the foreground the image is displayed and it working properly but when the application is in a background state or terminated the normal text notification is getting without image. I also tried using the ns-notifications service and contents.
1
0
244
Aug ’24