Permalink
Browse files

pre1.1.2

  • Loading branch information...
1 parent b4cdcee commit fbb825831bd38ad56f02976d70ddf068ba1e0648 @aFarkas committed Jun 16, 2010
View
Binary file not shown.
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Audioplayer Demo</title>
+ <link class="ui-theme" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/sunny/jquery-ui.css"/>
+ <link rel="stylesheet" href="../css/styles.css" />
+ <link rel="stylesheet" href="../css/player-controls.css" />
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js">
+ </script>
+ <!-- ui-components -->
+ <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.js">
+ </script>
+ <!-- END: ui-components --><!-- optional for a11y-slider -->
+ <script src="../../utils/a11y-slider.ext.js">
+ </script>
+ <!-- END: for a11y-slider -->
+ <script src="../../packages/mm.full.js">
+ </script>
+ <!-- adds playlist markup- and dom-api -->
+ <script src="../../plugins/playlist.js">
+ </script>
+ <style>
+ .media-player {
+ width: auto;
+ }
+ </style>
+ <script>
+ $('html').addClass('js-on');
+ $(function(){
+ var addTab = (function(){
+ var tabID = 1;
+ return function(url){
+ tabID++;
+ var curTabID = tabID;
+ url = 'http://query.yahooapis.com/v1/public/yql?q=select%20channel%20from%20xml%20where%20url%3D%22'+ encodeURIComponent(url) +'%22&format=json&diagnostics=true&callback=cbfunc'+curTabID;
+ $.ajax({
+ url: url,
+ dataType: 'jsonp',
+ jsonpCallback: 'cbfunc'+curTabID,
+ success: function(data){
+ data = data.query;
+ if (!data.results || !data.results.rss || !data.results.rss.channel || !data.results.rss.channel.item.length) {
+ alert("can't read format");
+ return;
+ }
+ var playlist = [];
+ $.each(data.results.rss.channel.item, function(i, item){
+ if(!item.title || !item.enclosure || !item.enclosure.url){return;}
+ playlist.push({
+ name: item.title,
+ srces: {
+ src: item.enclosure.url,
+ type: item.enclosure.type
+ }
+
+ });
+ });
+ if(!playlist.length){
+ alert("no playlist items found/can't read format?");
+ return;
+ }
+ var id = '#panel-' + curTabID;
+ $('#tabs').tabs("add", id, data.results.rss.channel.title);
+
+ $(id).append( $('audio').playlist(playlist) );
+ }
+ });
+ };
+ })();
+
+ $('div.media-player').jmeControl();
+ $('#tabs').append('<ul />').tabs({
+ show: function(e, ui){
+ //$('ul.playlist', ui.panel).activatePlaylist();
+ }
+ });
+
+ addTab('http://feeds.feedburner.com/jQueryPodcast?format=xml');
+
+ $('button.itunes-feed').click(function(){
+ var url = prompt("Please enter a URL to your itunes feed", "http://feeds.feedburner.com/yayQuery_audio");
+ if(url){
+ addTab(url);
+ }
+ });
+ });
+
+ </script>
+ </head>
+ <body>
+ <h1>Playlist Demo with audio-element using the Playlist-Plugin</h1>
+ <div class="media-player">
+ <button class="itunes-feed">add iTunes feed</button>
+
+ <span class="media-label">audioplayer <span class="media-name"></span></span>
+ <div class="player-errors ui-state-error">
+ Turn on your JavaScript
+ </div>
+ <audio>
+ </audio>
+ <div class="media-controls">
+ <a class="play-pause"><span class="ui-icon"></span><span class="button-text">play / pause</span></a>
+ <span class="current-time player-display">00:00</span>
+ <div class="timeline-slider">
+ <span class="handle-label">play position</span>
+ <div class="progressbar">
+ </div>
+ </div>
+ <span class="duration player-display">00:00</span>
+ <a class="mute-unmute"><span class="ui-icon"></span><span class="button-text">mute / unmute</span></a>
+ <div class="volume-slider">
+ <span class="handle-label">volume control</span>
+ </div>
+ </div>
+ <div id="tabs">
+
+ </div>
+ </div>
+ </div>
+</body>
+</html>
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Audioplayer Demo</title>
+ <link class="ui-theme" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/sunny/jquery-ui.css"/>
+ <link rel="stylesheet" href="../css/styles.css" />
+ <link rel="stylesheet" href="../css/player-controls.css" />
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js">
+ </script>
+ <!-- ui-components -->
+ <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.js">
+ </script>
+ <!-- END: ui-components -->
+ <script src="../../packages/mm.full.js">
+ </script>
+ <!-- adds audio-api to ui-widgets -->
+ <script src="../../plugins/ui.sounds.js">
+ </script>
+
+ <script>
+ $('html').addClass('js-on');
+ $(function(){
+ // Accordion
+ $("#accordion")
+ .accordion({
+ header: "h3",
+ sound: {
+ changestart: '../media/sound14.mp3'
+ }
+ })
+ ;
+
+ });
+
+ </script>
+ </head>
+ <body>
+ <h1>Playlist Demo with audio-element using the Playlist-Plugin</h1>
+ <div id="accordion">
+ <div>
+ <h3><a href="#">First</a></h3>
+
+ <div>
+ <p>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</p>
+ <p>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</p>
+ </div>
+ </div>
+ <div>
+ <h3><a href="#">Second</a></h3>
+ <div>
+ <p>Phasellus mattis tincidunt nibh.</p>
+ <p>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</p>
+ </div>
+ </div>
+ <div>
+
+ <h3><a href="#">Third</a></h3>
+ <div>
+ <p>Nam dui erat, auctor a, dignissim quis.</p>
+ <p>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</p>
+ </div>
+ </div>
+ </div>
+
+</body>
+</html>
@@ -78,24 +78,42 @@
</head>
<body>
<h1>Demo with captioning and title-attributes</h1>
- <p>Demo uses fullwindow-plugin, captioning-plugin, a fallback-message and title-attributes on each control.</p>
+ <p>Demo uses fullwindow-plugin, captioning-plugin, fallback-flash, a fallback-message and title-attributes on each control.</p>
<div class="media-player">
<span class="media-label" style="display: none;">video: Big Buck Bunny</span>
<video poster="../media/bbb_watchtrailer.gif" controls="controls">
<source src="../media/bbb_trailer_mobile.m4v" type="video/mp4" />
<source src="../media/bbb_trailer_400p.ogg" type="video/ogg" />
- <a class="track" href="test.srt" lang="de" data-enabled="enabled">Srt file</a>
- <div class="fallback">
- <img src="../media/bbb_watchtrailer.gif" alt="" />
- <div class="fallback-text">
- <p>Please use a modern browser or install <a href="http://www.videolan.org/">VLC (check Mozilla Plugin)</a> or <a href="http://get.adobe.com/flashplayer/">Flash-Plugin</a></p>
- <ul>
- <li><a class="source" href="../media/bbb_trailer_mobile.m4v">Big Buck Bunny (mp4)</a></li>
- <li><a class="source" href="../media/bbb_trailer_400p.ogg">Big Buck Bunny (ogg)</a></li>
- </ul>
- </div>
- </div>
+
+ <!-- optional extra flash-fallback -->
+ <object id="flash-msie-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="430" height="280">
+ <param name="movie" value="../../packages/player.swf" />
+ <!--[if !IE]>-->
+ <object id="flash-w3c-video" type="application/x-shockwave-flash" data="../../packages/player.swf" width="430" height="280">
+ <!--<![endif]-->
+ <param name="allowfullscreen" value="true">
+ <param name="flashvars" value="file=../demos/media/bbb_trailer_mobile.m4v&amp;&amp;image=../media/bbb_watchtrailer.gif">
+
+ <!-- optional extra html-fallback -->
+ <div class="fallback">
+ <img src="../media/bbb_watchtrailer.gif" alt="" />
+ <div class="fallback-text">
+ <p>Please use a modern browser or install <a href="http://www.videolan.org/">VLC (check Mozilla Plugin)</a> or <a href="http://get.adobe.com/flashplayer/">Flash-Plugin</a></p>
+ <ul>
+ <li><a class="source" href="../media/bbb_trailer_mobile.m4v">Big Buck Bunny (mp4)</a></li>
+ <li><a class="source" href="../media/bbb_trailer_400p.ogg">Big Buck Bunny (ogg)</a></li>
+ <li><a class="track" href="test.srt" lang="de" data-enabled="enabled">Srt file</a></li>
+ </ul>
+ </div>
+ </div>
+ <!-- END: optional extra html-fallback -->
+
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ <!-- END: optional extra flash-fallback -->
</video>
<div class="media-state"></div>
<div class="media-controls ui-widget ui-widget-header ui-corner-all">
@@ -20,7 +20,7 @@
<script src="../../packages/mm.full.min.js"></script>
<script src="../../plugins/playlist.js"></script>
-
+
<script>
$('html').addClass('js-on');
$(function(){
View
@@ -736,6 +736,16 @@
if(elemName !== 'video' && elemName !== 'audio'){return;}
var elem = this;
+
+ //remove swf fallback
+
+ $('object, embed', this)
+ .each(function(){
+ $('> *:not(param, embed, object)', this).appendTo(elem);
+ })
+ .remove()
+ ;
+
$(this).trigger('jmeBeforeEmbed', {
options: opts,
nodeName: elemName
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -736,6 +736,16 @@
if(elemName !== 'video' && elemName !== 'audio'){return;}
var elem = this;
+
+ //remove swf fallback
+
+ $('object, embed', this)
+ .each(function(){
+ $('> *:not(param, embed, object)', this).appendTo(elem);
+ })
+ .remove()
+ ;
+
$(this).trigger('jmeBeforeEmbed', {
options: opts,
nodeName: elemName
@@ -1809,6 +1819,7 @@
ret.mm = (mmID) ? $('#'+ mmID) : $('video, audio', jElm).filter(':first');
ret.api = ret.mm.getJMEAPI(true) || ret.mm.jmeEmbed(o.embed).getJMEAPI(true);
+ if(!ret.api){return ret;}
if(jElm.is(o.controlSel)){
ret.controls = jElm;
}
@@ -2127,6 +2138,7 @@
;
function getAPI(id){
+ if(!id){return;}
id = id.replace(rep, '');
return $.data(doc.getElementById(id), 'mediaElemSupport').apis.jwPlayer;
}
Oops, something went wrong.

0 comments on commit fbb8258

Please sign in to comment.