An open API service indexing awesome lists of open source software.

https://github.com/jakejarrett/youtube-music

Linux wrapper for Youtube Music (Vala)
https://github.com/jakejarrett/youtube-music

gtk3 linux vala youtube-music

Last synced: 9 months ago
JSON representation

Linux wrapper for Youtube Music (Vala)

Awesome Lists containing this project

README

          

# youtube-music

A simple vala & webkit2gtk wrapper for Youtube music.

## NOTES

`…` contains the following data that we can use;
```js
const player = document.querySelector('ytmusic-player-bar');
const playerApi = player.playerApi_;
const play = playerApi.playVideo; // function(){}
const pause = playerApi.pauseVideo; // function(){}

// Handling play/pause
playerApi.addEventListener('onStateChange', state => console.log('onStateChange', state));
const states = {
playing: 1,
paused: 2,
stopped: 3, // ? Either stopped or paused, but this only happens when you skip tracks (regardless of direction).
}

// Other events
const playerApiEvents = ["onAdEnd", "onDompaused", "onStateChange", "onDetailedError", "videodatachange"];

// Some other data that may be needed (unlikely).
const data = player.__data;
```

## What does it do?

it loads, so there's that.