Integrate photo, audio, and video content into your apps.

Posts under Media tag

200 Posts

Post

Replies

Boosts

Views

Activity

IOS App Ionic Vue Problem with Video
I have implemented an app with ionicvue. On one page I want to display videos with the HTML5 video control, e.g. video src="https://media.geeksforgeeks.org/wp-content/uploads/20210314115545/sample-video.mp4" .... it works on web, on android, but it does not work on iOS. There is only a play button with a strike through line I have tried all of the available option conbinations (controls playsinline webkit-playsinline etc.) but it does not help. Any Ideas? Thanks a lot Alex
1
0
1k
Apr ’23
adding a slideshow to webview app
hello I have created a webview app but it got rejected for not being interactive enough or not using iOS features. so I want to put an image slideshow in. however I get an error code when trying to put the code in code-block // //  ContentView.swift //  BEMCO iOS // //  Created by Lewis Dunn on 06/01/2023. // import SwiftUI import WebKit import UIKit struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } } struct ContentView: View {     let webView = WebView(request: URLRequest(url: URL(string: "https://www.apple.com")!))     var body: some View {         VStack {             webView             HStack {                 Button(action: {                     self.webView.goBack()                 }) {                     Image(systemName: "arrowshape.left")                         .font(.title)                         .foregroundColor(.blue)                     }                 Spacer()                 Button(action: {                     self.webView.goHome()                 }) {                     Image(systemName: "house.fill")                         .font(.title)                         .foregroundColor(.blue)                 }                 Spacer()                 Button(action: {                     self.webView.goForward()                 }) {                     Image(systemName: "arrowshape.right")                         .font(.title)                         .foregroundColor(.blue)                 }             }         }     } } struct WebView: UIViewRepresentable {     let request: URLRequest     private var webView: WKWebView?     init (request: URLRequest) {         self.webView = WKWebView()         self.request = request     }     func makeUIView(context: Context) -> WKWebView { return webView!     }     func updateUIView(_ uiView: WKWebView, context: Context) {         uiView.load(request)     }     func goBack() {     webView?.goBack()   }     func goForward() {   webView?.goForward()     }     func goHome() {         webView?.load(request)     } } @State private var currentIndex = 0 _**(error is here: property wrappers are not supported in top level code) **_ let images : [String] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] var body : some View {     VStack {         Image(images[currentIndex])             .resizable()             .scaledToFit()         HStack{             ForEach(0..<images.count){ index in                 Circle()                     .fill(self.currentIndex == index ? Color.gray : Color.blue) _**(cannot find self in scope)**_                     .frame(width: 10, height: 10)             }         }         .onAppear{             print("Appear")             // We are going to use Timers             Timer.scheduledTimer(withTimeInterval: 2, repeats: true){ timer in                 if self.currentIndex + 1 == self.images.count{                     self.currentIndex = 0                 }else{                     self.currentIndex += 1                 }             }         }     } }
4
0
1.2k
Apr ’23
adding slideshow to app
hello I am trying to add a slideshow to my app but I am getting 2 error messages and 1 warning the code is as follows: // ContentView.swift // BEMCO iOS // // Created by Lewis Dunn on 06/01/2023. // import SwiftUI import WebKit import UIKit struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } struct MainView : View { var body : some View { VStack { } } struct MainViewController : UIViewControllerRepresentable { func makeUIViewController(context: UIViewControllerRepresentableContext<MainViewController>) -> UIHostingController<MainView> { return UIHostingController(rootView: MainView()) } func updateUIViewController(_ uiViewController: UIHostingController<MainView>, context: UIViewControllerRepresentableContext<MainViewController>) { let viewController = UIHostingController<MainViewController>(rootView:MainViewController())} } } struct ContentView: View { let webView = WebView(request: URLRequest(url: URL(string: "https://www.bemcouk.com")!)) var body: some View { VStack { webView HStack { Button(action: { self.webView.goBack() }) { Image(systemName: "arrowshape.left") .font(.title) .foregroundColor(.blue) } Spacer() Button(action: { self.webView.goHome() }) { Image(systemName: "house.fill") .font(.title) .foregroundColor(.blue) } Spacer() Button(action: { self.webView.goForward() }) { Image(systemName: "arrowshape.right") .font(.title) .foregroundColor(.blue) } } } } } struct WebView: UIViewRepresentable **{**2 errors are here _"UIViewRepresentable' requires the types 'some View' and 'Never' be equivalent _ and the other error is _"Type 'WebView' does not conform to protocol 'UIViewRepresentable'_** let request: URLRequest private var webView: WKWebView? init (request: URLRequest) { self.webView = WKWebView() self.request = request } func makeUIView(context: Context) -> WKWebView { return webView! } func updateUIView(_ uiView: WKWebView, context: Context) { uiView.load(request) } func goBack() { webView?.goBack() } func goForward() { webView?.goForward() } func goHome() { webView?.load(request) } @State private var currentIndex = 0 let images : [String] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] let imagesCount = 19 var body : some View { VStack { Image(images[currentIndex]) .resizable() .scaledToFit() HStack{ ForEach(0..<imagesCount){ index in **warning is here. Non-constant range: argument must be an integer literal** Circle() .fill(self.currentIndex == index ? Color.gray : Color.blue) .frame(width: 10, height: 10) } } .onAppear{ print("Appear") // We are going to use Timers Timer.scheduledTimer(withTimeInterval: 2, repeats: true){ timer in if self.currentIndex + 1 == self.images.count{ self.currentIndex = 0 }else{ self.currentIndex += 1 } } } } } }
0
0
679
Mar ’23
HELP!! Please teach me, How can I create profile of photos in Mac?
Recently, I have matter of should change color of so many photos about 80000 picts. But, It's to hard to change it one by one. Actually, I want to change color with ''Match to image with ColorSync profile" of "Automator". But, I don't know some method to do it. Please teach me some method to do it. Should Ito create some profile in mac? Or, Should I search for other method? If I can create some profile, Please teach me the method both. (The pictures are taken by old film camera. There are already changed to digital image.) (They have color of "sepia color". I have to change color to "Normal".)
0
0
1.6k
Mar ’23
Video with different audio and video durations for HLS playback
I am trying to generate ABR manifest for a video that has a slightly longer video stream than audio stream. Running mediastreamvalidator tool on the manifest I get an error "Different content duration detected between discontinuities". I assume it is caused by my generated manifest having video segments extent past the last audio segments in seconds. Should I shorten the video playback to be the shorter between the two? Should I pad out the video with empty segments so that both streams have the same duration?
4
0
1.5k
Mar ’23
AVVideoCompositionCoreAnimationTool and AVAssetExportSession freezes the app randomly
Hi there, So I've been banging my head for the last week, because we have an issue in our app where it's freezing on export while the composition has a AVVideoCompositionCoreAnimationTool as animationTool Before extracting the code to an app I can share, or submit a TSIs, I was wondering if this rings a bell to someone. Basically, we're not doing something too crazy We create an AVAssetExportSession from a composition, some audio and some layers to animate.     func makeExportable(configuration: ExportConfiguration) throws -> AVAssetExportSession {         if let animationLayer {             let rect = CGRect(origin: .zero, size: configuration.videoSize)             let videoAnimationLayer = CALayer()             videoAnimationLayer.frame = rect             let videoLayer = CALayer()             videoLayer.frame = rect             videoAnimationLayer.addSublayer(videoLayer)             videoAnimationLayer.addSublayer(animationLayer)             videoAnimationLayer.isGeometryFlipped = true             let animationTool = AVVideoCompositionCoreAnimationTool(postProcessingAsVideoLayer: videoLayer,                                                                     in: videoAnimationLayer)             avVideoComposition.animationTool = animationTool         }         guard             let session = AVAssetExportSession(asset: avComposition,                                                presetName: configuration.avAssetExportPresetName) else {             throw CompositionError.invalidExportSession         }         session.audioMix = audioMix         session.videoComposition = avVideoComposition         return session)     } Then we run await session.export() If we do that multiple times in a row (there are no specific triggers, I can have a 3s video with 40 CALayers or a 30s with 1500 layers, it could happen on the first export or the 20th, ...), then at some point, the app will just have a severe hang with the following stack trace (if I pause the debug session). If ever, I remove the avVideoComposition.animationTool = animationTool line from the export session creation, then the app does not hang... Also, I encounter the issue with the fact that it's crashing on a sim but running fine on a device. Some api_misuse crash (see [here)]. Could this be related, idk...(https://developer.apple.com/forums/thread/133681) Anyway... Completely stuck here, and surprised that such a thing would have an issue on AVFoundation. We're probably not the onliest using CoreAnimation on a video export... Thanks! Marian
4
4
1.9k
Mar ’23
I can’t save a large video on my iPhone
The problem is, I have a video file which is about 111MB with resolution 1216x2160 aaaand I can’t save it on my iPhone even though I have a plenty enough space 😭 I tried to send it via airdrop and it shows a pop up with an error and ask me if I want to save it in my documents (I tried this one as well and there’s no way to save it in my gallery from the app), I tried to send a file via telegram and also get the same error. What should I do? I can’t believe that I can shoot in 4K, but can’t save a video with a higher resolution on my iPhone
1
0
2.2k
Feb ’23
Help Understanding iMessage Network Traffic
This is probably a long shot but I thought I'd give it a try. We have remote offices that are very remote -- as in satellite internet connections. Our vendor has bandwidth caps which if hit, cause a huge problem. We want employees to be able to use the internet when not working but we are trying to limit certain types of traffic. Through our UTM firewall, we are able to block iCloud backups which helps. However, we cannot figure out a way to block the syncing of photos/videos via the photos app. If we block all traffic to iCloud, iMessage will not deliver photos. Ideally, we want to block the iCloud backup and photo sync but still allow people to send individual photos/videos via iMessage. We've done packet captures but most of the traffic is obviously encrypted. It appears that if we just block gateway.icloud.com, photo sync will stop but iMessage will work for text only messages. However, photos embedded in iMessages will not go. Does anyone know if there is a way to isolate these different services through FQDN's, ports, etc...? Thanks much. Hopefully someone has been through this before. Our firewall vendor cant do much as it appears we need to have a better understanding of how iMessage works. -dave
1
0
1.2k
Jan ’23
Unable to update the MPMediaItem (Lock Screen Media Controls)
I'm currently developing an app that can reproduce audio and video from the web (my own server) using SwiftUI targeting iOS15 and testing on a iPhone XS Pro Max running iOS16.2 (real device) Both the video and audio play just fine but I get this (image in the end of the post) in as the media controls. The current time and duration are correct and updated (without me calling to update them) but I'm unable to actually update the title, artist, album and artwork My first thought was to update the NowPlaying and after a lengthy search I'm yet to find a solution that works I created a small class to update the NowPlaying info import Foundation import UIKit import MediaPlayer public class MediaController {     var nowPlayingInfo = [String: Any]()     static let shared = MediaController()     private init() { }     func setupNotificationView(title: String?, album: String?, artist: String?, thumbnailUrl: String) {         nowPlayingInfo = [String : Any]()         nowPlayingInfo[MPMediaItemPropertyTitle] = title         nowPlayingInfo[MPMediaItemPropertyAlbumTitle] = album         nowPlayingInfo[MPMediaItemPropertyArtist] = artist MPNowPlayingInfoCenter.default().nowPlayingInfo = nowPlayingInfo     } } The NowPlaying still doesn't update This is the call sequence when I press play let avAsset = AVURLAsset(url: URL(string: "https://domain.com/video.mp4") let avItem = AVPlayerItem(asset: avAsset) player.replaceCurrentItem(with: avItem) do { try AVAudioSession.sharedInstance().setActive(true); } catch { print(error) } player.play() MediaController.shared.setupNotificationView(title: "A Title", album: "A Album", artist: "A Artist", thumbnailUrl: "") Although the app is being developed using SwiftUI I'm using the UIViewControllerRepresentable to display a the video using AVPlayerViewController since the current one misses the PiP and under makeUIViewController I have the following code let controller = AVPlayerViewController() controller.player = player controller.allowsPictureInPicturePlayback = true controller.entersFullScreenWhenPlaybackBegins = true controller.delegate = context.coordinator and on the app launch I have the following let audioSession = AVAudioSession.sharedInstance() do { try audioSession.setCategory(AVAudioSession.Category.playback) } catch { print("Setting category to AVAudioSessionCategoryPlayback failed.") } And yes I have the background mode capability enabled for "Audio, AirPlay and Picture in Picture" I'm at a lost here and hope someone can help.
2
0
1.9k
Dec ’22
VTT Special Characters not displaying properly sometimes
When choosing to display a foreign audio track on some videos, the text does not render correctly. instead of a musical note I see white boxes for instance. This issue does not occur for the same content on Safari for Mac or Safari for iPad. The issue does present itself for a native mobile app (AVPlayer) on the same iPad, Safari for iPhone and the native mobile app on iPhone. Below is an image of the issue, the left is what I see on a problematic device and the right is what I would expect. Are there any known issues or workaround for this?
0
0
1.5k
Dec ’22
Xcode SwiftUI video editing splash screen
Hi, I'm trying to create our app splash screen which I need a video to play in the background. I've currently got the video into my project under the following code with AV kit/foundation imported:     VideoPlayer(player: AVPlayer(url: Bundle.main.url(forResource: "XXXXXX", withExtension: "mp4")!))       .frame(height: 400)       But I need to complete three tasks: Make the video full screen Remove the player buttons Play the video automatically All resources online seem outdated and don't work on Xcode 14. Any help from a pro would be greatly appreciated! Thanks
2
0
1.5k
Dec ’22
Autoplay working in Chrome but not in Safari. WHY!?!?!
Searched and searched can't find a solution. (yes I changed the settings in safari) I'm using Joomla 4 autoplay is working in Chrome perfect, but in safari not also looked up my code and got the required lines from the Apple Developer page, but it is still not working <p> <video src="images/video/A-Vid.webm" autoplay="autoplay" loop="loop" muted="muted" width="560" height="315" playsinline="playsinline" id="bgvid"><source src="images/video/A-Vid.mp4" type="video/mp4" /></video> </p>
2
0
2.6k
Dec ’22
AVPlayer audio issue on iOS 16
I'm using AVPlayer to play a video. It is working as expected on iOS 15 but there's no audio on iOS 16. The video is playing without any interruption. It just the audio. Used this code to make sure that phone isn't on silent mode. do { try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, options: [])  } catch { print("Setting category to AVAudioSessionCategoryPlayback failed.") } Any help would be appreciated.
5
4
3.1k
Dec ’22
IOS App Ionic Vue Problem with Video
I have implemented an app with ionicvue. On one page I want to display videos with the HTML5 video control, e.g. video src="https://media.geeksforgeeks.org/wp-content/uploads/20210314115545/sample-video.mp4" .... it works on web, on android, but it does not work on iOS. There is only a play button with a strike through line I have tried all of the available option conbinations (controls playsinline webkit-playsinline etc.) but it does not help. Any Ideas? Thanks a lot Alex
Replies
1
Boosts
0
Views
1k
Activity
Apr ’23
adding a slideshow to webview app
hello I have created a webview app but it got rejected for not being interactive enough or not using iOS features. so I want to put an image slideshow in. however I get an error code when trying to put the code in code-block // //  ContentView.swift //  BEMCO iOS // //  Created by Lewis Dunn on 06/01/2023. // import SwiftUI import WebKit import UIKit struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } } struct ContentView: View {     let webView = WebView(request: URLRequest(url: URL(string: "https://www.apple.com")!))     var body: some View {         VStack {             webView             HStack {                 Button(action: {                     self.webView.goBack()                 }) {                     Image(systemName: "arrowshape.left")                         .font(.title)                         .foregroundColor(.blue)                     }                 Spacer()                 Button(action: {                     self.webView.goHome()                 }) {                     Image(systemName: "house.fill")                         .font(.title)                         .foregroundColor(.blue)                 }                 Spacer()                 Button(action: {                     self.webView.goForward()                 }) {                     Image(systemName: "arrowshape.right")                         .font(.title)                         .foregroundColor(.blue)                 }             }         }     } } struct WebView: UIViewRepresentable {     let request: URLRequest     private var webView: WKWebView?     init (request: URLRequest) {         self.webView = WKWebView()         self.request = request     }     func makeUIView(context: Context) -> WKWebView { return webView!     }     func updateUIView(_ uiView: WKWebView, context: Context) {         uiView.load(request)     }     func goBack() {     webView?.goBack()   }     func goForward() {   webView?.goForward()     }     func goHome() {         webView?.load(request)     } } @State private var currentIndex = 0 _**(error is here: property wrappers are not supported in top level code) **_ let images : [String] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] var body : some View {     VStack {         Image(images[currentIndex])             .resizable()             .scaledToFit()         HStack{             ForEach(0..<images.count){ index in                 Circle()                     .fill(self.currentIndex == index ? Color.gray : Color.blue) _**(cannot find self in scope)**_                     .frame(width: 10, height: 10)             }         }         .onAppear{             print("Appear")             // We are going to use Timers             Timer.scheduledTimer(withTimeInterval: 2, repeats: true){ timer in                 if self.currentIndex + 1 == self.images.count{                     self.currentIndex = 0                 }else{                     self.currentIndex += 1                 }             }         }     } }
Replies
4
Boosts
0
Views
1.2k
Activity
Apr ’23
adding slideshow to app
hello I am trying to add a slideshow to my app but I am getting 2 error messages and 1 warning the code is as follows: // ContentView.swift // BEMCO iOS // // Created by Lewis Dunn on 06/01/2023. // import SwiftUI import WebKit import UIKit struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } struct MainView : View { var body : some View { VStack { } } struct MainViewController : UIViewControllerRepresentable { func makeUIViewController(context: UIViewControllerRepresentableContext<MainViewController>) -> UIHostingController<MainView> { return UIHostingController(rootView: MainView()) } func updateUIViewController(_ uiViewController: UIHostingController<MainView>, context: UIViewControllerRepresentableContext<MainViewController>) { let viewController = UIHostingController<MainViewController>(rootView:MainViewController())} } } struct ContentView: View { let webView = WebView(request: URLRequest(url: URL(string: "https://www.bemcouk.com")!)) var body: some View { VStack { webView HStack { Button(action: { self.webView.goBack() }) { Image(systemName: "arrowshape.left") .font(.title) .foregroundColor(.blue) } Spacer() Button(action: { self.webView.goHome() }) { Image(systemName: "house.fill") .font(.title) .foregroundColor(.blue) } Spacer() Button(action: { self.webView.goForward() }) { Image(systemName: "arrowshape.right") .font(.title) .foregroundColor(.blue) } } } } } struct WebView: UIViewRepresentable **{**2 errors are here _"UIViewRepresentable' requires the types 'some View' and 'Never' be equivalent _ and the other error is _"Type 'WebView' does not conform to protocol 'UIViewRepresentable'_** let request: URLRequest private var webView: WKWebView? init (request: URLRequest) { self.webView = WKWebView() self.request = request } func makeUIView(context: Context) -> WKWebView { return webView! } func updateUIView(_ uiView: WKWebView, context: Context) { uiView.load(request) } func goBack() { webView?.goBack() } func goForward() { webView?.goForward() } func goHome() { webView?.load(request) } @State private var currentIndex = 0 let images : [String] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] let imagesCount = 19 var body : some View { VStack { Image(images[currentIndex]) .resizable() .scaledToFit() HStack{ ForEach(0..<imagesCount){ index in **warning is here. Non-constant range: argument must be an integer literal** Circle() .fill(self.currentIndex == index ? Color.gray : Color.blue) .frame(width: 10, height: 10) } } .onAppear{ print("Appear") // We are going to use Timers Timer.scheduledTimer(withTimeInterval: 2, repeats: true){ timer in if self.currentIndex + 1 == self.images.count{ self.currentIndex = 0 }else{ self.currentIndex += 1 } } } } } }
Replies
0
Boosts
0
Views
679
Activity
Mar ’23
HELP!! Please teach me, How can I create profile of photos in Mac?
Recently, I have matter of should change color of so many photos about 80000 picts. But, It's to hard to change it one by one. Actually, I want to change color with ''Match to image with ColorSync profile" of "Automator". But, I don't know some method to do it. Please teach me some method to do it. Should Ito create some profile in mac? Or, Should I search for other method? If I can create some profile, Please teach me the method both. (The pictures are taken by old film camera. There are already changed to digital image.) (They have color of "sepia color". I have to change color to "Normal".)
Replies
0
Boosts
0
Views
1.6k
Activity
Mar ’23
Video with different audio and video durations for HLS playback
I am trying to generate ABR manifest for a video that has a slightly longer video stream than audio stream. Running mediastreamvalidator tool on the manifest I get an error "Different content duration detected between discontinuities". I assume it is caused by my generated manifest having video segments extent past the last audio segments in seconds. Should I shorten the video playback to be the shorter between the two? Should I pad out the video with empty segments so that both streams have the same duration?
Replies
4
Boosts
0
Views
1.5k
Activity
Mar ’23
AVVideoCompositionCoreAnimationTool and AVAssetExportSession freezes the app randomly
Hi there, So I've been banging my head for the last week, because we have an issue in our app where it's freezing on export while the composition has a AVVideoCompositionCoreAnimationTool as animationTool Before extracting the code to an app I can share, or submit a TSIs, I was wondering if this rings a bell to someone. Basically, we're not doing something too crazy We create an AVAssetExportSession from a composition, some audio and some layers to animate.     func makeExportable(configuration: ExportConfiguration) throws -> AVAssetExportSession {         if let animationLayer {             let rect = CGRect(origin: .zero, size: configuration.videoSize)             let videoAnimationLayer = CALayer()             videoAnimationLayer.frame = rect             let videoLayer = CALayer()             videoLayer.frame = rect             videoAnimationLayer.addSublayer(videoLayer)             videoAnimationLayer.addSublayer(animationLayer)             videoAnimationLayer.isGeometryFlipped = true             let animationTool = AVVideoCompositionCoreAnimationTool(postProcessingAsVideoLayer: videoLayer,                                                                     in: videoAnimationLayer)             avVideoComposition.animationTool = animationTool         }         guard             let session = AVAssetExportSession(asset: avComposition,                                                presetName: configuration.avAssetExportPresetName) else {             throw CompositionError.invalidExportSession         }         session.audioMix = audioMix         session.videoComposition = avVideoComposition         return session)     } Then we run await session.export() If we do that multiple times in a row (there are no specific triggers, I can have a 3s video with 40 CALayers or a 30s with 1500 layers, it could happen on the first export or the 20th, ...), then at some point, the app will just have a severe hang with the following stack trace (if I pause the debug session). If ever, I remove the avVideoComposition.animationTool = animationTool line from the export session creation, then the app does not hang... Also, I encounter the issue with the fact that it's crashing on a sim but running fine on a device. Some api_misuse crash (see [here)]. Could this be related, idk...(https://developer.apple.com/forums/thread/133681) Anyway... Completely stuck here, and surprised that such a thing would have an issue on AVFoundation. We're probably not the onliest using CoreAnimation on a video export... Thanks! Marian
Replies
4
Boosts
4
Views
1.9k
Activity
Mar ’23
I can’t save a large video on my iPhone
The problem is, I have a video file which is about 111MB with resolution 1216x2160 aaaand I can’t save it on my iPhone even though I have a plenty enough space 😭 I tried to send it via airdrop and it shows a pop up with an error and ask me if I want to save it in my documents (I tried this one as well and there’s no way to save it in my gallery from the app), I tried to send a file via telegram and also get the same error. What should I do? I can’t believe that I can shoot in 4K, but can’t save a video with a higher resolution on my iPhone
Replies
1
Boosts
0
Views
2.2k
Activity
Feb ’23
photo library issues
How come the photos I took with camera is not separated with those pics I got from the apps?they were all in “recent”,what’s more annoying is that when I try to categorize them by moving them into a new album, the original pics were still in the “recent”. I don’t even know weather the pics were categorized at all. Can you improve it pls?
Replies
0
Boosts
0
Views
767
Activity
Feb ’23
Help Understanding iMessage Network Traffic
This is probably a long shot but I thought I'd give it a try. We have remote offices that are very remote -- as in satellite internet connections. Our vendor has bandwidth caps which if hit, cause a huge problem. We want employees to be able to use the internet when not working but we are trying to limit certain types of traffic. Through our UTM firewall, we are able to block iCloud backups which helps. However, we cannot figure out a way to block the syncing of photos/videos via the photos app. If we block all traffic to iCloud, iMessage will not deliver photos. Ideally, we want to block the iCloud backup and photo sync but still allow people to send individual photos/videos via iMessage. We've done packet captures but most of the traffic is obviously encrypted. It appears that if we just block gateway.icloud.com, photo sync will stop but iMessage will work for text only messages. However, photos embedded in iMessages will not go. Does anyone know if there is a way to isolate these different services through FQDN's, ports, etc...? Thanks much. Hopefully someone has been through this before. Our firewall vendor cant do much as it appears we need to have a better understanding of how iMessage works. -dave
Replies
1
Boosts
0
Views
1.2k
Activity
Jan ’23
Unable to update the MPMediaItem (Lock Screen Media Controls)
I'm currently developing an app that can reproduce audio and video from the web (my own server) using SwiftUI targeting iOS15 and testing on a iPhone XS Pro Max running iOS16.2 (real device) Both the video and audio play just fine but I get this (image in the end of the post) in as the media controls. The current time and duration are correct and updated (without me calling to update them) but I'm unable to actually update the title, artist, album and artwork My first thought was to update the NowPlaying and after a lengthy search I'm yet to find a solution that works I created a small class to update the NowPlaying info import Foundation import UIKit import MediaPlayer public class MediaController {     var nowPlayingInfo = [String: Any]()     static let shared = MediaController()     private init() { }     func setupNotificationView(title: String?, album: String?, artist: String?, thumbnailUrl: String) {         nowPlayingInfo = [String : Any]()         nowPlayingInfo[MPMediaItemPropertyTitle] = title         nowPlayingInfo[MPMediaItemPropertyAlbumTitle] = album         nowPlayingInfo[MPMediaItemPropertyArtist] = artist MPNowPlayingInfoCenter.default().nowPlayingInfo = nowPlayingInfo     } } The NowPlaying still doesn't update This is the call sequence when I press play let avAsset = AVURLAsset(url: URL(string: "https://domain.com/video.mp4") let avItem = AVPlayerItem(asset: avAsset) player.replaceCurrentItem(with: avItem) do { try AVAudioSession.sharedInstance().setActive(true); } catch { print(error) } player.play() MediaController.shared.setupNotificationView(title: "A Title", album: "A Album", artist: "A Artist", thumbnailUrl: "") Although the app is being developed using SwiftUI I'm using the UIViewControllerRepresentable to display a the video using AVPlayerViewController since the current one misses the PiP and under makeUIViewController I have the following code let controller = AVPlayerViewController() controller.player = player controller.allowsPictureInPicturePlayback = true controller.entersFullScreenWhenPlaybackBegins = true controller.delegate = context.coordinator and on the app launch I have the following let audioSession = AVAudioSession.sharedInstance() do { try audioSession.setCategory(AVAudioSession.Category.playback) } catch { print("Setting category to AVAudioSessionCategoryPlayback failed.") } And yes I have the background mode capability enabled for "Audio, AirPlay and Picture in Picture" I'm at a lost here and hope someone can help.
Replies
2
Boosts
0
Views
1.9k
Activity
Dec ’22
Support for Opus in MP4 support
Opus is already supported in the .caf container format, however, it is not supported in .mp4. Opus is used heavily across the board so I often come across mp4s that don’t have audio on iOS and Safari. Implementation document: https://opus-codec.org/docs/opus_in_isobmff.html
Replies
0
Boosts
1
Views
1.8k
Activity
Dec ’22
VTT Special Characters not displaying properly sometimes
When choosing to display a foreign audio track on some videos, the text does not render correctly. instead of a musical note I see white boxes for instance. This issue does not occur for the same content on Safari for Mac or Safari for iPad. The issue does present itself for a native mobile app (AVPlayer) on the same iPad, Safari for iPhone and the native mobile app on iPhone. Below is an image of the issue, the left is what I see on a problematic device and the right is what I would expect. Are there any known issues or workaround for this?
Replies
0
Boosts
0
Views
1.5k
Activity
Dec ’22
Xcode SwiftUI video editing splash screen
Hi, I'm trying to create our app splash screen which I need a video to play in the background. I've currently got the video into my project under the following code with AV kit/foundation imported:     VideoPlayer(player: AVPlayer(url: Bundle.main.url(forResource: "XXXXXX", withExtension: "mp4")!))       .frame(height: 400)       But I need to complete three tasks: Make the video full screen Remove the player buttons Play the video automatically All resources online seem outdated and don't work on Xcode 14. Any help from a pro would be greatly appreciated! Thanks
Replies
2
Boosts
0
Views
1.5k
Activity
Dec ’22
Autoplay working in Chrome but not in Safari. WHY!?!?!
Searched and searched can't find a solution. (yes I changed the settings in safari) I'm using Joomla 4 autoplay is working in Chrome perfect, but in safari not also looked up my code and got the required lines from the Apple Developer page, but it is still not working <p> <video src="images/video/A-Vid.webm" autoplay="autoplay" loop="loop" muted="muted" width="560" height="315" playsinline="playsinline" id="bgvid"><source src="images/video/A-Vid.mp4" type="video/mp4" /></video> </p>
Replies
2
Boosts
0
Views
2.6k
Activity
Dec ’22
AVPlayer audio issue on iOS 16
I'm using AVPlayer to play a video. It is working as expected on iOS 15 but there's no audio on iOS 16. The video is playing without any interruption. It just the audio. Used this code to make sure that phone isn't on silent mode. do { try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, options: [])  } catch { print("Setting category to AVAudioSessionCategoryPlayback failed.") } Any help would be appreciated.
Replies
5
Boosts
4
Views
3.1k
Activity
Dec ’22