Index: branches/MwEmbedStandAlone/modules/Sequencer/tests/VideoRender.xml |
— | — | @@ -0,0 +1,89 @@ |
| 2 | +<?xml version="1.0" encoding="UTF-8"?> |
| 3 | +<smil baseProfile="Language" version="3.0" xmlns="http://www.w3.org/ns/SMIL"> |
| 4 | + <head> |
| 5 | + <meta name="title" content="Simple Rendering Example"/> |
| 6 | + |
| 7 | + <transition id="fromBlack" |
| 8 | + type="fade" |
| 9 | + subtype="fadeFromColor" |
| 10 | + fadeColor="#000" |
| 11 | + dur="4s"/> |
| 12 | + |
| 13 | + <transition id="fromGreen" |
| 14 | + type="fade" |
| 15 | + subtype="fadeFromColor" |
| 16 | + fadeColor="#87CF87" |
| 17 | + dur="4s"/> |
| 18 | + |
| 19 | + <transition id="xFade" |
| 20 | + type="fade" |
| 21 | + subtype="crossfade" |
| 22 | + dur="4s"/> |
| 23 | + |
| 24 | + <layout>
|
| 25 | + <root-layout backgroundColor="green" height="800" width="500"/>
|
| 26 | + <region backgroundColor="green" height="700" top="50" left="50" width="400" xml:id="image_region"/>
|
| 27 | + <region xml:id="Title" height="25" width="300" left="100" top="10"/>
|
| 28 | + <region xml:id="Captions" height="70" width="300" left="100" top="510"/>
|
| 29 | + <region id="audio_region" soundLevel="100%"/>
|
| 30 | + </layout>
|
| 31 | + |
| 32 | + </head> |
| 33 | + <body> |
| 34 | + <par> |
| 35 | + |
| 36 | + <video src="media/raw_media/cats_of_ulthar_lovecraft_jp.ogg" |
| 37 | + begin="1s" |
| 38 | + dur="1000s" |
| 39 | + /> |
| 40 | + |
| 41 | + <video src="media/raw_media/le_voyage_dans_la_lune_edit_1.ogv" |
| 42 | + transIn="fromBlack" |
| 43 | + type="video/ogg" |
| 44 | + fill="transition" |
| 45 | + dur="1000s" |
| 46 | + /> |
| 47 | + |
| 48 | + <video src="media/raw_media/MoviePowderPresentsPlan9FromOuterSpace.ogv" |
| 49 | + begin="15s" |
| 50 | + transIn="xFade" |
| 51 | + |
| 52 | + fill="transition" |
| 53 | + dur="1000s" |
| 54 | + durationHint="70" |
| 55 | + type="video/ogg" |
| 56 | + /> |
| 57 | + |
| 58 | + <img src="media/raw_media/fruitStand.jpg" |
| 59 | + dur="25s" |
| 60 | + fill="freeze" |
| 61 | + fit="meet" |
| 62 | + id="image" |
| 63 | + panZoom="0,0,100%,100%" |
| 64 | + region="image_region" |
| 65 | + > |
| 66 | + |
| 67 | + <animate attributeName="panZoom" begin="2.0" |
| 68 | + dur="1.5s" fill="freeze" values="-1,4,99%,99%;511,509,47%,14%"/> |
| 69 | + |
| 70 | + <animate attributeName="panZoom" begin="5.0" |
| 71 | + dur="1.5s" fill="freeze" values="511,509,47%,14%;418,-3,34%,13%"/> |
| 72 | + |
| 73 | + <animate attributeName="panZoom" begin="9.0" |
| 74 | + dur="1.5s" fill="freeze" values="418,-3,34%,13%;9,1115,41%,20%"/> |
| 75 | + |
| 76 | + <animate attributeName="panZoom" begin="13.0" |
| 77 | + dur="1.5s" fill="freeze" values="9,1115,41%,20%;573,2073,64%,17%"/> |
| 78 | + |
| 79 | + <animate attributeName="panZoom" begin="16.0" |
| 80 | + dur="1.5s" fill="freeze" values="573,2073,64%,17%;1118,1365,14%,8%"/> |
| 81 | + |
| 82 | + <animate attributeName="panZoom" begin="18.0" |
| 83 | + dur="1.5s" fill="freeze" values="1118,1365,14%,8%;0,0,100%,100%"/> |
| 84 | + </img> |
| 85 | + |
| 86 | +</par> |
| 87 | +</body> |
| 88 | +</smil> |
| 89 | + |
| 90 | + |
Index: branches/MwEmbedStandAlone/modules/Sequencer/tests/VideoRender.html |
— | — | @@ -0,0 +1,72 @@ |
| 2 | +<!doctype html> |
| 3 | +<html> |
| 4 | +<head> |
| 5 | + <title>Video CrossFade Example</title> |
| 6 | + <script type="text/javascript" src="../../../mwEmbed.js?debug=true"></script> |
| 7 | + <!-- <script type="text/javascript" src="../../ResourceLoader.php?class=window.jQuery,mwEmbed&debug=true"></script> --> |
| 8 | + <script type="text/javascript"> |
| 9 | + mw.setConfig( 'EmbedPlayer.OverlayControls', false ); |
| 10 | + mw.ready(function(){ |
| 11 | + $j( "#seekInputTime" ).blur( function(){ |
| 12 | + var smilVid = $j('#videoCrossfade').get(0); |
| 13 | + $j('#seekInProgress').show(); |
| 14 | + smilVid.setCurrentTime( parseFloat( $j(this).val() ), function() { |
| 15 | + $j('#seekInProgress').hide(); |
| 16 | + }); |
| 17 | + }); |
| 18 | + $j('#startBuffer').click( function(){ |
| 19 | + $j('#videoCrossfade').get(0).load(); |
| 20 | + return false; |
| 21 | + }); |
| 22 | + $j('#renderToFile').click(function(){ |
| 23 | + $j(this).empty().unbind().after( |
| 24 | + $j('<span />').text( ' ' ), |
| 25 | + $j('<span />').attr('id', 'targetFoggStatus' ) |
| 26 | + ); |
| 27 | + |
| 28 | + // xxx for local rendering 'AddMedia.firefogg' is overkill |
| 29 | + // but will have to clean up modularity later |
| 30 | + |
| 31 | + mw.load( ['AddMedia.firefogg','mw.FirefoggRender'],function(){ |
| 32 | + var foggRender = $j('#videoCrossfade').firefoggRender({ |
| 33 | + 'statusTarget': '#targetFoggStatus' |
| 34 | + }); |
| 35 | + foggRender.doRender(); |
| 36 | + |
| 37 | + $j('#renderToFile').text('Stop Render').click(function(){ |
| 38 | + foggRender.stopRender(); |
| 39 | + }); |
| 40 | + }) |
| 41 | + return false; |
| 42 | + }); |
| 43 | + }); |
| 44 | + </script> |
| 45 | +</head> |
| 46 | +<body> |
| 47 | +<h3>Sample Video CrossFade</h3> |
| 48 | +<table> |
| 49 | +<tr> |
| 50 | +<td> |
| 51 | + |
| 52 | +<video id="videoCrossfade" type="application/smil" src="VideoRender.xml" width="400" height="300"></video> |
| 53 | +<p></p>seek to <input id="seekInputTime" size="4" value = "6"></input><span id="seekInProgress" style="display: none"> Seeking<blink>...</blink></span> |
| 54 | +<br/> |
| 55 | +<a id="startBuffer" href="#">Start buffering</a> <br> |
| 56 | +<a id="renderToFile" href="#">Render to file</a> |
| 57 | +</td> |
| 58 | +<td valign="top"> |
| 59 | +Sample playlist code: |
| 60 | +<div style="clear:both"></div> |
| 61 | +<textarea style="width:500px;"> |
| 62 | +<video id="videoCrossfade" type="application/smil" src="VideoRender.xml" width="400" height="300"></video> |
| 63 | +</textarea> |
| 64 | +<div style="clear:both"></div> |
| 65 | + |
| 66 | +SMIL Source: |
| 67 | +<div style="clear:both"></div> |
| 68 | +<iframe style="width:500px;height:300px" src="VideoRender.xml"></iframe> |
| 69 | +</td> |
| 70 | +</tr> |
| 71 | +</table> |
| 72 | +</body> |
| 73 | +</html> |