Archive Frontend for yaku.moe's archive API.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
frosty 9813483ac4 Merge branch 'master' of https://git.yaku.moe/herrfristy/Archive-TV 3 years ago
application Few cleanups in the code. 3 years ago
assets Few cleanups in the code. 3 years ago
system Initial commit of all current project files. 3 years ago
.htaccess Initial commit of all current project files. 3 years ago
LICENSE Initial commit 3 years ago
README.md Update 'README.md' 3 years ago
composer.json Initial commit of all current project files. 3 years ago
index.php Initial commit of all current project files. 3 years ago

README.md

Archive-TV

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.

Live example

This viewer is currently available at http://tv.yaku.moe.

Requirements

  • Apache Webserver with PHP 5.4 or above (PHP7.0+ preferred)
  • PHP’s mcrypt module should be enabled.
  • Apache Rewrite module (to allow the ommission of index.php from the url)
  • Apache XSendFile module (to allow for downloading the content)
  • Apache must be configured to allow .htaccess files.

Notes before you start

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.

Getting started

Setting up the viewer is simple.

Initial Setup

  1. Git clone this repository to the webdirectory you wish to place the files, making sure that the location is reachable by webbrowser.
  2. Edit application/config/config.php and configure the base_url entry to point to the url where you cloned the repository.
  3. Edit assets/js/archive.js and configure the baseurl variable on top to also point to the previously mentioned url.
  4. Visit the url and check if the viewer functions properly. Make sure you configured the webserver and PHP correctly as described in the Requirements section above.

Setting up the content

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:

  • audio

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).

  • video

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.

  • flash

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.

  • images

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.

  • links

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.

File upload suggestions

How you upload files to the assets folder and its subdirectories is up to you. This can be done in many ways:

  • FTP/SFTP
  • network share (SMB/CIFS, NFS)
  • web access to the directory from another website

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.

Dealing with XSendFile

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.

Currently known bugs

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.

Features

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:

  1. Content list, displaying all available content. Searching through the content is also possible.
  2. Effects list, shows available overlay effects, such as scanlines or static.
  3. Filters list, shows the available filters from the filters subdirectory. These act as whitelists for the randomize button. Selecting none will allow all content to be used.
  4. Filetypes list, shows what filetypes to be used with the randomize button. These act as whitelists for filetypes, rather than specific files.
  5. Download button, which will download whatever content is currently showing.

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 Features

Planned for the future are the following:

  • Administrative backend, that will allow for organizing the available content and uploading new content, as well as setting up filter lists.
  • Implementation for the link filetype, allowing the use of remote content.
  • Theme support, so to allow different looks for the viewer and users to choose between them.
  • Turn the upper-left button to an on/off switch (purely cosmetical feature that has no real use)

License

This project uses the GPLv2 License. View the LICENSE file for more information on what this means.