We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to modify applyAudioTrack function in VideoEditorModule.swift to working dynamic mp3 file path
// Applies audio track from custom audio browser @objc func applyAudioTrack(_ resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) { self.currentResolve = resolve self.currentReject = reject // Specify audio track URL. Video Editor SDK can apply tracks stored on the device. // In this sample we use audio file stored in the project. let audioURL = Bundle.main.url(forResource: "sample_audio", withExtension: "mp3") if (audioURL == nil) { let errMessage = "Failed to apply audio track. Unknow file" print(errMessage) self.currentReject!("", errMessage, nil) return } // Specify custom track name and additional data let trackName = "Track Name" let additionTitle = "Awesome artist" DispatchQueue.main.async { self.customAudioTrackUUID = UUID() let audioBrowserModule = self.getAudioBrowserModule() // Apply audio in Video Editor SDK audioBrowserModule.trackSelectionDelegate?.trackSelectionViewController( viewController: audioBrowserModule, didSelectFile: audioURL!, isEditable: true, title: trackName, additionalTitle: additionTitle, uuid: self.customAudioTrackUUID! ) print("Audio track is applied") self.currentResolve!(nil) } }
so i can pass directly mp3 path from JS, something like this
return await VideoEditorModule.applyAudioTrack( "file:///Users/miteshkalal/Library/Developer/CoreSimulator/Devices/CAB59D05-4642-41F1-B9C1-C22D5892E263/data/Containers/Data/Application/5E7C48C9-83E9-42DB-9989-7669199AB6DC/Library/Caches/music.mp3" );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Need to modify applyAudioTrack function in VideoEditorModule.swift to working dynamic mp3 file path
so i can pass directly mp3 path from JS, something like this
The text was updated successfully, but these errors were encountered: