更改卷与Spotify应用API [英] Change volume with spotify App API

查看:119
本文介绍了更改卷与Spotify应用API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人succefully设法改变与音量Spotify应用API

I was wondering if someone has succefully managed to change the volume with the spotify app API

我可以毫不费力更改与 player.playing =真playstate; ,但 player.volume = 0.5 将不行。我必须添加一个观察员呢?

I can without hassle change the playstate with player.playing = true; but player.volume=0.5 will not work. Must I add a observer for this?

推荐答案

有关Player对象的文档确实说,你可以设置从0.0浮子1.0。

The documentation for the Player object does indeed say that you can set volume as a float from 0.0 to 1.0.

https://developer.spotify.com/technologies/apps/文档/测试/ f19ff300f8.html

这是可能你只能更改音量,如果您的应用程序发起了的发生的回放。

It's possible you're only allowed to change the volume if your app initiated the playback that's occurring.

这篇关于更改卷与Spotify应用API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆