Skip to content

Commit c79b9a9

Browse files
committed
move initShaka, update docs
1 parent b35bb64 commit c79b9a9

File tree

4 files changed

+34
-21
lines changed

4 files changed

+34
-21
lines changed

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,42 @@ Make a youtube playlist, collaboratively.
99

1010
This is a forked version. There are quite a few fixes and new features, including:
1111

12-
- Basic Youtube search support
12+
- Basic Youtube search support (including Youtube Music)
1313
- Sync the playback on all clients *(experimental)*
14-
- Use piped instead of native youtube for everything - no call is ever made directly on youtube's server
14+
- Use Piped instead of native Youtube for everything: no call is ever made on Youtube's server
1515
- Implement Shaka Player
16-
- DASH+xml conversion from streams (apparently youtube's HLS are kinda broken)
16+
- DASH+xml conversion from streams (apparently Youtube's HLS are kinda broken)
1717
- Update packages.json, remove reprecated
18-
- Dockerized
18+
- Dockerized for easier installation
1919

20-
You can take a look at TODO.md for details about potential future features.
20+
You can take a look at [TODO](./TODO.md) for details about potential future features.
2121

2222
## Requirements
2323

24-
- [node.js](https://nodejs.org/en/)
24+
- docker
2525

2626

2727
## Installation
2828

29-
npm install
29+
docker build -t poolparty .
3030

3131
## Run
3232

33-
npm start
33+
docker-compose up -d
3434

3535

3636
When the server is running, everyone in the party can acces to
37-
server_ip:8080/ and add songs.
37+
`http://server_ip:5468` and add songs.
3838

39-
One person will visit server_ip:8080/play in order to reproduce the
40-
playlist.
39+
One or more persons can then visit `http://server_ip:5468/play` in order to play the playlist in sync.
4140

42-
## Authors
41+
42+
## Warning
43+
44+
This is a work in progress. Don't use it in production environment, or do it at your own risks.
45+
46+
47+
## Thanks to original Authors
4348

4449
- [@carlos4rias](https://github.com/carlos4rias)
4550
- [@jhonber](https://github.com/jhonber)

TODO.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1+
# TODO
2+
3+
## SOON
4+
5+
- Clean code, improve security
16
- Use Piped configurable instance url
2-
- Search & add YT playlists
3-
- Better playlist management (remove any video)
7+
- Fine tune playback sync, add client options to force sync (one time action) and unsync ("soft" to prevent seeking, and "hard" to prevent song removing & seeking)
8+
9+
## LATER
10+
11+
- Search & add YT Playlists
12+
13+
## MAYBE
14+
415
- Permissions & rooms
16+
- Better playlist management (remove, change order, etc)
517
- Better design, & mobile app (?)
18+
- Implement other sources (local? spotify? deezer?)

browser/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,13 @@ document.addEventListener('DOMContentLoaded', function() {
143143
window.socket = socket;
144144

145145
socket.on('start', function(data) {
146+
// NOTE: doesn't seem to be triggered the first time the page is loaded on chrome (need refresh)
146147
for (var i = 0, f; f = data.playlist[i]; ++i) {
147148
if (parseAddress(f.url))
148149
window.data.push(f.url);
149150
}
150151
if (window.data.length > 0) {
152+
initShaka();
151153
loadVideo(window.data.shift());
152154
}
153155
});

views/play.ejs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,16 @@
4747
}
4848
4949
function initShaka() {
50-
// Install built-in polyfills to patch browser incompatibilities.
5150
shaka.polyfill.installAll();
52-
53-
// Check to see if the browser supports the basic APIs Shaka needs.
5451
if (shaka.Player.isBrowserSupported()) {
55-
// Everything looks good!
5652
if (window.data.length > 0) {
5753
loadVideo(window.data.shift());
5854
}
5955
} else {
60-
// This browser does not have the minimum set of APIs we need.
6156
console.error('Browser not supported!');
6257
}
6358
}
6459
65-
document.addEventListener('DOMContentLoaded', initShaka);
66-
6760
function loadVideo(url) {
6861
window.currentVideoUrl = url;
6962
var youtubeId = window.getParseAddress(url);

0 commit comments

Comments
 (0)