Smobiler上海石磨_.NET移动开发平台
标题:
本地音频无法播放的问题
[打印本页]
作者:
eroop
时间:
2020-9-1 18:01
标题:
本地音频无法播放的问题
本帖最后由 eroop 于 2020-9-1 18:03 编辑
1、音频文件放在根目录,运行以下语句,没有声音。
this.Client.PlayAudio("13166.mp3", AppDomain.CurrentDomain.BaseDirectory);
2、音频文件放在Resources\Audio,运行以下语句,没有声音。
this.Client.PlayAudio("13166.mp3", ResourceMode.File);
3、如果将以上的地址改成网络地址(downsc.chinaz.net/Files/DownLoad/sound1/202007/13166.mp3),就有声音了。
作者:
eroop
时间:
2020-9-1 18:04
资源路径没改过
作者:
Lula.Jin
时间:
2020-9-2 09:57
1. 需要将音频放置bin下
2.播放Resources\Audio下音频应该 this.Client.PlayAudio("13166.mp3", MobileResourceManager.DefaultAudioPath);
作者:
eroop
时间:
2020-9-2 10:29
本帖最后由 eroop 于 2020-9-2 10:32 编辑
还是不行啊,挺纳闷的。
路径没错,就是bin\debug目录。
d:\路径\bin\Debug\13166.mp3
this.Client.PlayAudio("13166.mp3", AppDomain.CurrentDomain.BaseDirectory);
d:\路径\bin\Debug\Resources\Audio\13166.mp3
this.Client.PlayAudio("13166.mp3", MobileResourceManager.DefaultAudioPath);
作者:
Lula.Jin
时间:
2020-9-3 09:51
[attach]1984[/attach]可以下载这个音频试试的
作者:
eroop
时间:
2020-9-4 09:12
本帖最后由 eroop 于 2020-9-4 10:13 编辑
测试环境有声音,实际环境没有声音。
实际环境做了内外网IP映射,可能是这个原因。
作者:
eroop
时间:
2020-9-4 10:07
本帖最后由 eroop 于 2020-9-4 10:10 编辑
资源打包上传,重新安装。
private void button1_Press(object sender, EventArgs e)
{
this.Client.PlayAudio("13166.mp3", ResourceMode.Client);
}
点击按钮,出来loading画面,接着客户端就闪退了
作者:
eroop
时间:
2020-9-4 10:10
版本:5.0.0.0
作者:
neil
时间:
2020-9-10 17:12
提供包名和客户端版本
作者:
eroop
时间:
2020-9-25 10:29
包名:htt.gas.app
客户端版本:5.0.0.0
欢迎光临 Smobiler上海石磨_.NET移动开发平台 (https://www.smobiler.com/)
Powered by Discuz! X3.2