|
3 years ago | |
---|---|---|
application | 3 years ago | |
assets | 3 years ago | |
system | 3 years ago | |
.htaccess | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
composer.json | 3 years ago | |
index.php | 3 years ago |
Viewer for yaku.moe file archive in the format of an old fashioned TV with the ability to randomly browse the content.
This project aims to provide a simple and fun way of displaying archived content from yaku.moe, allowing the user to randomly go through the content, as well as by directly choosing a file from the menu.
This viewer is currently available at http://tv.yaku.moe.
The viewer is currently used with another application for serverside administration and file upload. As such, it does not provide a backend or file upload capabilities on its own. You will have to provide those functionalities some other way.
Setting up the viewer is simple.
The viewer obtains its content from the assets directory and its subdirectories. The repository provides a few example files for testing purposed, but any further content is up to you to provide. Content is divided into subdirectories based on their type:
Supported audio files are mp3, ogg and wav. The viewer supports displaying background pictures with audio files, these are stored in the backgrounds subdirectory. Background pictures can be in any picture format supported by the browser, including gifs. Background images are stored with the .bg file extension (simply rename them), and should have the same filename as the audio file they are to be used with (example: test.mp3.bg will be used as a background for test.mp3).
Supported video files are webm, mpg, mpeg, mp4, and ogv. By default the viewer will attempt to cover the viewable area with the video, cutting off anything wider or taller. This behavior can be changed in the css file, by changing the object-fit property in #content video.
Only supports swf files. The browser will require flash to be installed in order to view these. Flash animations may not fit properly if they weren’t made for viewing in a 4:3 rectangle.
Supported image files are jpeg, jpg, png and gif. In contrast to video files, the viewer will attempt to display the complete image in the viewable area, showing black bars on the sides if the image is wider or taller. Likewise, this behavior can be changed in the css by changing the object fit property in #content img.
Currently not yet implemented, links are text files containing a url to a website or other kind of resource. This will allow for viewing of content hosted elsewhere.
Additionally, you may specify filters as text files, to be placed in the filters subdirectory. These filters can be used from the viewer’s menu to only use specific content with the randomize-button. Filter lists are simple .txt files that contain a list of filenames (including extension) that should be whitelisted, with 1 filename per line.
How you upload files to the assets folder and its subdirectories is up to you. This can be done in many ways:
Additionally, the subdirectories can be turned into symbolic links that point to other directories on the server, in case you store your files elsewhere. However make sure that the link targets are available, to prevent erroneous behavior.
The XSendFile module for Apache/NGinx is used to allow file downloads. Before this will work on your server, you should open the application/views/xsendfile.php file and check that the directory path in the header is set correctly. It should point to the folder where you cloned the repository.
Error detection is still lacking when fetching content. Although missing files and erroneous requests should show up as proper errors, timeouts and connection errors may not show up as expected. PHP errors are not checked for, and may botch up otherwise proper JSON replies.
Additionally, the implementation for filters is still being tested. Certain combinations of filters and filetype options cause php errors that still need to be resolved.
The viewer is currently capable of displaying audio, video, images and flash animations as content.
To navigate the content, users can use the upper dial on the tv to randomly go through the content, as wel as moving forwards and backwards through it. Secondly, the upper-right button will open/close a menu with additional options:
While viewing content, the url in the browser’s address bar will change to reflect what file is being viewed. This also makes is simple to copy the link for sharing to other people.
Planned for the future are the following:
This project uses the GPLv2 License. View the LICENSE file for more information on what this means.