I
I
Ilya2017-02-03 23:18:29
JavaScript
Ilya, 2017-02-03 23:18:29

How to change the volume of music in Vk using js?

How to change the music volume on a regular page with music in VK using javascript? For example, you can switch a track by calling a function clickon an element.top_audio_player_btn.top_audio_player_play

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dorothy, 2017-02-03
@Mr_Epic

getAudioPlayer().setVolume(1)

Value from 0 to 1. For example, 0.5 would be 50% volume.
You can also change tracks there.

F
Flur, 2017-02-03
@aslanovich

Well, obviously by moving (shifting) the volume slider. And how to move it, xs, was not interested. You can dig into the code yourself (through the search query: "volume"):
VK audio.js
audioplayer.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question