flutter - Just-Audio Flutter Headers are not working when adding to playlist (ConcatenatingAudioSource)
问题描述
We need to pass headers to server that hosts mp3 files and using following code but somehow header field is showing as null in logs, can you review and let us know if we are missing something or not using the headers correctly:
await _player
.setAudioSource(
ConcatenatingAudioSource(
children: queue
.map(
(item) => AudioSource.uri(
Uri.parse(item.id),
headers: {'header1': 'media.Ourhost', 'header2': 'media.Ourhost.app'},
tag: '',
),
)
.toList(),
),
)
解决方案
推荐阅读
- llvm - 如何使用 c++ api 在 LLVM 中分配局部变量
- perl - `eval { $constant_name }` 给出名称,而不是值
- json - Bigquery 导出拆分为多个文件,其中包含一些空文件
- oracle - ORA-00905: 由于多个 CASE 条件而缺少关键字
- laravel - 在子文件夹下的服务器中部署 laravel 后如何解决 404 错误?
- bit-manipulation - 反转位运算符左移
- python - 强制每个 Keras 批次包含每个类中至少一个图像是不好的做法吗?
- visual-c++ - 如何从 CMFCPropertyGridProperty ComboBox 中获取选项?
- javascript - 是否可以在运行时加载新的角度模块?
- elasticsearch - 无法将索引插入 AKS 上的 ElasticSearch DB 容器