Changeset 834182
- Timestamp:
- 01/07/2014 02:01:10 AM (12 years ago)
- Location:
- secure-html5-video-player/trunk
- Files:
-
- 40 added
- 5 deleted
- 3 edited
-
flowplayer/LICENSE.md (added)
-
flowplayer/LICENSE.txt (deleted)
-
flowplayer/README.txt (deleted)
-
flowplayer/embed.min.js (added)
-
flowplayer/example (deleted)
-
flowplayer/flowplayer-3.2.7.swf (deleted)
-
flowplayer/flowplayer.controls-3.2.5.swf (deleted)
-
flowplayer/flowplayer.js (added)
-
flowplayer/flowplayer.min.js (added)
-
flowplayer/flowplayer.swf (added)
-
flowplayer/index.html (added)
-
flowplayer/skin (added)
-
flowplayer/skin/all-skins.css (added)
-
flowplayer/skin/functional.css (added)
-
flowplayer/skin/img (added)
-
flowplayer/skin/img/black.png (added)
-
flowplayer/skin/img/black@x2.png (added)
-
flowplayer/skin/img/black_rtl.png (added)
-
flowplayer/skin/img/black_rtl@x2.png (added)
-
flowplayer/skin/img/flowplayer.png (added)
-
flowplayer/skin/img/flowplayer@2x.png (added)
-
flowplayer/skin/img/play_black.png (added)
-
flowplayer/skin/img/play_black@x2.png (added)
-
flowplayer/skin/img/play_black_rtl.png (added)
-
flowplayer/skin/img/play_black_rtl@x2.png (added)
-
flowplayer/skin/img/play_white.png (added)
-
flowplayer/skin/img/play_white@x2.png (added)
-
flowplayer/skin/img/play_white_rtl.png (added)
-
flowplayer/skin/img/play_white_rtl@x2.png (added)
-
flowplayer/skin/img/playful_black.png (added)
-
flowplayer/skin/img/playful_black@x2.png (added)
-
flowplayer/skin/img/playful_black_rtl.png (added)
-
flowplayer/skin/img/playful_black_rtl@x2.png (added)
-
flowplayer/skin/img/playful_white.png (added)
-
flowplayer/skin/img/playful_white@x2.png (added)
-
flowplayer/skin/img/playful_white_rtl.png (added)
-
flowplayer/skin/img/playful_white_rtl@x2.png (added)
-
flowplayer/skin/img/white.png (added)
-
flowplayer/skin/img/white@x2.png (added)
-
flowplayer/skin/img/white_rtl.png (added)
-
flowplayer/skin/img/white_rtl@x2.png (added)
-
flowplayer/skin/minimalist.css (added)
-
flowplayer/skin/playful.css (added)
-
languages/secure-html5-video-player-es_ES.mo (added)
-
languages/secure-html5-video-player-es_ES.po (added)
-
readme.txt (modified) (4 diffs)
-
secure-html5-video-player.php (modified) (1 diff)
-
sh5vp-functions.php (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
-
secure-html5-video-player/trunk/readme.txt
r778669 r834182 3 3 Tags: html5, video, player, secure, javascript, m4v, mp4, ogg, ogv, theora, webm, flowplayer, skins, media server, youtube, vimeo, amazon, s3 4 4 Requires at least: 3.0 5 Tested up to: 3. 6.16 Stable tag: 3. 15 Tested up to: 3.8 6 Stable tag: 3.2 7 7 8 8 Secure HTML5 Video Player allows you to play HTML5 video on modern browsers. Videos can be served privately; pseudo-streamed from a secured directory or via S3. … … 88 88 89 89 [video autoplay="yes"] 90 91 ### loop 92 Replay the video from the beginning after it completes playing. 93 94 [video loop="yes"] 95 96 ### controls 97 Enable or disable video playback controls. (Only applies to the "native" skin.) 98 99 [video controls="no"] 90 100 91 101 … … 117 127 == Changelog == 118 128 129 = 3.2 = 130 * Upgraded Flowplayer files to the latest version to resolve a security hole. 131 * Removed option for Flash fall back. Flash fall back now happens automatically, and only for IE 7 and 8. 132 * Added option to turn on controls in HTML5 video player for the native skin setting. 133 * Added Spanish language localization, courtesy of webhostinghub.com. 134 119 135 = 3.1 = 120 136 * Added ability to set the duration time for S3 media lifespan. … … 174 190 == Upgrade Notice == 175 191 192 = 3.2 = 193 Upgraded Flowplayer files to the latest version to resolve a security hole. Removed option for Flash fall back. Flash fall back now happens automatically, and only for IE 7 and 8. Added option to turn on controls in HTML5 video player for the native skin setting. Added Spanish language localization, courtesy of webhostinghub.com. 194 176 195 = 3.1 = 177 196 Added ability to set the duration time for S3 media lifespan. Expanded the S3 server list for current Amazon S3 global regions. Note: The S3 server must be specified to the one that matches the region of the bucket. Added additional help text in the S3 settings tab. -
secure-html5-video-player/trunk/secure-html5-video-player.php
r778669 r834182 5 5 Description: An enhanced video plugin for WordPress built on the VideoJS HTML5 video player library. Settings can be easily configured with a control panel and simplified short codes. Video files can be served from a secured private directory. 6 6 Author: Lucinda Brown, Jinsoo Kang 7 Version: 3. 17 Version: 3.2 8 8 Author URI: http://www.trillamar.com/ 9 9 License: LGPLv3 -
secure-html5-video-player/trunk/sh5vp-functions.php
r778669 r834182 18 18 $secure_html5_video_player_s3_link_expire_units = get_option('secure_html5_video_player_s3_link_expire_units'); 19 19 if (!$secure_html5_video_player_s3_link_expire) { 20 $secure_html5_video_player_s3_link_expire = 28800;20 $secure_html5_video_player_s3_link_expire = 28800; 21 21 } 22 22 else { … … 719 719 _e('Replay the video from the beginning after it completes playing.', 'secure-html5-video-player'); 720 720 print '<br/><br/><code>[video loop="yes"]</code>'; 721 722 print '<h3>controls</h3>'; 723 _e('Enable or disable video playback controls. (Only applies to the "native" skin.)', 'secure-html5-video-player'); 724 print '<br/><br/><code>[video controls="no"]</code>'; 725 721 726 722 727 print '<br/><br/><hr/><br/><label class="title">'; … … 741 746 add_option('secure_html5_video_player_skin', 'tube'); 742 747 add_option('secure_html5_video_player_key_seed', base64_encode(AUTH_KEY)); 743 add_option('secure_html5_video_player_enable_flash_fallback', 'yes');744 748 add_option('secure_html5_video_player_enable_download_fallback', 'yes'); 745 749 … … 749 753 add_option('secure_html5_video_player_default_autoplay', 'no'); 750 754 add_option('secure_html5_video_player_default_loop', 'no'); 755 add_option('secure_html5_video_player_default_controls', 'yes'); 751 756 752 757 add_option('secure_html5_video_player_enable_media_server', 'no'); … … 785 790 delete_option('secure_html5_video_player_default_autoplay'); 786 791 delete_option('secure_html5_video_player_default_loop'); 792 delete_option('secure_html5_video_player_default_controls'); 787 793 788 794 delete_option('secure_html5_video_player_enable_media_server'); … … 818 824 } 819 825 820 if (isset($_REQUEST['secure_html5_video_player_enable_flash_fallback'])821 && $_REQUEST['secure_html5_video_player_enable_flash_fallback'] == 'yes') {822 update_option('secure_html5_video_player_enable_flash_fallback', 'yes');823 }824 else {825 update_option('secure_html5_video_player_enable_flash_fallback', 'no');826 }827 828 826 if (isset($_REQUEST['secure_html5_video_player_enable_download_fallback']) 829 827 && $_REQUEST['secure_html5_video_player_enable_download_fallback'] != '') { … … 863 861 else { 864 862 update_option('secure_html5_video_player_default_loop', 'no'); 863 } 864 865 if (isset($_REQUEST['secure_html5_video_player_default_controls']) 866 && $_REQUEST['secure_html5_video_player_default_controls'] == 'yes') { 867 update_option('secure_html5_video_player_default_controls', 'yes'); 868 } 869 else { 870 update_option('secure_html5_video_player_default_controls', 'no'); 865 871 } 866 872 … … 1009 1015 if ( !function_exists('secure_html5_video_player_options_compatibility') ): 1010 1016 function secure_html5_video_player_options_compatibility() { 1011 $secure_html5_video_player_enable_flash_fallback = ('yes' == get_option('secure_html5_video_player_enable_flash_fallback') ? 'checked="checked"' : '');1012 ?>1013 <input type='checkbox' value="yes" id="secure_html5_video_player_enable_flash_fallback" name='secure_html5_video_player_enable_flash_fallback' <?php print $secure_html5_video_player_enable_flash_fallback ?> />1014 <label class="title" for='secure_html5_video_player_enable_flash_fallback'><?php _e('Enable Flash fallback', 'secure-html5-video-player'); ?></label>1015 <br/>1016 <small><?php _e('If checked, Flowplayer will act as a fallback for non-html5 compliant browsers.', 'secure-html5-video-player'); ?></small>1017 <br/><br/><br/>1018 1019 <?php1020 1017 $secure_html5_video_player_enable_download_fallback = get_option('secure_html5_video_player_enable_download_fallback'); 1021 1018 if ($secure_html5_video_player_enable_download_fallback == '') { … … 1102 1099 1103 1100 1104 1105 1106 1101 if ( !function_exists('secure_html5_video_player_options_form_media_server') ): 1107 1102 function secure_html5_video_player_options_form_media_server() { … … 1137 1132 $secure_html5_video_player_default_autoplay = ('yes' == get_option('secure_html5_video_player_default_autoplay') ? 'checked="checked"' : ''); 1138 1133 $secure_html5_video_player_default_loop = ('yes' == get_option('secure_html5_video_player_default_loop') ? 'checked="checked"' : ''); 1134 $secure_html5_video_player_default_controls = ('no' != get_option('secure_html5_video_player_default_controls') ? 'checked="checked"' : ''); 1139 1135 ?> 1140 1136 <label class="title" for='secure_html5_video_player_default_width'><?php _e('Default width', 'secure-html5-video-player'); ?></label><br/> … … 1191 1187 '<b>no</b>' 1192 1188 ); ?></small> 1189 <br/><br/> 1190 1191 <input type='checkbox' value="yes" id="secure_html5_video_player_default_controls" name='secure_html5_video_player_default_controls' <?php print $secure_html5_video_player_default_controls ?> /> 1192 <label class="title" for='secure_html5_video_player_default_controls'><?php _e('Video Player Controls', 'secure-html5-video-player'); ?></label> 1193 <br/> 1194 <small><?php 1195 printf( 1196 __('If checked, the video player will show playback controls by default. Can be overrided by setting the %1$s attribute in the short tag to %2$s or %3$s.', 'secure-html5-video-player'), 1197 '<b>controls</b>', 1198 '<b>yes</b>', 1199 '<b>no</b>' 1200 ); ?></small> 1201 <br/><br/> 1193 1202 <?php 1194 1203 } … … 1219 1228 } 1220 1229 endif; 1221 1222 1223 1224 1230 1225 1231 … … 1456 1462 function secure_html5_video_player_add_header() { 1457 1463 global $secure_html5_video_player_is_android; 1464 global $secure_html5_video_player_is_ios; 1458 1465 global $secure_html5_video_player_is_explorer7; 1459 1466 global $secure_html5_video_player_is_explorer8; 1460 global $secure_html5_video_player_is_ios; 1461 if ($secure_html5_video_player_is_explorer7 || $secure_html5_video_player_is_explorer8 1462 || $secure_html5_video_player_is_ios || $secure_html5_video_player_is_android) { 1467 if ($secure_html5_video_player_is_ios || $secure_html5_video_player_is_android) { 1468 return; 1469 } 1470 else if ($secure_html5_video_player_is_explorer7 || $secure_html5_video_player_is_explorer8) { 1471 $plugin_dir = plugins_url('secure-html5-video-player'); 1472 print "<link rel='stylesheet' type='text/css' href='{$plugin_dir}/flowplayer/skin/minimalist.css'/>"; 1473 print "<script type='text/javascript' src='{$plugin_dir}/flowplayer/flowplayer.min.js'></script>"; 1463 1474 return; 1464 1475 } … … 1506 1517 'autoplay' => get_option('secure_html5_video_player_default_autoplay'), 1507 1518 'loop' => get_option('secure_html5_video_player_default_loop'), 1519 'controls' => get_option('secure_html5_video_player_default_controls'), 1508 1520 'youtube' => '', 1509 1521 'vimeo' => '' … … 1740 1752 $loop_attribute = ""; 1741 1753 } 1754 1755 if ($controls != 'no' && $controls != 'false') { 1756 $controls_attribute = 'controls="controls"'; 1757 } 1758 else { 1759 $controls_attribute = ""; 1760 } 1742 1761 1743 1762 $video_tag_skin = ''; … … 1745 1764 $video_tag_skin = $secure_html5_video_player_skin . '-css'; 1746 1765 } 1747 $video_tag .= "<div class='video-js-box sh5vp-video-box {$video_tag_skin}' >\n";1766 $video_tag .= "<div class='video-js-box sh5vp-video-box {$video_tag_skin}' >\n"; 1748 1767 1749 1768 if ($secure_html5_video_player_is_ios || $secure_html5_video_player_is_android) { 1750 1769 // iOS and Android devices 1751 $video_tag .= "<video class='video-js sh5vp-video' onClick='this.play();' width='{$width}' height='{$height}' {$poster_attribute} controls=\"controls\"{$preload_attribute} {$autoplay_attribute} {$loop_attribute} >\n";1770 $video_tag .= "<video class='video-js sh5vp-video' onClick='this.play();' width='{$width}' height='{$height}' {$poster_attribute} {$controls_attribute} {$preload_attribute} {$autoplay_attribute} {$loop_attribute} >\n"; 1752 1771 if ($mp4_source) { 1753 1772 $video_tag .= "{$mp4_source}\n"; … … 1755 1774 $video_tag .= "</video>\n"; 1756 1775 } 1757 else if ( 1758 ($secure_html5_video_player_is_firefox && $mp4 && !$ogg && 'native' == $secure_html5_video_player_skin) 1759 || 1760 (($secure_html5_video_player_is_explorer7 || $secure_html5_video_player_is_explorer8) && $mp4) 1761 ) { 1776 else if (($secure_html5_video_player_is_explorer7 || $secure_html5_video_player_is_explorer8) && $mp4) { 1762 1777 // IE 7 or IE 8 1763 $video_tag .= "<object id='{$object_tag_id}' class='vjs-flash-fallback' "; 1764 $video_tag .= " width='{$width}' height='{$height}' type='application/x-shockwave-flash' data='{$plugin_dir}/flowplayer/flowplayer-3.2.7.swf'>\n"; 1765 $video_tag .= "<param name='movie' value='{$plugin_dir}/flowplayer/flowplayer-3.2.7.swf' />\n"; 1766 $video_tag .= "<param name='wmode' value='transparent' />\n"; 1767 $video_tag .= "<param name='allowfullscreen' value='true' />\n"; 1768 $video_tag .= "<param name='flashvars' value='config={\"playlist\":[ $flow_player_poster {\"url\": \"" . urlencode($mp4) . "\" $flow_player_autoplay $flow_player_preload }]}' />\n"; 1769 $video_tag .= "{$image_fallback}\n"; 1770 $video_tag .= "</object>\n"; 1771 1778 $video_tag .= "<div class='flowplayer' data-swf='{$plugin_dir}/flowplayer/flowplayer.swf' data-ratio='" . (1.0 * $height / $width) . "'>"; 1779 $video_tag .= "<video width='{$width}' height='{$height}' {$controls_attribute} {$preload_attribute} {$autoplay_attribute} {$loop_attribute} >\n"; 1780 if ($mp4_source) { 1781 $video_tag .= "{$mp4_source}\n"; 1782 } 1783 $video_tag .= "</video>\n"; 1784 $video_tag .= "</div>"; 1772 1785 if ('always' == $secure_html5_video_player_enable_download_fallback) { 1773 1786 $video_tag .= "<p class='sh5vp-download-links'><label>Download Video:</label>\n"; … … 1786 1799 else { 1787 1800 // everything else 1788 $video_tag .= "<video class='video-js sh5vp-video' width='{$width}' height='{$height}' {$poster_attribute} controls=\"controls\" {$preload_attribute} {$autoplay_attribute} {$loop_attribute} >\n"; 1801 $video_tag .= "<video class='video-js sh5vp-video' width='{$width}' height='{$height}' {$poster_attribute} {$controls_attribute} {$preload_attribute} {$autoplay_attribute} {$loop_attribute} >\n"; 1802 if ($webm_source) { 1803 $video_tag .= "{$webm_source}\n"; 1804 } 1805 if ($ogg_source) { 1806 $video_tag .= "{$ogg_source}\n"; 1807 } 1789 1808 if ($mp4_source) { 1790 1809 $video_tag .= "{$mp4_source}\n"; 1791 1810 } 1792 if ($webm_source) {1793 $video_tag .= "{$webm_source}\n";1794 }1795 if ($ogg_source) {1796 $video_tag .= "{$ogg_source}\n";1797 }1798 1811 if ($count_file_exists == 0) { 1799 1812 $video_tag .= "<!-- " . __('file not found', 'secure-html5-video-player') . ": {$secure_html5_video_player_video_dir}/{$file} -->\n"; 1800 1813 } 1801 1802 if ('yes' == get_option('secure_html5_video_player_enable_flash_fallback') && $mp4) {1803 //Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class.1804 $video_tag .= "<object id='{$object_tag_id}' class='vjs-flash-fallback' ";1805 $video_tag .= " width='{$width}' height='{$height}' type='application/x-shockwave-flash' data='{$plugin_dir}/flowplayer/flowplayer-3.2.7.swf'>\n";1806 $video_tag .= "<param name='movie' value='{$plugin_dir}/flowplayer/flowplayer-3.2.7.swf' />\n";1807 $video_tag .= "<param name='wmode' value='transparent' />\n";1808 $video_tag .= "<param name='allowfullscreen' value='true' />\n";1809 $video_tag .= "<param name='flashvars' value='config={\"playlist\":[ $flow_player_poster {\"url\": \"" . urlencode($mp4) . "\" $flow_player_autoplay $flow_player_preload }]}' />\n";1810 $video_tag .= "{$image_fallback}\n";1811 $video_tag .= "</object>\n";1812 }1813 1814 $video_tag .= "</video>\n"; 1814 1815 1815 1816 //Download links provided for devices that can't play video in the browser. 1816 1817 if ('no' != $secure_html5_video_player_enable_download_fallback) { 1817 1818 $can_play_provided = secure_html5_video_player_can_play($mp4_link, $ogg_link, $webm_link); 1818 if ('native' == $secure_html5_video_player_skin) { 1819 if (! $can_play_provided || 'always' == $secure_html5_video_player_enable_download_fallback) { 1820 $video_tag .= "<p class='sh5vp-download-links'><label>Download Video:</label>\n"; 1821 if ($mp4_link) { 1822 $video_tag .= "{$mp4_link}\n"; 1823 } 1824 if ($webm_link) { 1825 $video_tag .= "{$webm_link}\n"; 1826 } 1827 if ($ogg_link) { 1828 $video_tag .= "{$ogg_link}\n"; 1829 } 1830 $video_tag .= "</p>\n"; 1831 } 1832 } 1833 else { 1834 $video_tag .= "<p class='vjs-no-video'><label>Download Video:</label>\n"; 1819 if (! $can_play_provided || 'always' == $secure_html5_video_player_enable_download_fallback) { 1820 $video_tag .= "<p class='sh5vp-download-links'><label>Download Video:</label>\n"; 1835 1821 if ($mp4_link) { 1836 1822 $video_tag .= "{$mp4_link}\n"; … … 1865 1851 } 1866 1852 } 1867 1868 1853 return $video_tag; 1869 1854 } … … 2065 2050 2066 2051 2067 2068 2052 if ( !function_exists('secure_html5_video_player_can_play') ): 2069 2053 function secure_html5_video_player_can_play($has_mp4, $has_ogg, $has_webm) { 2070 2054 global $secure_html5_video_player_is_chrome; 2071 2055 global $secure_html5_video_player_is_firefox; 2072 2073 2056 $can_play_mp4 = TRUE; 2074 2057 $can_play_ogg = FALSE; … … 2081 2064 $can_play_mp4 = FALSE; 2082 2065 $can_play_ogg = TRUE; 2066 $can_play_webm = TRUE; 2083 2067 } 2084 2068 return ($has_mp4 && $can_play_mp4) || ($has_ogg && $can_play_ogg) || ($has_webm && $can_play_webm);
Note: See TracChangeset
for help on using the changeset viewer.