所以我试着用程序来改变我的音量
audio
元素。
打开
Desktop
不过,我一去就可以了
IOS
开始有问题了
以下是我用来更改音量的代码:
console.log('volumeValue Before ' + this.podcastVolume.val());
this.podCastElement.volume = this.podcastVolume.val();
console.log('volumeValue after ' + this.podCastElement.volume);
我现在也可以看到一些日志值。
在我的
国际标准化组织
所以看起来音量只是保持在
1
编辑以下是我的元素:*
this.podCastElement = $('#podcast').get(0);
this.podcastPlay = $('#podcastPlay');
this.podcastPause = $('#podcastPause');
this.podcastVolume = $('#podcastVolume');
this.podcastProgress = $('#podcastProgress');
音量按钮
<input type="range" class="form-control-range" id="podcastVolume"
(change)="changeVolume()" min="0.0" max="1.0" step="0.1">
<audio id="podcast" preload="auto">
<source [src]="fileService+podCast.resourceurl" type="audio/mpeg">
</audio>