简体   繁体   English

我应该在Android中录制什么格式才能在iOS中播放

[英]What format should I record in android to play in ios

Im building an application where Im using cordova media to record audio on both ios and android. 我正在构建一个应用程序,其中我使用科尔多瓦媒体在iOS和Android上录制音频。 I encode the audio to a base64 string and send it to a server (parse.com) and save it as a file. 我将音频编码为base64字符串,然后将其发送到服务器(parse.com),并将其保存为文件。 When I want to play it, I play the url from the file after I click on a button on the devices. 当我想播放时,单击设备上的按钮后,播放文件中的URL。 When I record the audio as a wav file on ios I can play it on both ios and android. 当我在iOS上将音频记录为wav文件时,可以在ios和android上播放它。 But when I record on android I can only play it back on android devices. 但是当我在android上录制时,只能在android设备上播放。

Im struggling to find a format which I can record on android and play it on ios. 我正在努力寻找一种可以在android上录制并在ios上播放的格式。 I have tried wav, mp3, mp4, aac and 3gp. 我已经尝试过WAV,MP3,MP4,AAC和3GP。 I have tried amr as well, but then it looks like it download the file to the phone and that is not what I want to do. 我也尝试过amr,但是看起来它会将文件下载到手机中,这不是我想要的。

Can someone please help, Im really lost here. 有人可以帮忙吗,我真的在这里迷路了。

Here's what I used. 这是我用的。 It plays audio properly in iOS. 它可以在iOS中正常播放音频。

    recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
    recorder.setAudioSamplingRate(44100);
    recorder.setAudioEncodingBitRate(96000);
    recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我应该如何选择在Web,Android和iOS上播放的视频格式? - How should I choose a video format to be played on Web, Android & iOS? 我应该与 Angular 一起使用什么来构建 android 和 ios 应用程序? - What should I use with Angular to build the android & ios apps? Android opengl es 2.0-我应该使用哪种模型格式以及应该创建自己的解析器 - Android opengl es 2.0 - what model format should i use and should i create my own Parser 什么视频格式将在所有Android设备上播放? - What video format will play on all Android devices? 我应该为iOS(游戏中心)和Android(Google Play游戏)创建不同的项目吗? - Should I create different projects for iOS(Game Center) and Android(Google Play Games)? Android 应用更新在尝试发布时被 Google Play 拒绝。 接下来我该怎么办? - Android app update rejected by Google Play while trying to publish it. What should I do next? Android:我应该使用什么视频格式/编码来支持大多数Android设备 - Android: What video format/encoding should I use to support most of the android devices 我应该使用哪种音频格式在android上编译cocos2d? - What audio format should I use to compile cocos2d on android? Android服务应该在MVP模式中扮演什么角色? - What role an Android Service should play in the MVP pattern? 带有 XF 的 Android 的播放商店图标应该是什么尺寸? - What size should the play store icon by for Android with XF?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM