basic audio player working
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
89288EC0276755DF00E962C4 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 89288EBF276755DF00E962C4 /* GoogleService-Info.plist */; };
|
||||
89288ECB27675B9F00E962C4 /* OnboardingTemplateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89288ECA27675B9F00E962C4 /* OnboardingTemplateView.swift */; };
|
||||
894E80BE276ED7A700624B72 /* avatars.swift in Sources */ = {isa = PBXBuildFile; fileRef = 894E80BD276ED7A700624B72 /* avatars.swift */; };
|
||||
894E80C1276EFD0500624B72 /* AudioPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 894E80C0276EFD0400624B72 /* AudioPlayerView.swift */; };
|
||||
89AD5573276DD790001658E0 /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89AD5572276DD790001658E0 /* SplashView.swift */; };
|
||||
89AD5575276DE724001658E0 /* PhoneCodeVerificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89AD5574276DE724001658E0 /* PhoneCodeVerificationView.swift */; };
|
||||
89AD5578276DEAB3001658E0 /* LogoHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89AD5577276DEAB3001658E0 /* LogoHeaderView.swift */; };
|
||||
@@ -92,6 +93,7 @@
|
||||
89288EBF276755DF00E962C4 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||
89288ECA27675B9F00E962C4 /* OnboardingTemplateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingTemplateView.swift; sourceTree = "<group>"; };
|
||||
894E80BD276ED7A700624B72 /* avatars.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = avatars.swift; sourceTree = "<group>"; };
|
||||
894E80C0276EFD0400624B72 /* AudioPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioPlayerView.swift; sourceTree = "<group>"; };
|
||||
89AD5572276DD790001658E0 /* SplashView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashView.swift; sourceTree = "<group>"; };
|
||||
89AD5574276DE724001658E0 /* PhoneCodeVerificationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneCodeVerificationView.swift; sourceTree = "<group>"; };
|
||||
89AD5577276DEAB3001658E0 /* LogoHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogoHeaderView.swift; sourceTree = "<group>"; };
|
||||
@@ -201,6 +203,7 @@
|
||||
891A15F62765639B00B26659 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
894E80BF276EFCF500624B72 /* AudioPlayer */,
|
||||
89F18AF3276ECF1800115B1E /* AddBasicInfo */,
|
||||
89F18AF2276ECD5D00115B1E /* IntroView */,
|
||||
89F18AEF276ECA9600115B1E /* Router */,
|
||||
@@ -288,6 +291,14 @@
|
||||
path = FooterControlsView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
894E80BF276EFCF500624B72 /* AudioPlayer */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
894E80C0276EFD0400624B72 /* AudioPlayerView.swift */,
|
||||
);
|
||||
path = AudioPlayer;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
89AD5571276DD77D001658E0 /* SplashView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -521,6 +532,7 @@
|
||||
892179E42765FEB8001E6C60 /* FooterControlsView.swift in Sources */,
|
||||
891A15FD276566B800B26659 /* constants.swift in Sources */,
|
||||
89BCABE5276B3D58009E9B10 /* InnerCircleView.swift in Sources */,
|
||||
894E80C1276EFD0500624B72 /* AudioPlayerView.swift in Sources */,
|
||||
89F18AF5276ECF2A00115B1E /* AddBasicInfoView.swift in Sources */,
|
||||
89BCABF0276D53C4009E9B10 /* PhoneVerificationViewModel.swift in Sources */,
|
||||
89BDCDE72769616600577829 /* UIImage+Extension.swift in Sources */,
|
||||
@@ -668,6 +680,7 @@
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -701,6 +714,7 @@
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSContactsUsageDescription</key>
|
||||
<string>Please provide access to build your inner circle 🌱</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -19,7 +17,9 @@
|
||||
<array>
|
||||
<string>Satisfy-Regular.ttf</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Light</string>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// AudioPlayer.swift
|
||||
// nirvana-ios
|
||||
//
|
||||
// Created by Arjun Patel on 12/18/21.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import AVKit
|
||||
|
||||
struct AudioPlayerView: View {
|
||||
@State var player = AVPlayer()
|
||||
|
||||
var audioUrl: URL? = URL(string: "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3")
|
||||
|
||||
var body: some View {
|
||||
Text("we should here the music play")
|
||||
.onAppear() {
|
||||
player = AVPlayer(url: audioUrl!)
|
||||
player.play()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct AudioPlayerView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
AudioPlayerView()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user