- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我成功地使用了 Soundcloud 的小部件 API,除了 setVolume() 方法被破坏了:(
首先,我喜欢这个小部件,但令我震惊的是,在完成了如此惊人的工作之后却没有可用的音量控制!当人们听到 100% 的音频时,他们会立即“后退按钮”退出我的网站,而我无法使用 setVolume() 改变它...我必须让它工作或拉动它:(
这是正在发生的事情,我有一个名为“widget”的实例(它在页面上加载和播放良好)。
widget.bind(SC.Widget.Events.READY, function() {
$('#audioIndictments').removeClass('remove'); // This disables a CSS rule, making the soundCloud iframe visible
widget.setVolume(10); // This should set the volume to 10% but doesn't :(
widget.getVolume(function(vol){
console.log(vol); // This outputs 0.1 in the console :/
console.log(widget); // This outputs the object in the console and I don't see anything out of whack :|
});
widget.play(); // This successfully fires up the widget and the audio begins playing :)
widget.setVolume(10); // Just to see if it makes a difference, after the play() method, I ran setVolume again after the play() method and still no change :(
widget.getVolume(function(vol){
console.log(vol); // This still outputs 0.1 in the console :/
});
});
奇怪的结果。我找到了另一个问过类似问题的博主,但没有得到满意的答案。这是怎么回事?我没有看到什么?
感谢您抽出宝贵时间:)
最佳答案
尝试使用 0 到 1 之间的音量。这对我来说已经解决了。
0.25 = 25% 体积
关于api - SoundCloud Widget API setVolume 方法坏了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18329013/
我有一个程序可以生成 midi 和 wav 音频。我需要能够分别控制 MIDI 和音频的音量和平衡,理论上,我需要做的似乎就是打电话 unsigned short left = (unsigned
我正在尝试通过 STREAM_SYSTEM 上的媒体播放器播放声音 使用 mediaPlayer.setVolume(1.0f , 1.0f); 或 mediaPlayer.setVolume(0.9
有谁知道在我的应用程序上将游戏声音静音的最佳方法。 我目前正在使用 SystemSoundID,我知道它无法调整音量并且需要移动到 AVAudioPlayer。 理想情况下,我需要一个可以更改音量并保
我需要在我的应用中将媒体音量设置为 MAX 以播放蜂鸣器。我正在尝试使用 media.setVolume() 函数来实现,但它似乎不起作用。 我已经试过了 mediaPlayer.setVolume(
关于参数设置什么让播放器无声和全声 谢谢 最佳答案 这个功能真的很棒。多亏了它,您可以创建具有任意数量步骤的音量比例! 假设您需要 50 个步骤: int maxVolume = 50; 然后将 se
我想使用phonegap开发一个应用程序并在其上播放mp3文件。我在这个网站上学习如何开发媒体应用程序 http://docs.phonegap.com/en/2.8.0/cordova_media_
我在项目中使用 Vimeo api,但音量设置有问题。如果我这样做: // Create the player var player = new Vimeo.Player('video2', opti
Soundcloud 小部件是个好东西,但音量控制完全坏了。播放器忽略了对 setVolume 的 JS api 调用,在最新的 Chrome 和 Firefox 中进行了测试。 在官方 playgr
我正在使用这段代码用内置扬声器播放音频文件 audioManager = (AudioManager)Context.getSystemService(Context.AUDIO_SERVICE);
实际上我想将音频设备的左声道和右声道的音量控制给用户,用户为每个声道使用不同的数字。我使用了“waveOutSetVolume()”。它有 2 个参数。第一个是句柄,第二个是十六进制或 DWORD 数
这是我的播放功能:如您所见,我在多个位置将 Volume() 设置为 0。这完全没有效果。我试过也设置为 0.8、0.2,没关系,它不会起作用。我也尝试过非字符串值,这并不重要,因为该值在 Obj-C
我有一个带有 MediaPlayer 的服务。我需要从“Activity ”中更改播放器的音量。有任何想法吗?附:我非常需要你的帮助附言抱歉我的英语不好,请 最佳答案 如果它是本地Service并且您
我成功地使用了 Soundcloud 的小部件 API,除了 setVolume() 方法被破坏了:( 首先,我喜欢这个小部件,但令我震惊的是,在完成了如此惊人的工作之后却没有可用的音量控制!当人们听
我正在使用 Xcode 开发一个 iOS 应用程序。我还是编程新手。我试图在使用 AVPlayer 播放时设置音轨的音量。如果将时间设置为 kCMTimeZero 效果很好,但我希望它在按下按钮一秒后
我们在使用 SoundCloud Javascript API 时遇到了 setVolume 函数的问题。 痕迹: 未捕获的 IndexSizeError:索引或大小为负数,或大于允许值。 audio
我有一个警报声。我从不希望它“响亮”和令人吃惊,所以我通过 [NSSound setVolume] 将它降低到一个不大声的可听音量。 但好像音量是相对于当前系统音量设置的。因此,如果我在最大系统音量的
当音频在后台播放时(在我的同一个应用程序中),我不得不将视频音量静音。但是当我尝试在 videoview.onPrepared 回调中设置媒体播放器的音量时,它对视频静音没有任何影响。 //muteV
我不想使用 AudioManager...使用 MediaPlayer API,我的应用程序无法将音量设置到所需的级别。因为它以通过音量增大和音量减小键设置的先前音量级别播放。 public clas
我正在使用搜索栏来更改媒体播放器的音量。我正在使用的进度级别给出了“1 到 100”的整数。我需要将其转换为 0.0f 到 1.0f 的浮点范围。正确的做法是什么? 谢谢大家 最佳答案 float f
我在网页中构建了一个 chromeless youtube 播放器,使用来自 the youtube dev site 的 iframe API .一切都很顺利,除了当我在 iPad 或 Androi
我是一名优秀的程序员,十分优秀!