Menu

[r179]: / trunk / player / StrobeMediaPlayback / html-template / template-generator.html  Maximize  Restore  History

Download this file

104 lines (97 with data), 5.1 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Template Generator</title>
<script type="text/javascript" src="lib/jquery/jquery-1.4.2.js">
</script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js">
</script>
</head>
<body>
<h1>Flash/Strobe Media Playback - iframe embed sample</h1>
<script id="template" type="text/x-jquery-tmpl">
{{if displayAlternativeContent}}
<a href="${src}">${src}</a>
{{else}}
{{if html5}}
<video id="${id}" class="smp_video"
{{if poster}}
poster="${poster}"
{{/if}}
{{if controlBarMode && controlBarMode != "none"}}
controls="controls"
{{/if}}
{{if autoPlay}}
autoplay="autoplay"
{{/if}}
{{if loop}}
loop="loop"
{{/if}}
preload="none" height="${height}" width="${width}" src="${src}"></video>{{else}}
{{if swf}}
<object id="${id}" name="${id}" data="${swf}" width="${width}" height="${height}" type="application/x-shockwave-flash">
<param name="movie" value="${swf}" /><param name="flashvars" value="${queryString}" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="opaque" />
</object>{{else}}
<object id="${id}" name="${id}" width="${width}" height="${height}" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="${swf}" /><param name="flashvars" value="${queryString}" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="opaque" />
</object>{{/if}}
{{/if}}
{{/if}}
</script>
<script id="embedCode" type="text/x-jquery-tmpl">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}">
<param name="movie" value="${swf} />
<param name="flashvars" value="${queryString}" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="${swf}" width="${width}" height="${height}">
<param name="flashvars" value="movie=${src}" />
<object type="video/mp4" data="${poster}" width="${width}" height="${height}">
<param name="controller" value="false" /><param name="src" value="${poster}" /><param name="href" value="${src}" /><param name="target" value="myself" />
<!--<![endif]--><img src="${poster}" alt="" />
<!--[if !IE]>-->
</object>
</object>
<!--<![endif]-->
</object>
</script>
<script id="strobeMediaPlaybackChromeTemplate" type="text/x-jquery-tmpl">
<a class="smp playoverlay"></a>
<div class="strobeMediaPlaybackControlBar">
<a class="smp play"></a>
<div class="video-progress2">
<a class="slider"></a>
<div class="video-track">
<div class="played">
</div>
<div class="buffered">
</div>
</div>
</div>
<a class="smp fullscreen"></a>
<a class="smp volume high"></a>
<div class="time">
<span class="currentTime">0:00</span>/<span class="duration">0:00</span>
</div>
</div>
</script>
<br/>
<textarea id="function" cols="200" rows="30">
</textarea>
<script type="text/javascript">
$(function(){
// var myTemplate = $.template("template", $("#template"));
var myTemplate = $.template("myTemplate", $("#template"));
//var myTemplate = $.template("myTemplate", $("#strobeMediaPlaybackChromeTemplate"));
//$el.append(myTemplate+"");
var templateString = myTemplate + "";
//templateString.replace(/\s+/," ");
//1 templateString.replace(/\<\s+\>/,"");
templateString = templateString.replace("function anonymous(jQuery, \$item)", "function videoTemplate(jQuery, \$item)");
//alert(templateString);
// /function anonymous(jQuery, $item)
$("#function").val(templateString);
});
</script>
</body>
</html>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.