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)
- Host: GitHub
- URL: https://github.com/jakejarrett/youtube-music
- Owner: jakejarrett
- License: mit
- Created: 2018-07-02T22:28:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-09T11:38:32.000Z (almost 7 years ago)
- Last Synced: 2025-04-02T18:51:43.063Z (over 1 year ago)
- Topics: gtk3, linux, vala, youtube-music
- Language: Vala
- Size: 37.1 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.