Skip to content

Commit fc63f9e

Browse files
committed
Initial commit
0 parents  commit fc63f9e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+29788
-0
lines changed

.gitattributes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
# Git will always convert line endings to LF on checkout, even on Windows
3+
* text eol=lf
4+
5+
# Denote all files that are truly binary and should not be modified.
6+
*.eot binary
7+
*.ttf binary
8+
*.woff binary
9+
*.png binary
10+
*.jpg bin
11+
*.mp3 binary
12+
*.ogg binary
13+
*.mp4 binary
14+
*.webm binary

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
thirdparty/jwplayer.*
3+
thirdparty/jquery-*.js

LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 University of Washington
4+
5+
Able Player development is supported in part by The AccessComputing project,
6+
with financial support from the National Science Foundation
7+
(grant #CNS-0540615, CNS-0837508, and CNS-1042260);
8+
and by the Committee on Institutional Cooperation (CIC).
9+
10+
Permission is hereby granted, free of charge, to any person obtaining a copy
11+
of this software and associated documentation files (the "Software"), to deal
12+
in the Software without restriction, including without limitation the rights
13+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
copies of the Software, and to permit persons to whom the Software is
15+
furnished to do so, subject to the following conditions:
16+
17+
The above copyright notice and this permission notice shall be included in
18+
all copies or substantial portions of the Software.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26+
THE SOFTWARE.

ableplayer.php

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php
2+
/*
3+
Plugin Name: Able Player
4+
Plugin URI: https://github.com/ableplayer-wordpress
5+
Description: Accessible HTML5 media player
6+
Contributors: terrillthompson
7+
Tags: html5, media, audio, video, accessibility
8+
Version: 0.1
9+
Stable tag: 0.1
10+
Requires at least: 2.6
11+
Tested up to: 4.5
12+
License: MIT
13+
License URI: https://github.com/ableplayer-wordpress/LICENSE
14+
*/
15+
16+
/*
17+
*
18+
* Disable the feature in WordPress that wraps everything (including Able Player code)
19+
* in <p> tags
20+
*
21+
* NOTE: This will affect ALL content on site, and may have undesirable consequences
22+
* Therefore it's commented out by default. Test before using.
23+
*
24+
*
25+
*/
26+
// remove_filter ('the_content', 'wpautop');
27+
28+
/*
29+
*
30+
* load styles and scripts to head
31+
*
32+
*/
33+
34+
function ableplayer_enqueue_scripts(){
35+
36+
// Documentation:
37+
// http://codex.wordpress.org/Function_Reference/wp_enqueue_script
38+
39+
// Register/enqueue common scripts that can be called automatically with just their handles (as of WP 3.5)
40+
wp_enqueue_script( 'jquery' );
41+
42+
// Register/enqueue other dependencies
43+
wp_enqueue_script( 'modernizer', plugins_url('thirdparty',__FILE__).'/modernizr.custom.js');
44+
wp_enqueue_script( 'js-cookie', plugins_url('thirdparty',__FILE__).'/js.cookie.js',array('jquery'));
45+
46+
// Register/enqueue Able Player script
47+
wp_enqueue_script( 'ableplayer', plugins_url('build',__FILE__).'/ableplayer.js',array('jquery'));
48+
49+
// Register/enqueue Able Player CSS (two options; uncomment the one you prefer)
50+
51+
// Use minimized CSS that's included in Able Player build
52+
// wp_enqueue_style( 'ableplayer', plugins_url('build',__FILE__).'/ableplayer.min.css');
53+
54+
// Use human-readable CSS if you intend to change the styles and customize the player
55+
wp_enqueue_style( 'ableplayer', plugins_url('styles',__FILE__).'/ableplayer.css');
56+
57+
}
58+
add_action( 'wp_enqueue_scripts', 'ableplayer_enqueue_scripts');
59+
60+
function ableplayer_head() {
61+
62+
// add a variable that points to the current plugin directory
63+
echo "<script>\n";
64+
echo 'var pluginUrl = "'.plugins_url('',__FILE__).'";'."\n";
65+
echo "</script>\n";
66+
}
67+
add_action('wp_head','ableplayer_head',3);
68+
?>

0 commit comments

Comments
 (0)