cristianowa / restplayer Goto Github PK
View Code? Open in Web Editor NEWA seamless http remote player.
License: MIT License
A seamless http remote player.
License: MIT License
There is no testing for the flask code.
Check this to see how to do it :
http://mkelsey.com/2013/05/15/test-driven-development-of-a-flask-api/
Found a way to create a playlist automatically
Html is using iframes ...
This was done for fast prototyping due to (my) javascript restrictions.
It is very ugly and wrong, so it must be fixed.
For video suport, screens must be configurable (when used on old laptops and sutff)
an example is to use only the HDMI port like this:
xrandr --output HDMI1 --auto --same-as LVDS1
or xrandr --output HDMI1 --primary
Check "man xrandr" for more options.
Also the xrand output can be parsed to display the displays.
cristiano@debiantv:~$ xrandr
Screen 0: minimum 320 x 200, current 3200 x 1080, maximum 8192 x 8192
LVDS1 connected 1280x800+1920+0 (normal left inverted right x axis y axis) 331mm x 207mm
1280x800 60.00_+
1024x768 60.00
800x600 60.32 56.25
640x480 59.94
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
1920x1080 60.00_+ 50.00 59.94 30.00 25.00 24.00 29.97 23.98
1920x1080i 60.00 50.00 59.94
1280x720 60.00 50.00 59.94
720x576 50.00
720x480 60.00 59.94
640x480 60.00 59.94
TV1 unknown connection (normal left inverted right x axis y axis)
848x480 59.94 +
640x480 59.94 +
1024x768 59.94
800x600 59.94
Those functions are missing.
Playing after a while, this error was shown together with a "please help" vlc screen ( I was running on localhost, so a real vlc player openned to me).
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[00007f2854002358] xcb_window window error: X server failure
Play only starts the queue, but don't resume if the player is paused.
Player now only play one file at a time.
Is should be able to receive a list of files and play all of them.
Futhermore, the methods next and previus should be implemented.
Create a white noise alternative
Maybe we can integrate this: https://developer.spotify.com/web-api/tutorial/ ?
It would be useful here in this http://stackoverflow.com/questions/32434032/remote-control-an-android-music-player-with-restful-api-webservice
The ultimate goal is to display it in a html page through flask also.
When adding a directory that contains other dirs or files, the vlc breaks.
Files added to stage must be filtered with the same filter used to display it.
We are using :
entry.replace("_","/")
To transform url to path and the other way around.
This must be in only one place.
Webservice is a mess.
It has multiple controls regarding player, volume, upload, playing queue.
It can be splited into other files, which shall use the same flask app.
the webservice it self should handle static files, debugs like map and the "/".
If #7 is done, it can be done with reduced manual testing.
Fix html for posting to correct uri.
Stop refreshing page every time a action (POST, PUT) is perforrmed. Instead, the javascript must do the PUT/POST/GET/DELETE without changing the page.
A update must run every 1, 5, 10 seg (?) to keep information updated.
The upload/adddir may be always available in the interface.
Verify and test latin symbols. Now flask is breaking, but who knows what else...
https://github.com/kombai/freewall provides a better interface for the example html player.
Html must be responsive.
Stage is cleared only when restarting.
check if entry is a URL, if so, play it without searching file system.
doing it in the same endpoint is better.
Some directories are persistent and must not be configured through rest interface.
We shall create a config file, with a default location and a option in the command line interface.
A script to create the directories (url and playlist for now).
Config file can be a simple python file.
When using supervisor.
I've seen this on the logs:
[00007f8f080ee188] pulse audio output error: PulseAudio server connection failure: Connection refused
It should be checked
Create integration with supervisor, so it can run as a (usermode) system service.
This can be helpfull for using it on a raspi as music player.
Check this for start:
https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps
Check available2.html for alternatives.
Create a end point in which the music may be POSTed, so users can upload music to the player.
It would be good limiting upload sizes or directory size.
Serve icons, images and html
@app.route('/js/path:path')
def send_js(path):
return send_from_directory('js', path)
http://stackoverflow.com/questions/20646822/how-to-serve-static-files-in-flask
O seguinte código permite a criação e execução
x = vlc.MediaListPlayer()
y = vlc.MediaList()
y.add_media("test_files/DOt_-05-IMF.mp3")
y.add_media("test_files/DOt-05-_IMF.mp3")
x.set_media_list(y)
x.play()
x.next()
x.next()
%hist
A idéia é que isso seja incorporado ao player, e se o arquivo for um arquivo .m3u, então ele ira lê-lo em e criar a estrutura acima, senão, seguirá o comportamento padrão.
Readme Logo is ugly in PyPi
Create an minimalist html player (without playlist support ) using these icons 👍
http://quarktheme.com/typography-icons/
Check for all mp3 in a given URL ( or set of URLs ) and create a playlist based on it.
If it's recursive, it would be better, but can be a problem.
this may help:
player.player.get_media().get_meta(0)
Add new functions to play queue:
Maybe the "stage" can became a class separating concerns from webservice.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.