[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
www fry/happy-birthday-to-gnu-cortado.html serv...
From: |
Pavel Kharitonov |
Subject: |
www fry/happy-birthday-to-gnu-cortado.html serv... |
Date: |
Thu, 25 Apr 2013 14:42:44 +0000 |
CVSROOT: /web/www
Module name: www
Changes by: Pavel Kharitonov <ineiev> 13/04/25 14:42:44
Removed files:
fry : happy-birthday-to-gnu-cortado.html
server : cortado.jar ogg.js
Log message:
Remove unused files RT #825172.
CVSWeb URLs:
http://web.cvs.savannah.gnu.org/viewcvs/www/fry/happy-birthday-to-gnu-cortado.html?cvsroot=www&r1=1.7&r2=0
http://web.cvs.savannah.gnu.org/viewcvs/www/server/cortado.jar?cvsroot=www&r1=1.1&r2=0
http://web.cvs.savannah.gnu.org/viewcvs/www/server/ogg.js?cvsroot=www&r1=1.4&r2=0
Patches:
Index: fry/happy-birthday-to-gnu-cortado.html
===================================================================
RCS file: fry/happy-birthday-to-gnu-cortado.html
diff -N fry/happy-birthday-to-gnu-cortado.html
--- fry/happy-birthday-to-gnu-cortado.html 9 Feb 2013 06:09:46 -0000
1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,277 +0,0 @@
-<!--#include virtual="/server/header.html" -->
-
-<title>Stephen Fry — Happy birthday to GNU — The GNU Operating
System</title>
-
-<meta http-equiv="Keywords" content="GNU, FSF, Free Software Foundation,
Linux, Emacs, GCC, Unix, Free Software, Operating System, GNU Kernel, HURD, GNU
HURD, Hurd" />
-<meta http-equiv="Description" content="Since 1983, developing the free Unix
style operating system GNU, so that computer users can have the freedom to
share and improve the software they use." />
-<link rel="alternate" title="What's New"
href="http://www.gnu.org/rss/whatsnew.rss" type="application/rss+xml" />
-<link rel="alternate" title="New Free Software"
href="http://www.gnu.org/rss/quagga.rss" type="application/rss+xml" />
-<style type="text/css">
-
-.inline {text-align: center; line-height: 4em; padding: 0; margin: 0
!important; margin-bottom: 1em !important;}
-
-.inline li{list-style: none; display: inline; }
-
-#download li a{background-color:#1ea410; padding: 1em 3em 1em 3em;
-moz-border-radius: 8px; color: white; font-weight: bold; margin: 0.4em;
text-decoration: none; width: 23%; text-align: center;}
-
-#download a:hover{background-color: #b1ef0b; color: black;}
-
-.title{font-size: 180%;}
-
-td p{padding-left: 1em; padding-right: 1em;}
-
-td li, td p{font-size: 0.8em;}
-
-.formHelp{text-align: center; color: #666; font-size: 90%;}
-
-table{margin-bottom: 0.8em !important;}
-
-#sjf{width: 600px; margin: 0 auto 1em auto;}
-
-</style>
-
-<script type="text/javascript" src="http://www.gnu.org/server/ogg.js"></script>
-<script type="text/javascript">
-wgOggPlayer.msg = {"ogg-play": "Play", "ogg-pause": "Pause", "ogg-stop":
"Stop", "ogg-no-player": "Sorry, your system does not appear to have any
supported player software.\nPlease \x3ca
href=\"http://www.fsf.org/resources/formats/playogg/vlc\"\x3edownload a
player\x3c/a\x3e.", "ogg-player-videoElement": "Native browser support",
"ogg-player-oggPlugin": "Browser plugin", "ogg-player-cortado": "Cortado
(Java)", "ogg-player-vlc-mozilla": "VLC", "ogg-player-vlc-activex": "VLC
(ActiveX)", "ogg-player-quicktime-mozilla": "QuickTime",
"ogg-player-quicktime-activex": "QuickTime (ActiveX)", "ogg-player-totem":
"Totem", "ogg-player-kaffeine": "Kaffeine", "ogg-player-kmplayer": "KMPlayer",
"ogg-player-mplayerplug-in": "mplayerplug-in", "ogg-player-thumbnail": "Still
image only", "ogg-player-selected": "(selected)", "ogg-use-player": "Use
player: ", "ogg-more": "More…", "ogg-download": "Download file",
"ogg-desc-link": "About this file", "ogg-dismiss": "Close",
"ogg-player-soundthumb": "No player", "ogg-no-xiphqt": "You do not appear to
have the XiphQT component for QuickTime.\nQuickTime cannot play Ogg files
without this component.\nPlease \x3ca
href=\"http://www.fsf.org/resources/formats/playogg/vlc\"\x3edownload
VLC\x3c/a\x3e or choose another player."};
-wgOggPlayer.cortadoUrl = "http://ftp.gnu.org/video/cortado.jar";
-wgOggPlayer.extPathUrl = "/server";
-</script>
-<style type="text/css">
-.ogg-player-options {
- border: solid 1px #ccc;
- padding: 2pt;
- text-align: left;
- font-size: 10pt;
-}
-</style>
-
-
-<!--#include virtual="/server/banner.html" -->
-
-<h2 class="center">Freedom Fry — “Happy birthday to GNU”</h2>
-
-<div id="ogg_player_1" style="width: 600px; margin: 0 auto 1em auto;">
-
-<div><a href="#" onclick="wgOggPlayer.init(false, {"id":
"ogg_player_1", "videoUrl":
"http://ftp.gnu.org/video/Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv",
"width": 600, "height": 336, "length": 1331,
"linkUrl":
"http://ftp.gnu.org/video/Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv",
"isVideo": true});" style="width: 600px; text-align: center"
title="Play video" class="image"><img src="http://ftp.gnu.org/video/fry720.jpg"
width="600" height="333" alt="Mr. Stephen Fry introduces you to free software,
and reminds you of a very special birthday." /></a></div>
-
-<div><button onclick="wgOggPlayer.init(false, {"id":
"ogg_player_1", "videoUrl":
"http://ftp.gnu.org/video/Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv",
"width": 600, "height": 336, "length": 1331,
"linkUrl":
"http://ftp.gnu.org/video/Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv",
"isVideo": true});" style="width: 600px; text-align: center"
title="Play video"><img src="/server/play.png" width="22" height="22" alt="Play
video" /></button></div>
-</div>
-
-<p class="center">Mr. Stephen Fry introduces you to free software, and reminds
you of a very special birthday.</p>
-
-<ul class="inline" id="download">
-<li><a href="happy-birthday-to-gnu-download.html">Download video</a></li>
-<li><a href="http://www.gnewsense.org/">Download gNewSense</a></li>
-<li><a href="http://www.fsf.org/news/freedom-fry/">Press release</a></li>
-</ul>
-
-<h4 class="center"><a href="happy-birthday-to-gnu-in-your-language.html">Over
20 translations of the film now available</a></h4>
-
-<p class="center"><a href="happy-birthday-to-gnu-translation.html">Help
translate the video into your own language</a> and <a
href="happy-birthday-to-gnu-credits.html">full credits</a></p>
-
-<p class="center"><small>Licensed under a <a rel="license"
-href="http://creativecommons.org/licenses/by-nd/3.0/us/">Creative
-Commons Attribution-No Derivative Works 3.0 United States
-License</a>.</small></p>
-
-<p class="center"><a
href="http://onebigtorrent.org/torrents/3899/Happy-Birthday-to-GNU">Help share
this movie by BitTorrent</a>.</p>
-
-<div class="visualClear"></div>
-
-<p class="center"><a style="font-weight: bold;" href="#signup"><span style="
padding: 5px;" class="highlight">Sign up for the Free Software Supporter, a
monthly update on GNU and the FSF</span></a></p>
-
-<table width="100%" style="height: 200;">
-<tr>
-<td style="width: 66%; border-right: 1px solid #333;">
-<h2>Get involved with GNU!</h2>
-
-<p>We started the GNU Project with a specific overall goal: to create
-a free software operating system, the GNU System. The scope of GNU is
-far-reaching: any job that computer users want to
-do <a href="http://www.gnu.org/gnu/gnu-history.html">should be doable
-by free software</a>, and is thus a potential part of GNU. For
-instance, any program found in a typical <a href="/distros">GNU/Linux
-distribution</a> is a candidate.</p>
-
-<p>So we welcome new packages in GNU, to further our common cause of
-free software. If you want to join in and may have a suitable package,
-please fill out this <a href="/help/evaluation.html">short
-questionnaire</a> to get started, and see the background information
-there. The <a href="http://directory.fsf.org/">Free Software
-Directory</a> holds the <a href="http://directory.fsf.org/wiki/GNU/">list of
-all current GNU packages</a>.</p>
-
-<p>Another important way to help GNU is by contributing to the existing
-GNU projects. The <a
-href="http://savannah.gnu.org/people/?type_id=1">GNU Help Wanted</a>
-list is the general task list for GNU software. You might also consider
-taking over one of the <a
-href="/server/takeaction.html#unmaint">unmaintained GNU packages</a>.
-The general <a href="/help/help.html">Help GNU</a> page includes many
-non-technical ways to contribute, too.</p>
-
-<p>If you possess the skills of a webmaster, you might like to consider
helping on this website — <a
href="/server/standards/webmaster-quiz.html">please take our webmaster
quiz</a>.</p>
-
-<p>Our server <a href="http://savannah.gnu.org/">savannah.gnu.org</a>
-is a central point for development and maintenance of free software,
-and
-many <a
href="https://savannah.nongnu.org/search/?type_of_search=soft&words=%%%&type=1">GNU
-projects are hosted at savannah</a>. Savannah also welcomes and
-supports free software projects that are not official GNU packages, so
-feel free to use it for any of your free software work; unlike other
-hosting
-sites, <a href="http://www.fsf.org/blogs/community/savannah">savannah
-is firmly based on free software ideals</a>.</p>
-
-
-</td>
-<td style="width: 33%;">
-
-<h3>Support the FSF</h3>
-
-<p class="center"><img src="http://www.gnu.org/graphics/logo-fsf.org-tiny.png"
- width="85%" alt="" /></p>
-
-<p>Your <a href="https://www.fsf.org/associate/support_freedom?">charitable
-donation</a> to the FSF helps to support, promote, and develop free
-software:</p>
-
-<ul>
-<li><a href="http://www.gnu.org/">GNU Project</a> — Developing a
complete free software operating system</li>
-<li><a href="http://www.fsf.org/licensing/">Licensing & Compliance Lab</a>
— Stewardship and enforcement of the GNU General Public License</li>
-<li><a href="http://directory.fsf.org/">Free Software Directory</a> —
Cataloging the world of free software</li>
-<li><a href="http://savannah.gnu.org/">Savannah Community</a> —
Supporting free software developers</li>
-<li><a href="http://www.fsf.org/campaigns/">Campaigns for Freedom</a> —
Earning mindshare in support of free software</li>
-</ul>
-</td>
-</tr>
-</table>
-
-<h2 style="margin-bottom: 1em;"><a
href="http://www.fsf.org/register_form?referrer=2442">Join the FSF today!</a>
or <a href="https://www.fsf.org/associate/support_freedom/donate">Make a
donation</a></h2>
-
-<div class="visualClear"></div>
-
-<table width="100%" style="height: 200; border-top: 2px solid #333;
border-bottom: 2px solid #333;" id="signup">
-<tr>
-<td style="width: 33%; background-color: whitesmoke; border-right: 1px solid
#ccc">
-<h3>Philosophy</h3>
-
-<p>Learn more about the philosophy behind free software.</p>
-
-<ul>
-<li><a href="/philosophy/free-sw.html">What is free software?</a></li>
-<li><a href="/philosophy/open-source-misses-the-point.html">Why "open source"
misses the point</a></li>
-
-</ul>
-
-</td>
-<td style="width: 33%; text-align: center; background-color: #ffb; border: 1px
solid orange; font-size: 80%; margin-bottom: 1em;">
-
- <p class="center big"><strong>Sign up for the <em>Free Software
Supporter</em></strong></p>
-
- <p>A monthly update on GNU and the Free Software Foundation</p>
-
- <form action="http://lists.gnu.org/mailman/subscribe/info-fsf"
- method="post">
-
- <p><input type="text" name="email" size="30" maxlength="80"
value="address@hidden" onfocus="this.value=''" /> <input type="submit"
value="Subscribe me" /></p>
- </form>
-
-</td>
-<td style="width: 33%; background-color: whitesmoke; border-left: 1px solid
#ccc;">
-<h3>Download</h3>
-
-<ul>
- <li>
- <a href="http://www.gnewsense.org/">gNewSense</a>, a GNU/Linux
- distribution based on Debian and Ubuntu, with sponsorship from
- the FSF.
- </li>
-
-
- <li>
- <a href="http://www.blagblagblag.org/">BLAG</a>, BLAG Linux and
- GNU, a GNU/Linux distribution based on Fedora.
- </li>
-
-</ul>
-
-<p><a href="/distros">More GNU distributions</a> and
-a <a href="http://directory.fsf.org/wiki/GNU/">complete list of GNU
-packages</a></p>
-
-</td>
-</tr>
-</table>
-
-<p class="c"></p>
-
-</div>
-</div>
-
-
-<!--#include virtual="/server/footer.html" -->
-<!-- BEGIN copyleft -->
-<div id="footer">
-<!--
- this anchor is referred to from the default
- gendocs_template (available as part of Texinfo) used for
- generating GNU manuals online, so please don't remove it.
--->
-
-<p>
- Copyright © 2008
- <a href="http://www.fsf.org">Free Software Foundation</a>, Inc.</p>
-
-<p>“<a href="/fry/happy-birthday-to-gnu.html">Happy Birthday to
-GNU</a>” is licensed under a <a rel="license"
-href="http://creativecommons.org/licenses/by-nd/3.0/us/">Creative
-Commons Attribution-No Derivative Works 3.0 United States
-License</a>.</p>
-
-<p>Please <a href="http://www.fsf.org/about/contact.html">contact us</a> for
further permissions, including derived works.</p>
-
-<p>Please see the <a
-href="/server/standards/README.translations.html">Translations
-README</a> for information on coordinating and submitting translations
-of this article.</p>
-
-<!--#include virtual="/server/bottom-notes.html" -->
-
-<p>Updated:
-<!-- timestamp start -->
-$Date: 2013/02/09 06:09:46 $
-<!-- timestamp end -->
-</p>
-
-<div id="translations">
-<h4>Translations of this page</h4>
-
-<!-- Please keep this list alphabetical by language code. -->
-<!-- Comment what the language is for each type, i.e. de is German. -->
-<!-- Write the language name in its own language (Deutsch) in the text. -->
-<!-- If you add a new language here, please -->
-<!-- advise address@hidden and add it to -->
-<!-- - /home/www/html/server/standards/README.translations.html -->
-<!-- - one of the lists under the section "Translations Underway" -->
-<!-- - if there is a translation team, you also have to add an alias -->
-<!-- to mail.gnu.org:/com/mailer/aliases -->
-<!-- Please also check you have the language code right; see: -->
-<!-- http://www.loc.gov/standards/iso639-2/php/code_list.php -->
-<!-- If the 2-letter ISO 639-1 code is not available, -->
-<!-- use the 3-letter ISO 639-2. -->
-<!-- Please use W3C normative character entities. -->
-
-<ul class="translations-list">
-<!-- Arabic -->
-<li><a
href="/fry/happy-birthday-to-gnu.ar.html">العربية</a> [ar]</li>
-<!-- English -->
-<li><a href="/fry/happy-birthday-to-gnu.html">English</a> [en]</li>
-<!-- French -->
-<li><a
href="/fry/happy-birthday-to-gnu.fr.html">français</a> [fr]</li>
-</ul>
-</div>
-</div>
-</body>
-</html>
-<!-- END layout -->
Index: server/cortado.jar
===================================================================
RCS file: server/cortado.jar
diff -N server/cortado.jar
Binary files /tmp/cvs28PhkA and /dev/null differ
Index: server/ogg.js
===================================================================
RCS file: server/ogg.js
diff -N server/ogg.js
--- server/ogg.js 4 Dec 2008 18:20:58 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,756 +0,0 @@
-// Copyright (c) Fluendo
-// Copyright (c) Tim Starling
-
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
-
-// This is a global configuration object which can embed multiple video
instances
-var wgOggPlayer = {
- 'detectionDone': false,
- 'msie': false,
- 'safari' : false,
- 'opera' : false,
- 'mozilla': false,
-
- // List of players in order of preference
- // Downpreffed VLC because it crashes my browser all the damn time -- TS
- 'players': ['cortado', 'quicktime-mozilla', 'quicktime-activex',
'vlc-mozilla', 'vlc-activex', 'totem', 'kmplayer', 'kaffeine',
'mplayerplug-in', 'oggPlugin', 'videoElement'],
-
- // Client support table
- 'clientSupports': { 'thumbnail' : true },
-
- // MIME type to be used to invoke a given plugin with <object>
- // May be changed by detect()
- 'mimeTypes' : {
- 'quicktime-mozilla': 'video/quicktime',
- 'quicktime-activex': 'video/quicktime',
- 'vlc-mozilla': 'application/x-vlc-plugin',
- 'oggPlugin': 'application/ogg',
- 'totem': 'application/ogg',
- 'kmplayer': 'application/ogg',
- 'kaffeine': 'application/ogg',
- 'mplayerplug-in': 'application/ogg'
- },
-
- 'savedThumbs': {},
- 'qtTimers' : {},
- // Text for new messages, to support cached HTML invocation
- 'defaultMsg' : {
- 'ogg-player-totem': 'Totem',
- 'ogg-player-kmplayer': 'KMPlayer',
- 'ogg-player-kaffeine': 'Kaffeine',
- 'ogg-player-mplayerplug-in': 'mplayerplug-in'
- },
-
- // Configuration from MW
- 'msg': {},
- 'cortadoUrl' : '',
- 'extPathUrl' : '',
- 'showPlayerSelect': true,
- 'controlsHeightGuess': 20,
-
- /**
- * Main entry point: initialise a video player
- * Player will be created as a child of the given ID
- * There may be multiple players in a document.
- * Parameters are: id, videoUrl, width, height, length, linkUrl, isVideo
- */
- 'init': function ( player, params ) {
- elt = document.getElementById( params.id );
-
- // Save still image HTML
- if ( !(params.id in this.savedThumbs) ) {
- var thumb = document.createDocumentFragment();
- for ( i = 0; i < elt.childNodes.length; i++ ) {
- thumb.appendChild( elt.childNodes.item( i
).cloneNode( true ) );
- }
- this.savedThumbs[params.id] = thumb;
- }
-
- this.detect();
-
- if ( !player ) {
- // See if there is a cookie specifying a preferred
player
- var cookieVal = this.getCookie( 'ogg_player' );
- if ( cookieVal && cookieVal != 'thumbnail' ) {
- player = cookieVal;
- }
- }
-
- if ( !this.clientSupports[player] ) {
- player = false;
- }
-
- if ( !player ) {
- for ( var i = 0; i < this.players.length; i++ ) {
- if ( this.clientSupports[this.players[i]] ) {
- player = this.players[i];
- break;
- }
- }
- }
-
- elt.innerHTML = '';
- switch ( player ) {
- case 'videoElement':
- this.embedVideoElement( elt, params );
- break;
- case 'oggPlugin':
- case 'kaffeine':
- case 'totem':
- case 'kmplayer':
- case 'mplayerplug-in':
- this.embedOggPlugin( elt, params, player );
- break;
- case 'vlc-mozilla':
- this.embedVlcPlugin( elt, params );
- break;
- case 'vlc-activex':
- this.embedVlcActiveX( elt, params );
- break;
- case 'cortado':
- this.embedCortado( elt, params );
- break;
- case 'quicktime-mozilla':
- case 'quicktime-activex':
- this.embedQuicktimePlugin( elt, params, player
);
- break;
- case 'thumbnail':
- default:
- if ( params.id in this.savedThumbs ) {
- elt.appendChild(
this.savedThumbs[params.id].cloneNode( true ) );
- } else {
- elt.appendChild(
document.createTextNode( 'Missing saved thumbnail for ' + params.id ) );
- }
- if ( player != 'thumbnail' ) {
- var div = document.createElement( 'div'
);
- div.className = 'ogg-player-options';
- div.style.cssText = 'width: ' + (
params.width - 10 ) + 'px;';
- div.innerHTML =
this.msg['ogg-no-player'];
- elt.appendChild( div );
- player = 'none';
- }
- }
- if ( player != 'thumbnail' ) {
- var optionsBox = this.makeOptionsBox( player, params );
- var optionsLink = this.makeOptionsLink( params.id );
- var div = document.createElement( 'div' );
- div.appendChild( optionsBox );
- div.appendChild( optionsLink );
- elt.appendChild( div );
- }
- },
-
- 'debug': function( s ) {
- //alert(s);
- },
-
- // Detect client capabilities
- 'detect': function() {
- if (this.detectionDone) {
- return;
- }
- this.detectionDone = true;
-
- // First some browser detection
- this.msie = ( navigator.appName == "Microsoft Internet
Explorer" );
- this.mozilla = ( navigator.appName == "Netscape" );
- this.opera = ( navigator.appName == 'Opera' );
- this.safari = ( navigator.vendor && navigator.vendor.substr( 0,
5 ) == 'Apple' );
- this.konqueror = ( navigator.appName == 'Konqueror' );
-
- // In Mozilla, navigator.javaEnabled() only tells us about
preferences, we need to
- // search navigator.mimeTypes to see if it's installed
- var javaEnabled = navigator.javaEnabled();
- // In Opera, navigator.javaEnabled() is all there is
- var invisibleJava = this.opera;
-
- // Opera will switch off javaEnabled in preferences if java
can't be found.
- // And it doesn't register an application/x-java-applet mime
type like Mozilla does.
- if ( invisibleJava && javaEnabled ) {
- this.clientSupports['cortado'] = true;
- }
-
- if ( this.konqueror ) {
- // Bugged as of 3.5.9
- // Applet freezes shortly after starting
- javaEnabled = false;
- }
-
- // ActiveX plugins
- // VLC
- if ( this.testActiveX( 'VideoLAN.VLCPlugin.2' ) ) {
- this.clientSupports['vlc-activex'] = true;
- }
- // Java
- if ( javaEnabled && this.testActiveX(
'JavaWebStart.isInstalled' ) ) {
- this.clientSupports['cortado'] = true;
- }
- // QuickTime
- if ( this.testActiveX( 'QuickTimeCheckObject.QuickTimeCheck.1'
) ) {
- this.clientSupports['quicktime-activex'] = true;
- }
-
- // <video> element
- if ( typeof HTMLVideoElement == 'object' // Firefox, Safari
- || typeof HTMLVideoElement == 'function' ) //
Opera
- {
- this.clientSupports['videoElement'] = true;
- }
-
- if (!navigator.mimeTypes || navigator.mimeTypes.length == 0) {
- // No Mozilla plugins, all done
- return;
- }
-
- // Mozilla plugins
- var typesByPlayer = {};
- var playersByType = {};
- var numPlayersByType = {};
- var player;
- var i;
- for ( i = 0; i < navigator.mimeTypes.length; i++) {
- var entry = navigator.mimeTypes[i];
- var type = entry.type;
- var semicolonPos = type.indexOf( ';' );
- if ( semicolonPos > -1 ) {
- type = type.substr( 0, semicolonPos );
- }
-
- var plugin = entry.enabledPlugin;
- // In case it is null or undefined
- var pluginName = plugin && plugin.name ? plugin.name :
'';
- var pluginFilename = plugin && plugin.filename ?
plugin.filename : '';
- player = '';
-
- if ( javaEnabled && type == 'application/x-java-applet'
) {
- // We use <applet> so we don't have to worry
about unique types
- this.clientSupports['cortado'] = true;
- // But it could conflict with another plugin
- // Set player='' to avoid double registration
of cortado
- player = '';
- } else if ( pluginFilename.indexOf( 'libtotem' ) > -1 )
{
- // Totem
- player = 'totem';
- } else if ( pluginFilename.indexOf( 'libkmplayerpart' )
> -1 ) {
- // KMPlayer is fussy about what type you give it
- if ( pluginName == 'Windows Media Player
Plugin'
- || pluginName == 'QuickTime
Plug-in' )
- {
- player = 'kmplayer';
- }
- } else if ( pluginFilename.indexOf( 'kaffeineplugin' )
> -1 ) {
- // Kaffeine
- player = 'kaffeine';
- } else if ( pluginName.indexOf( 'mplayerplug-in' ) > -1
) {
- player = 'mplayerplug-in';
- } else if ( pluginFilename.indexOf( 'mplayerplug-in-qt'
) > -1 ) {
- // MPlayer fake QuickTime
- player = '';
- } else if ( pluginName.indexOf( 'QuickTime Plug-in' ) >
-1 ) {
- // Note: Totem and KMPlayer also use this
pluginName, which is
- // why we check for them first
- player = 'quicktime-mozilla';
- } else if ( pluginName.toLowerCase() == 'vlc multimedia
plugin' ) {
- player = 'vlc-mozilla';
- } else if ( type == 'application/ogg' ) {
- player = 'oggPlugin';
- }
-
- if ( this.konqueror && player == 'vlc-mozilla' ) {
- // In Konqueror 3.5.9, VLC is not scriptable,
has no controls, and crashes the browser
- player = '';
- }
-
- // Update some hashtables to track unique type
assignment
- // Slightly complicated because players can and do
conflict with themselves
- if ( !( player in typesByPlayer ) ) {
- typesByPlayer[player] = {};
- }
- typesByPlayer[player][type] = true;
- if ( !( type in playersByType ) ) {
- playersByType[type] = {};
- numPlayersByType[type] = 0;
- }
- if ( !( player in playersByType[type] ) ) {
- playersByType[type][player] = true;
- numPlayersByType[type]++;
- }
- }
-
- // Determine a unique MIME type for each player found
- for ( i = 0; i < this.players.length; i++ ) {
- player = this.players[i];
- if ( !( player in typesByPlayer ) ) {
- continue;
- }
- // Is the default OK?
- var defaultType = this.mimeTypes[player];
- if ( defaultType in numPlayersByType
- && numPlayersByType[defaultType] == 1
- && defaultType in typesByPlayer[player]
)
- {
- // Yes, use it
- this.debug( player + " -> " + defaultType );
- this.clientSupports[player] = true;
- continue;
- }
- // Search for a unique type
- for ( var type in typesByPlayer[player] ) {
- if ( numPlayersByType[type] == 1 ) {
- // Found a unique type
- this.mimeTypes[player] = type;
- this.clientSupports[player] = true;
- this.debug( player + " => " + type );
- break;
- }
- }
- if ( !(player in this.clientSupports ) ) {
- if ( typesByPlayer[player].length > 0 ) {
- this.debug( "No unique MIME type for "
+ player );
- } else {
- this.debug( "No types for player " +
player );
- }
- }
- }
- },
-
- 'testActiveX' : function ( name ) {
- var hasObj = true;
- try {
- // No IE, not a class called "name", it's a variable
- var obj = new ActiveXObject( '' + name );
- } catch ( e ) {
- hasObj = false;
- }
- return hasObj;
- },
-
- 'addOption' : function ( select, value, text, selected ) {
- var option = document.createElement( 'option' );
- option.value = value;
- option.appendChild( document.createTextNode( text ) );
- if ( selected ) {
- option.selected = true;
- }
- select.appendChild( option );
- },
-
- 'hx' : function ( s ) {
- if ( typeof s != 'String' ) {
- s = s.toString();
- }
- return s.replace( /&/g, '&' )
- . replace( /</g, '<' )
- . replace( />/g, '>' );
- },
-
- 'hq' : function ( s ) {
- return '"' + this.hx( s ) + '"';
- },
-
- 'getMsg': function ( key ) {
- if ( key in this.msg ) {
- return this.msg[key];
- } else if ( key in this.defaultMsg ) {
- return this.defaultMsg[key];
- } else {
- return '[' + key + ']';
- }
- },
-
- 'makeOptionsBox' : function ( selectedPlayer, params ) {
- var div, p, a, ul, li, button;
-
- div = document.createElement( 'div' );
- div.style.cssText = "width: " + ( params.width - 10 ) + "px;
display: none;";
- div.className = 'ogg-player-options';
- div.id = params.id + '_options_box';
- div.align = 'center';
-
- ul = document.createElement( 'ul' );
-
- // Description page link
- if ( params.linkUrl ) {
- li = document.createElement( 'li' );
- a = document.createElement( 'a' );
- a.href = params.linkUrl;
- a.appendChild( document.createTextNode(
this.msg['ogg-desc-link'] ) );
- li.appendChild( a );
- ul.appendChild( li );
- }
-
- // Download link
- li = document.createElement( 'li' );
- a = document.createElement( 'a' );
- a.href = params.videoUrl;
- a.appendChild( document.createTextNode(
this.msg['ogg-download'] ) );
- li.appendChild( a );
- ul.appendChild( li );
-
- div.appendChild( ul );
-
- // Player list caption
- p = document.createElement( 'p' );
- p.appendChild( document.createTextNode(
this.msg['ogg-use-player'] ) );
- div.appendChild( p );
-
- // Make player list
- ul = document.createElement( 'ul' );
- for ( var i = 0; i < this.players.length + 1; i++ ) {
- var player, playerMsg;
- if ( i == this.players.length ) {
- player = 'thumbnail';
- if ( params.isVideo ) {
- playerMsg = 'ogg-player-thumbnail';
- } else {
- playerMsg = 'ogg-player-soundthumb';
- }
- } else {
- player = this.players[i];
- // Skip unsupported players
- if ( ! this.clientSupports[player] ) {
- continue;
- }
- playerMsg = 'ogg-player-' + player;
- }
-
- // Make list item
- li = document.createElement( 'li' );
- if ( player == selectedPlayer ) {
- var strong = document.createElement( 'strong' );
- strong.appendChild( document.createTextNode(
- this.getMsg(playerMsg) + ' ' +
this.msg['ogg-player-selected'] ) );
- li.appendChild( strong );
- } else {
- a = document.createElement( 'a' );
- a.href = 'javascript:void("' + player + '")';
- a.onclick = this.makePlayerFunction( player,
params );
- a.appendChild( document.createTextNode(
this.getMsg(playerMsg) ) );
- li.appendChild( a );
- }
- ul.appendChild( li );
- }
- div.appendChild( ul );
-
- div2 = document.createElement( 'div' );
- div2.style.cssText = 'text-align: center;';
- button = document.createElement( 'button' );
- button.appendChild( document.createTextNode(
this.msg['ogg-dismiss'] ) );
- button.onclick = this.makeDismissFunction( params.id );
- div2.appendChild( button );
- div.appendChild( div2 );
-
- return div;
- },
-
- 'makeOptionsLink' : function ( id ) {
- var a = document.createElement( 'a' );
- a.href = 'javascript:void("options")';
- a.id = id + '_options_link';
- a.onclick = this.makeDisplayOptionsFunction( id );
- a.appendChild( document.createTextNode( this.msg['ogg-more'] )
);
- return a;
- },
-
- 'setCssProperty' : function ( elt, prop, value ) {
- // Could use style.setProperty() here if it worked in IE
- var re = new RegExp( prop + ':[^;](;|$)' );
- if ( elt.style.cssText.search( re ) > -1 ) {
- elt.style.cssText = elt.style.cssText.replace( re, prop
+ ':' + value + '$1' );
- } else if ( elt.style.cssText == '' ) {
- elt.style.cssText = prop + ':' + value + ';';
- } else if ( elt.style.cssText[elt.style.cssText.length - 1] ==
';' ) {
- elt.style.cssText += prop + ':' + value + ';';
- } else {
- elt.style.cssText += ';' + prop + ':' + value + ';';
- }
- },
-
- 'makeDismissFunction' : function ( id ) {
- var this_ = this;
- return function () {
- var optionsLink = document.getElementById( id +
'_options_link' );
- var optionsBox = document.getElementById( id +
'_options_box' );
- this_.setCssProperty( optionsLink, 'display', 'inline'
);
- this_.setCssProperty( optionsBox, 'display', 'none' );
- }
- },
-
- 'makeDisplayOptionsFunction' : function ( id ) {
- var this_ = this;
- return function () {
- var optionsLink = document.getElementById( id +
'_options_link' );
- var optionsBox = document.getElementById( id +
'_options_box' );
- this_.setCssProperty( optionsLink, 'display', 'none' );
- this_.setCssProperty( optionsBox, 'display', 'block' );
- }
- },
-
- 'makePlayerFunction' : function ( player, params ) {
- var this_ = this;
- return function () {
- if ( player != 'thumbnail' ) {
- var week = 7*86400*1000;
- this_.setCookie( 'ogg_player', player, week,
false, false, false, false );
- }
- this_.init( player, params );
- };
- },
-
- 'newButton': function ( caption, image, callback ) {
- var elt = document.createElement('input');
- elt.type = 'image';
- elt.src = this.extPathUrl + '/' + image;
- elt.alt = elt.value = elt.title = this.msg[caption];
- elt.onclick = callback;
- return elt;
- },
-
- 'newPlayButton': function ( videoElt ) {
- return this.newButton( 'ogg-play', 'play.png', function () {
videoElt.play(); } );
- },
-
- 'newPauseButton': function ( videoElt ) {
- return this.newButton( 'ogg-pause', 'pause.png', function () {
videoElt.pause(); } );
- },
-
- 'newStopButton': function ( videoElt ) {
- return this.newButton( 'ogg-stop', 'stop.png', function () {
videoElt.stop(); } );
- },
-
- 'embedVideoElement': function ( elt, params ) {
- var id = elt.id + "_obj";
- elt.innerHTML =
- '<div><video' +
- ' id=' + this.hq( id ) +
- ' width=' + this.hq( params.width ) +
- ' height=' + this.hq( params.height ) +
- ' src=' + this.hq( params.videoUrl ) +
- ' autoplay="1"' +
- ' controls="1"' +
- ' /></div>';
- },
-
- 'embedOggPlugin': function ( elt, params, player ) {
- var id = elt.id + "_obj";
- elt.innerHTML +=
- "<div><object id=" + this.hq( id ) +
- " type='" + this.mimeTypes[player] + "'" +
- " width=" + this.hq( params.width ) +
- " height=" + this.hq( params.height +
this.controlsHeightGuess ) +
- " data=" + this.hq( params.videoUrl ) +
"></object></div>";
- },
-
- 'embedVlcPlugin' : function ( elt, params ) {
- var id = elt.id + "_obj";
- elt.innerHTML +=
- "<div><object id=" + this.hq( id ) +
- " type='" + this.mimeTypes['vlc-mozilla'] + "'" +
- " width=" + this.hq( params.width ) +
- " height=" + this.hq( params.height ) +
- " data=" + this.hq( params.videoUrl ) +
"></object></div>";
-
- var videoElt = document.getElementById( id );
- var div = document.createElement( 'div' );
- // TODO: seek bar
- div.appendChild( this.newPlayButton( videoElt ) );
- div.appendChild( this.newPauseButton( videoElt ) );
- div.appendChild( this.newStopButton( videoElt ) );
- elt.appendChild( div );
- },
-
- 'embedVlcActiveX' : function ( elt, params ) {
- var id = elt.id + "_obj";
-
- var html =
- '<div><object id=' + this.hq( id ) +
- ' classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"'
+
- '
codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0"'
+
- ' width=' + this.hq( params.width ) +
- ' height=' + this.hq( params.height ) +
- ' style="width: ' + this.hx( params.width ) + 'px;
height: ' + this.hx( params.height ) + 'px;"' +
- ">" +
- '<param name="mrl" value=' + this.hq( params.videoUrl )
+ '/>' +
- '</object></div>';
- elt.innerHTML += html;
-
- var videoElt = document.getElementById( id );
-
- // IE says "sorry, I wasn't listening, what were the dimensions
again?"
- if ( params.width && params.height ) {
- videoElt.width = params.width;
- videoElt.height = params.height;
- videoElt.style.width = params.width + 'px';
- videoElt.style.height = params.height + 'px';
- }
- var div = document.createElement( 'div' );
- // TODO: seek bar
- div.appendChild( this.newButton( 'ogg-play', 'play.png',
function() { videoElt.playlist.play(); } ) );
- // FIXME: playlist.pause() doesn't work
- div.appendChild( this.newButton( 'ogg-stop', 'stop.png',
function() { videoElt.playlist.stop(); } ) );
- elt.appendChild( div );
- },
-
- 'embedCortado' : function ( elt, params ) {
- var statusHeight = 18;
- var playerHeight = params.height + statusHeight;
-
- // Create the applet all at once
- // In Opera, document.createElement('applet') immediately
creates
- // a non-working applet with unchangeable parameters, similar
to the
- // problem with IE and ActiveX.
- var html =
- '<applet code="com.fluendo.player.Cortado.class" ' +
- ' width=' + this.hq( params.width ) +
- ' height=' + this.hq( playerHeight ) +
- ' archive=' + this.hq( this.cortadoUrl ) + '>' +
- ' <param name="url" value=' + this.hq( params.videoUrl )
+ '/>' +
- ' <param name="duration" value=' + this.hq( params.length
) + '/>' +
- ' <param name="seekable" value="true"/>' +
- ' <param name="autoPlay" value="true"/>' +
- ' <param name="showStatus" value="show"/>' +
- ' <param name="showSpeaker" value="false"/>' +
- ' <param name="statusHeight" value="' + statusHeight +
'"/>' +
- '</applet>';
-
- // Wrap it in an iframe to avoid hanging the rendering thread
in FF 2.0 and similar
- // Doesn't work in MSIE or Safari/Mac or Opera 9.5
- if ( this.mozilla ) {
- var iframeHtml = '<html><body>' + html +
'</body></html>';
- var iframeJs = 'parent.wgOggPlayer.writeApplet(self, "'
+ iframeHtml.replace( /"/g, '\\"' ) + '");';
- var iframeUrl = 'javascript:' + encodeURIComponent(
iframeJs );
- 'document.write("' + iframeHtml.replace( /"/g,
'\\"' ) + '");';
- html = '<iframe width=' + this.hq( params.width ) +
- ' height=' + this.hq( playerHeight ) +
- ' scrolling="no" frameborder="0"
marginwidth="0" marginheight="0"' +
- ' src=' + this.hq( iframeUrl ) + '/>';
- }
- elt.innerHTML = '<div>' + html + '</div>';
- },
-
- 'writeApplet' : function ( win, html ) {
- win.document.write( html );
- if ( win.stop ) win.stop();
- // Disable autoplay on back button
- this_ = this;
- win.setTimeout(
- function () {
- this_.setParam( win.document.applets[0],
'autoPlay', '' );
- },
- 1
- );
- },
-
- 'embedQuicktimePlugin': function ( elt, params, player ) {
- var id = elt.id + "_obj";
- var controllerHeight = 16; // by observation
- var extraAttribs = '';
- if ( player == 'quicktime-activex' ) {
- extraAttribs =
'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"';
- }
-
- elt.innerHTML +=
- "<div><object id=" + this.hq( id ) +
- " type='" + this.mimeTypes[player] + "'" +
- " width=" + this.hq( params.width ) +
- " height=" + this.hq( params.height + controllerHeight
) +
-
- // See
http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=25605
- " data=" + this.hq( this.extPathUrl + '/null_file.mov'
) +
- ' ' + extraAttribs +
- ">" +
- // Scale, don't clip
- "<param name='SCALE' value='Aspect'/>" +
- "<param name='AUTOPLAY' value='True'/>" +
- "<param name='src' value=" + this.hq( this.extPathUrl +
'/null_file.mov' ) + "/>" +
- "<param name='QTSRC' value=" + this.hq( params.videoUrl
) + "/>" +
- "</object></div>";
-
- // Poll for completion
- var this_ = this;
- this.qtTimers[params.id] = window.setInterval(
this.makeQuickTimePollFunction( params ), 500 );
- },
-
- 'makeQuickTimePollFunction' : function ( params ) {
- var this_ = this;
- return function () {
- var elt = document.getElementById( params.id );
- var id = params.id + '_obj';
- var videoElt = document.getElementById( id );
- if ( elt && videoElt ) {
- // Detect XiphQT (may throw)
- var xiphQtVersion = false, done = false;
- try {
- xiphQtVersion =
videoElt.GetComponentVersion('imdc','XiTh', 'Xiph');
- done = true;
- } catch ( e ) {}
- if ( done ) {
- window.clearInterval(
this_.qtTimers[params.id] );
- if ( !xiphQtVersion || xiphQtVersion ==
'0.0' ) {
- var div =
document.createElement( 'div' );
- div.className =
'ogg-player-options';
- div.style.cssText = 'width:' +
( params.width - 10 ) + 'px;'
- div.innerHTML = this_.getMsg(
'ogg-no-xiphqt' );
- var optionsDiv =
document.getElementById( params.id + '_options_box' );
- if ( optionsDiv ) {
- elt.insertBefore( div,
optionsDiv.parentNode );
- } else {
- elt.appendChild( div );
- }
- }
- // Disable autoplay on back button
- this_.setParam( videoElt, 'AUTOPLAY',
'False' );
- }
- }
- };
- },
-
- 'addParam': function ( elt, name, value ) {
- var param = document.createElement( 'param' );
- param.setAttribute( 'name', name );
- param.setAttribute( 'value', value );
- elt.appendChild( param );
- },
-
- 'setParam' : function ( elt, name, value ) {
- var params = elt.getElementsByTagName( 'param' );
- for ( var i = 0; i < params.length; i++ ) {
- if ( params[i].name.toLowerCase() == name.toLowerCase()
) {
- params[i].value = value;
- return;
- }
- }
- this.addParam( elt, name, value );
- },
-
- 'setCookie' : function ( name, value, expiry, path, domain, secure ) {
- var expiryDate = false;
- if ( expiry ) {
- expiryDate = new Date();
- expiryDate.setTime( expiryDate.getTime() + expiry );
- }
- document.cookie = name + "=" + escape(value) +
- (expiryDate ? ("; expires=" + expiryDate.toGMTString())
: "") +
- (path ? ("; path=" + path) : "") +
- (domain ? ("; domain=" + domain) : "") +
- (secure ? "; secure" : "");
- },
-
- 'getCookie' : function ( cookieName ) {
- var m = document.cookie.match( cookieName + '=(.*?)(;|$)' );
- return m ? unescape( m[1] ) : false;
- }
-};
-// vim: ts=4 sw=4 noet cindent :
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- www fry/happy-birthday-to-gnu-cortado.html serv...,
Pavel Kharitonov <=