Why is it possible to create more things on a computer with windows 3.11 and a 485 processor than on an Ipad with 1000 times more power?
Do you understand why most people still "love" Windows???
Post
Replies
Boosts
Views
Activity
Is there a way to change the Font Size or Style inside a Picker?? In SwiftUI.
Thanks
How can I know the width and height of a video?
For example, the video is playing and the screen is rotated.
let time1cmt = CMTimeGetSeconds(playerOK.currentTime())
time1 = Double(time1cmt)
let time2cmt = CMTimeGetSeconds(playerOK.currentTime())
time2 = Double(time2cmt)
videoDif = (time2 - time1)
Now I'm using .currentTime() to get the start point and end point, but they don't seem to be accurate, is there any other way to get the time more accurately?
How can I declare a variable to change the font?
The compiler indicates that it must be type CGFont.
so:
var typeFont: CGFont //but I don't know how to initialize
How is the correct way to give an initial value?
Thanks
How can I create Log Events to the console to diagnose issues?
I am playing a video with AVPlayer, how can I get the float value of the FPS of the video?
I readed it's possible with AVAssetTrack but I don't know how to implement it.
On Swift/SwiftUI
Thanks!
Some code is not allowed to be inside an if.
For example how can I call a func inside an if?
Im using more easily to create a pick up and play a video, and that part works, and to show the video I use this line:
PhotoPickerResultView(result: photoPickerService.results[0])
and this part work fine to, arrives from this:
struct PhotoPickerResultView: View {
var result: PHPickerResult
enum MediaType {
case loading, error, video
}
@State private var loaded = false
@State private var url: URL?
@State private var mediaType: MediaType = .loading
@State private var latestErrorDescription = ""
var body: some View {
Group {
switch mediaType {
case .loading:
ProgressView()
case .error:
VStack {
Image(systemName: "exclamationmark.triangle.fill")
Text(latestErrorDescription).font(.caption)
}
.foregroundColor(.gray)
case .video:
if url != nil {
VideoPlayer(player: AVPlayer(url: url!))
...
.....
My question is, How can I use or implement the custom buttons of the AVPlayer? like:
@State private var player1 = AVPlayer(url: URL(string: "https...mp4")!)
VideoPlayer(player: player1)
Button {
player1.play()
} label: {
Text(" PLAY ")
}
Button {
player1.pause()
} label: {
Text(" PAUSE ")
}
from this line:
PhotoPickerResultView(result: photoPickerService.results[0])
???
or what do I have to change to use more easily that custom buttons of the AVPlayer??
Thanks
For example, when Apple Engineers design something new like PHPickerViewController, I imagine that they test all the functionalities and to test all these functions, they create applications.
Where can I download the code of those applications? I mean, code that is already tested and works from Apple Engineers.
I'm sure they have tons of tested code, which would be very useful for us.
Thanks!