WP Jsttyplay – jsttyplay plugin for WordPress

Description

/**
* Plugin Name: WP Jsttyplay
* Plugin URI: https://ba.sozo.ac.jp/myama/home/develop/jsttyplay/
* Description: jsttyplay plugin for WordPress
* Version: 0.1
* Author: Michiru Yamaguchi
* Author URI: https://ba.sozo.ac.jp/myama/
*
* Copyright (c) 2013 Michiru Yamaguchi
*
* As permitted by the BSD License, this work has been retrieved
* from https://github.com/encryptio/jsttyplay and republished here.
*
* WITHOUT ANY WARRANTY
*
* shortcode usage: [jsttyplay url=”tty_file_path”]
* url : required
*
*/

Download

jsttyplay.zip – v0.1, 2013/12/15 20:30 +0900 (JST)
3,973,863 bytes
69a80f88beb8cdca2640f4abe21c6039 md5sum

Options

  • font (Default: fixed-7×13)

Test

  • WordPress 3.6.1

Notice

  • Only one player (i.e. one shortcode) is available in one post/page. The canvas id is embedded. See jsttyplay.php.
  • File extension .tty is added to ‘upload_mimes’ as follows in jsttyplay.php:
    function allow_upload_tty( $mimes ) {
    	$mimes['tty'] = 'image/x-ttyplay'; 
    	return $mimes;
    }
    add_filter( 'upload_mimes', 'allow_upload_tty' );
  • js/vt/font.js:11 – Font path is embedded, dedicated to WordPress plugin.
    var base = “../wp-content/plugins/jsttyplay/fonts/”;
  • “PlayPause” button is disabled(hidden).

ToDo

  • Load .js files through wp_enqueue_script()
  • Github?
  • Playback speed configuration

Demo

No canvas support!