This userscript integrates VK.com Audio Player with new MediaSession API. It is highly useful if you already use desktop integration extension for your desktop desktop environment (for example, Plasma Browser Integration for KDE). This script can also send now playing notifications if enabled.
1 Unfortunately, VK does not download data about album for tracks played not from albums, only small cover image is available, whereas you play tracks from albums, the the large cover is being loaded. There is no easy fix for this.
2 Notifications are only sent if you enabled them in settings and granted permission to vk.com to send them.
3 If player is playing song for more than 2 seconds, pressing “previous track” button will just seek to beginning of the current track instead of actually switching to previous track. This is also can be configured in settings.
You have to install userscript with the preferred extension (Tampermonkey, Greasemonkey, Violentmonkey). Clicking on the following button with extension installed will open you an installation window.
You still need system-wide integration which will use provided data:
- On Windows, Chromium can initialize on-screen media controls and bind media keyboard keys, if you have enabled “Media Session Service” flag (
chrome://flags/#enable-media-session-service
) - On Linux, KDE provides Plasma Browser Integration extension for Firefox and Chromium, which uses data from MediaSession along with monitoring web page audio and video elements to provide you controls and display media info. Read more →
- Chromium also has global UI controls. They can be enabled using flag “Global Media Controls” (
chrome://flags/#global-media-controls
). Learn more →
“Chromium” means all browsers based on it, including: Google Chrome, Opera, new Edge, Vivaldi, Brave. Although, they can not support some of the flags required above.
The userscript relies on exposed VK.com site API without any documentation, therefore it may not work correctly in some situations. If you have any issues with this userscript, please report them in Issues section →