Index: branches/MwEmbedStandAlone/modules/SmilPlayer/tests/PngOverVideoSmil.html |
— | — | @@ -0,0 +1,72 @@ |
| 2 | +<!doctype html> |
| 3 | +<html> |
| 4 | +<head> |
| 5 | + <title>Simple PNG Animation Over Video 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="PngOverVideoSmil.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 SMIL code: |
| 60 | +<div style="clear:both"></div> |
| 61 | +<textarea style="width:500px;"> |
| 62 | +<video id="videoCrossfade" type="application/smil" src="PngOverVideoSmil.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="PngOverVideoSmil.xml"></iframe> |
| 69 | +</td> |
| 70 | +</tr> |
| 71 | +</table> |
| 72 | +</body> |
| 73 | +</html> |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/tests/RayNaginTour-OriginalThree.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="RayNaginTour-OriginalThree.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="RayNaginTour-OriginalThree.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="RayNaginTour-OriginalThree.xml"></iframe> |
| 69 | +</td> |
| 70 | +</tr> |
| 71 | +</table> |
| 72 | +</body> |
| 73 | +</html> |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/tests/VideoRender.xml |
— | — | @@ -0,0 +1,55 @@ |
| 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 | + </head> |
| 25 | + <body> |
| 26 | + <par> |
| 27 | + |
| 28 | + <audio src="http://upload.wikimedia.org/wikipedia/commons/5/5a/La_Donna_E_Mobile_Rigoletto.ogg" |
| 29 | + begin="1s" |
| 30 | + dur="10s" |
| 31 | + /> |
| 32 | + |
| 33 | + <video src="http://ia331219.us.archive.org/3/items/buckys_poignant_guide_to_why/media-sources%252FBuckminster_Fuller-01.ogv" |
| 34 | + transIn="fromBlack" |
| 35 | + type="video/ogg" |
| 36 | + fill="transition" |
| 37 | + durationHint="15" |
| 38 | + dur="9s" |
| 39 | + /> |
| 40 | + |
| 41 | + <video src="http://upload.wikimedia.org/wikipedia/commons/0/0d/B-36_bomber.ogg" |
| 42 | + begin="5s" |
| 43 | + transIn="xFade" |
| 44 | + |
| 45 | + fill="transition" |
| 46 | + dur="10s" |
| 47 | + durationHint="70" |
| 48 | + type="video/ogg" |
| 49 | + /> |
| 50 | + |
| 51 | + </par> |
| 52 | + |
| 53 | + </body> |
| 54 | +</smil> |
| 55 | + |
| 56 | + |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/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> |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/tests/PngOverVideoSmil.xml |
— | — | @@ -0,0 +1,66 @@ |
| 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 PNG Animation Over Video"/> |
| 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="black" height="1080" width="1920"/> |
| 26 | + <region backgroundColor="blue" height="1080" width="1920" xml:id="video_region"/> |
| 27 | + <region backgroundColor="green" height="720" width="480" xml:id="image_region"/> |
| 28 | + <region id="audio_region" soundLevel="0%"/> |
| 29 | + </layout> |
| 30 | + |
| 31 | + </head> |
| 32 | + <body> |
| 33 | + <par> |
| 34 | + |
| 35 | + <audio src="media/raw_media/cats_of_ulthar_lovecraft_jp.ogg" |
| 36 | + begin="1s" |
| 37 | + dur="25s" |
| 38 | + /> |
| 39 | + |
| 40 | + <video src="http://www.archive.org/download/The_Bangville_Police_1913/The_Bangville_Police_1913.ogv" |
| 41 | + transIn="fromBlack" |
| 42 | + type="video/ogg" |
| 43 | + fill="transition" |
| 44 | + dur="25s" |
| 45 | + region="video_region" |
| 46 | + /> |
| 47 | + |
| 48 | + <img src="http://dl.dropbox.com/u/32096/roadragepanda.png" |
| 49 | + dur="25s" |
| 50 | + begin="5s" |
| 51 | + transIn="fromBlack" |
| 52 | + id="image" |
| 53 | + fill="freeze" |
| 54 | + panZoom="0,0,300,200" |
| 55 | + region="image_region" |
| 56 | + > |
| 57 | + |
| 58 | + <animate attributeName="panZoom" begin="12.0" |
| 59 | + dur="5s" fill="freeze" values="0,0,100%,100%,-100,100,100%,250%"/> |
| 60 | + |
| 61 | + </img> |
| 62 | + |
| 63 | +</par> |
| 64 | +</body> |
| 65 | +</smil> |
| 66 | + |
| 67 | + |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/tests/RayNaginTour-OriginalThree.xml |
— | — | @@ -0,0 +1,54 @@ |
| 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="The Ray Nagin Tour - The Original Three at PA's in Boston"/> |
| 6 | + |
| 7 | + <transition id="fromBlack" |
| 8 | + type="fade" |
| 9 | + subtype="fadeFromColor" |
| 10 | + fadeColor="#000" |
| 11 | + dur="4s"/> |
| 12 | + |
| 13 | + <transition id="xFade" |
| 14 | + type="fade" |
| 15 | + subtype="crossfade" |
| 16 | + dur="4s"/> |
| 17 | + |
| 18 | + <layout> |
| 19 | + <root-layout backgroundColor="black" height="720" width="1120"/> |
| 20 | + <region backgroundColor="grey" left="640" height="360" width="480" xml:id="grey"/> |
| 21 | + <region backgroundColor="red" top="360" height="360" width="640" xml:id="red"/> |
| 22 | + <region id="audio" soundLevel="100%"/> |
| 23 | + </layout> |
| 24 | + |
| 25 | + </head> |
| 26 | + <body> |
| 27 | + <par> |
| 28 | + |
| 29 | + <audio src="media/raw_media/RayNaginTour-OriginalThree.ogg" |
| 30 | + begin="0s" |
| 31 | + dur="1500s" |
| 32 | + region="audio" |
| 33 | + /> |
| 34 | + |
| 35 | + <video src="media/raw_media/Grey-360p-500k.ogv" |
| 36 | + begin="0s" |
| 37 | + transIn="fromBlack" |
| 38 | + type="video/ogg" |
| 39 | + fill="transition" |
| 40 | + dur="1500s" |
| 41 | + region="grey" |
| 42 | + /> |
| 43 | + |
| 44 | + <video src="media/raw_media/Red-360p-500k.ogv" |
| 45 | + begin="0s" |
| 46 | + transIn="fromBlack" |
| 47 | + fill="transition" |
| 48 | + dur="1500s" |
| 49 | + type="video/ogg" |
| 50 | + region="red" |
| 51 | + /> |
| 52 | + |
| 53 | + </par> |
| 54 | + </body> |
| 55 | +</smil> |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/loader.js |
— | — | @@ -1,57 +0,0 @@ |
2 | | -/* |
3 | | -* Sequencer loader |
4 | | -*/ |
5 | | - |
6 | | -// Wrap in mw to not pollute global namespace |
7 | | -( function( mw ) { |
8 | | - mw.addResourcePaths( { |
9 | | - |
10 | | - "mw.SequenceEdit" : "mw.SequenceEdit.js", |
11 | | - "mw.SeqRemoteSearchDriver" : "mw.SeqRemoteSearchDriver.js", |
12 | | - "mw.TimedEffectsEdit" : "mvTimedEffectsEdit.js", |
13 | | - "mw.FirefoggRender" : "mw.FirefoggRender.js", |
14 | | - |
15 | | - "RemoteMwSequencer" : "remotes/RemoteMwSequencer.js", |
16 | | - |
17 | | - "mw.style.SequenceEdit" : "css/mw.style.SequenceEdit.css", |
18 | | - |
19 | | - "playlistEmbed" : "playlistEmbed.js" |
20 | | - } ); |
21 | | - |
22 | | - |
23 | | - mw.addModuleLoader( 'FirefoggRender', |
24 | | - [ |
25 | | - 'mw.Firefogg', |
26 | | - 'mw.FirefoggRender', |
27 | | - 'mw.UploadInterface' |
28 | | - ]); |
29 | | - |
30 | | - // xxx Needs to fix sequencer include |
31 | | - mw.addModuleLoader( 'Sequencer', function( ) { |
32 | | - // Make sure we have the required mwEmbed libs: |
33 | | - return [ |
34 | | - [ // Load the EmbedPlayer Module ( includes lots of dependent classes ) |
35 | | - 'EmbedPlayer' |
36 | | - ], |
37 | | - [ |
38 | | - '$j.contextMenu', |
39 | | - 'mw.SequenceEdit', |
40 | | - 'mw.style.SequenceEdit' |
41 | | - '$j.fn.menu', |
42 | | - ], |
43 | | - [ |
44 | | - // UI components used in the sequencer interface: |
45 | | - '$j.ui.accordion', |
46 | | - '$j.ui.dialog', |
47 | | - '$j.ui.droppable', |
48 | | - '$j.ui.draggable', |
49 | | - '$j.ui.progressbar', |
50 | | - '$j.ui.sortable', |
51 | | - '$j.ui.resizable', |
52 | | - '$j.ui.slider', |
53 | | - '$j.ui.tabs' |
54 | | - ] |
55 | | - ]; |
56 | | - }); |
57 | | - |
58 | | -} )( window.mw ); |
\ No newline at end of file |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/SequenceEdit.i18n.php |
— | — | @@ -1,1215 +0,0 @@ |
2 | | -<?php |
3 | | -/* |
4 | | - * Internationalisation for Sequencer |
5 | | - * |
6 | | - * @file |
7 | | - * @ingroup Extensions |
8 | | - */ |
9 | | - |
10 | | -$messages = array(); |
11 | | -$messages['en'] = array( |
12 | | - 'mwe-transition_in' => 'Transition in', |
13 | | - 'mwe-transition_out' => 'Transition out', |
14 | | - 'mwe-effects' => 'Effects stack', |
15 | | - 'mwe-remove_transition' => 'Remove transition', |
16 | | - 'mwe-edit_transin' => 'Edit transition into clip', |
17 | | - 'mwe-edit_transout' => 'Edit transition out of clip', |
18 | | - 'mwe-add-transition' => 'Add a transition', |
19 | | - 'mwe-menu_clipedit' => 'Edit media', |
20 | | - 'mwe-menu_transition' => 'Transitions and effects', |
21 | | - 'mwe-menu_cliplib' => 'Add media', |
22 | | - 'mwe-menu_resource_overview' => 'Resource overview', |
23 | | - 'mwe-menu_options' => 'Options', |
24 | | - 'mwe-loading_timeline' => 'Loading timeline ...', |
25 | | - 'mwe-loading_user_rights' => 'Loading user rights ...', |
26 | | - 'mwe-no_edit_permissions' => 'You do not have permissions to save changes to this sequence', |
27 | | - 'mwe-edit_clip' => 'Edit clip', |
28 | | - 'mwe-edit_save' => 'Save sequence changes', |
29 | | - 'mwe-saving_wait' => 'Save in progress (please wait)', |
30 | | - 'mwe-save_done' => 'Save complete', |
31 | | - 'mwe-edit_cancel' => 'Cancel sequence edit', |
32 | | - 'mwe-edit_cancel_confirm' => 'Are you sure you want to cancel your edit? Changes will be lost.', |
33 | | - 'mwe-zoom_in' => 'Zoom in', |
34 | | - 'mwe-zoom_out' => 'Zoom out', |
35 | | - 'mwe-cut_clip' => 'Cut clips', |
36 | | - 'mwe-expand_track' => 'Expand track', |
37 | | - 'mwe-collapse_track' => 'Collapse track', |
38 | | - 'mwe-play_from_position' => 'Play from playline position', |
39 | | - 'mwe-pixle2sec' => 'pixels to seconds', |
40 | | - 'mwe-rmclip' => 'Remove clip', |
41 | | - 'mwe-clip_in' => 'clip in', |
42 | | - 'mwe-clip_out' => 'clip out', |
43 | | - 'mwe-welcome_to_sequencer' => '<h3>Welcome to the sequencer demo</h3> Very <b>limited</b> functionality right now. Not much documentation yet either.', |
44 | | - 'mwe-no_selected_resource' => '<h3>No resource selected</h3> Select a clip to enable editing.', |
45 | | - 'mwe-error_edit_multiple' => '<h3>Multiple resources selected</h3> Select a single clip to edit it.', |
46 | | - 'mwe-editor_options' => 'Editor options', |
47 | | - 'mwe-editor_mode' => 'Editor mode', |
48 | | - 'mwe-simple_editor_desc' => 'simple editor (iMovie style)', |
49 | | - 'mwe-advanced_editor_desc' => 'advanced editor (Final Cut style)', |
50 | | - 'mwe-other_options' => 'Other options', |
51 | | - 'mwe-contextmenu_opt' => 'Enable context menus', |
52 | | - 'mwe-sequencer_credit_line' => 'Developed by <a href="http://kaltura.com">Kaltura, Inc.</a> in partnership with the <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">more information</a>).', |
53 | | - 'mwe-no-sequence-create' => 'No sequence exists named $1, You can $2', |
54 | | - 'mwe-sequence-create-one' => 'start a sequence', |
55 | | -); |
56 | | -$messages['af'] = array( |
57 | | - 'mwe-menu_options' => 'Opsies', |
58 | | - 'mwe-other_options' => 'Ander opsies', |
59 | | -); |
60 | | -$messages['ar'] = array( |
61 | | - 'mwe-remove_transition' => 'أزل الترجمة', |
62 | | - 'mwe-edit_transin' => 'عدّل الترجمة في المقطع', |
63 | | - 'mwe-edit_transout' => 'عدّل الترجمة خارج المقطع', |
64 | | - 'mwe-menu_clipedit' => 'حرّر الوسيط', |
65 | | - 'mwe-menu_transition' => 'ترجمات ومؤثرات', |
66 | | - 'mwe-menu_cliplib' => 'أضف وسيطًا', |
67 | | - 'mwe-menu_options' => 'خيارات', |
68 | | - 'mwe-loading_timeline' => 'يحمل الشريط الزمني...', |
69 | | - 'mwe-loading_user_rights' => 'يحمل صلاحيات المستخدم...', |
70 | | - 'mwe-edit_clip' => 'حرّر المقطع', |
71 | | - 'mwe-saving_wait' => 'الحفظ قيد التنفيذ (من فضلك انتظر)', |
72 | | - 'mwe-save_done' => 'اكتمل الحفظ', |
73 | | - 'mwe-edit_cancel_confirm' => 'أمتأكد من أنك تريد إلغاء تعديلك؟ سوف تضيع التعديلات.', |
74 | | - 'mwe-zoom_in' => 'قرّب', |
75 | | - 'mwe-zoom_out' => 'بعّد', |
76 | | - 'mwe-expand_track' => 'وسّع المقطوعة', |
77 | | - 'mwe-collapse_track' => 'اطوِ المقطوعة', |
78 | | - 'mwe-rmclip' => 'أزل المقطع', |
79 | | - 'mwe-editor_options' => 'خيارات المحرر', |
80 | | - 'mwe-editor_mode' => 'وضع المحرّر', |
81 | | - 'mwe-simple_editor_desc' => 'مُحرّر بسيط (على نمط iMovie)', |
82 | | - 'mwe-other_options' => 'خيارات أخرى', |
83 | | -); |
84 | | -$messages['be-tarask'] = array( |
85 | | - 'mwe-transition_in' => 'Пераход у', |
86 | | - 'mwe-transition_out' => 'Пераход з', |
87 | | - 'mwe-effects' => 'Набор эфэктаў', |
88 | | - 'mwe-remove_transition' => 'Выдаліць пераход', |
89 | | - 'mwe-edit_transin' => 'Рэдагаваць пераход у частку файла', |
90 | | - 'mwe-edit_transout' => 'Рэдагаваць пераход з часткі файла', |
91 | | - 'mwe-add-transition' => 'Дадаць пераход', |
92 | | - 'mwe-menu_clipedit' => 'Рэдагаваць мэдыя', |
93 | | - 'mwe-menu_transition' => 'Пераходы і эфэкты', |
94 | | - 'mwe-menu_cliplib' => 'Дадаць мэдыя', |
95 | | - 'mwe-menu_resource_overview' => 'Агляд рэсурсаў', |
96 | | - 'mwe-menu_options' => 'Устаноўкі', |
97 | | - 'mwe-loading_timeline' => 'Загрузка шкалы часу ...', |
98 | | - 'mwe-loading_user_rights' => 'Загрузка правоў удзельніка ...', |
99 | | - 'mwe-no_edit_permissions' => 'Вы ня маеце правоў для захаваньня зьменаў у гэтай пасьлядоўнасьці', |
100 | | - 'mwe-edit_clip' => 'Рэдагаваць частку файла', |
101 | | - 'mwe-edit_save' => 'Захаваць зьмены пасьлядоўнасьці', |
102 | | - 'mwe-saving_wait' => 'Захаваньне зьдзяйсьняецца (калі ласка, пачакайце)', |
103 | | - 'mwe-save_done' => 'Захаваньне скончанае', |
104 | | - 'mwe-edit_cancel' => 'Адмяніць рэдагаваньне пасьлядоўнасьці', |
105 | | - 'mwe-edit_cancel_confirm' => 'Вы ўпэўнены, што жадаеце адмяніць Вашае рэдагаваньне? Зьмены будуць страчаныя.', |
106 | | - 'mwe-zoom_in' => 'Павялічыць', |
107 | | - 'mwe-zoom_out' => 'Паменшыць', |
108 | | - 'mwe-cut_clip' => 'Кадраваньне кліпаў', |
109 | | - 'mwe-expand_track' => 'Павялічыць сьцежку', |
110 | | - 'mwe-collapse_track' => 'Паменшыць сьцежку', |
111 | | - 'mwe-play_from_position' => 'Прайграваць з цяперашняй пазыцыі', |
112 | | - 'mwe-pixle2sec' => 'піксэлі ў сэкундах', |
113 | | - 'mwe-rmclip' => 'Выдаліць частку файла', |
114 | | - 'mwe-clip_in' => 'дадаць кліп', |
115 | | - 'mwe-clip_out' => 'выдаліць кліп', |
116 | | - 'mwe-no_selected_resource' => '<h3>Рэсурс не выбраны</h3> Выберыце частку файла для уключэньня рэдагаваньня.', |
117 | | - 'mwe-error_edit_multiple' => '<h3>Выбраныя некалькі рэсурсаў</h3> Выберыце адну частку файла для яе рэдагаваньня.', |
118 | | - 'mwe-editor_options' => 'Устаноўкі рэдактара', |
119 | | - 'mwe-editor_mode' => 'Рэжым рэдактара', |
120 | | - 'mwe-simple_editor_desc' => 'просты рэдактар (стыль iMovie)', |
121 | | - 'mwe-advanced_editor_desc' => 'палепшаны рэдактар (стыль Final Cut)', |
122 | | - 'mwe-other_options' => 'Іншыя ўстаноўкі', |
123 | | - 'mwe-contextmenu_opt' => 'Дазволіць кантэкстныя мэню', |
124 | | - 'mwe-sequencer_credit_line' => 'Распрацавана <a href="http://kaltura.com">Kaltura, Inc.</a> у садружнасьці з <a href="http://wikimediafoundation.org/wiki/Home">фундацыяй «Вікімэдыя»</a> (<a href="#">падрабязнасьці </a>).', |
125 | | -); |
126 | | -$messages['br'] = array( |
127 | | - 'mwe-menu_clipedit' => 'Aozañ ar media', |
128 | | - 'mwe-menu_cliplib' => 'Ouzhpennañ ur media', |
129 | | - 'mwe-menu_options' => 'Dibarzhioù', |
130 | | - 'mwe-edit_clip' => 'Aozañ ar c\'hlip', |
131 | | - 'mwe-save_done' => 'Echu eo an enrollañ', |
132 | | - 'mwe-zoom_in' => 'Zoumiñ', |
133 | | - 'mwe-zoom_out' => 'Dizoumiñ', |
134 | | - 'mwe-rmclip' => 'Dilemel ar c\'hlip', |
135 | | - 'mwe-editor_options' => 'Dibarzhioù an aozer', |
136 | | - 'mwe-simple_editor_desc' => 'aozer eeun (stil iMovie)', |
137 | | - 'mwe-other_options' => 'Dibarzhioù all', |
138 | | -); |
139 | | -$messages['bs'] = array( |
140 | | - 'mwe-remove_transition' => 'Ukloni prelazak', |
141 | | - 'mwe-add-transition' => 'Dodaj prijelaz', |
142 | | - 'mwe-menu_clipedit' => 'Uredi mediju', |
143 | | - 'mwe-menu_transition' => 'Prijelazi i efekti', |
144 | | - 'mwe-menu_cliplib' => 'Dodaj mediju', |
145 | | - 'mwe-menu_resource_overview' => 'Pregled resursa', |
146 | | - 'mwe-menu_options' => 'Opcije', |
147 | | - 'mwe-loading_timeline' => 'Učitavanje vremenske linije ...', |
148 | | - 'mwe-loading_user_rights' => 'Učitavanje korisničkih prava ...', |
149 | | - 'mwe-no_edit_permissions' => 'Nemate dopuštenja da spremite izmjene ove sekvence', |
150 | | - 'mwe-edit_clip' => 'Uredi isječak', |
151 | | - 'mwe-edit_save' => 'Spremi izmjene sekvence', |
152 | | - 'mwe-saving_wait' => 'Spremanje u toku (molimo pričekajte)', |
153 | | - 'mwe-save_done' => 'Spremanje završeno', |
154 | | - 'mwe-edit_cancel' => 'Odustani od uređivanja sekvence', |
155 | | - 'mwe-edit_cancel_confirm' => 'Da li ste sigurni da želite odustati od Vašeg uređivanja? Izmjene će biti izgubljene.', |
156 | | - 'mwe-zoom_in' => 'Približi', |
157 | | - 'mwe-zoom_out' => 'Udalji', |
158 | | - 'mwe-cut_clip' => 'Rezanje isječaka', |
159 | | - 'mwe-expand_track' => 'Proširi traku', |
160 | | - 'mwe-collapse_track' => 'Smanji traku', |
161 | | - 'mwe-pixle2sec' => 'pikseli u sekunde', |
162 | | - 'mwe-rmclip' => 'Ukloni isječak', |
163 | | - 'mwe-editor_options' => 'Opcije uređivača', |
164 | | - 'mwe-editor_mode' => 'Način uređivanja', |
165 | | - 'mwe-simple_editor_desc' => 'jednostavni uređivač (iMovie stil)', |
166 | | - 'mwe-advanced_editor_desc' => 'napredni uređivač (Final Cut stil)', |
167 | | - 'mwe-other_options' => 'Ostale opcije', |
168 | | - 'mwe-contextmenu_opt' => 'Omogući kontekstne menije', |
169 | | -); |
170 | | -$messages['de'] = array( |
171 | | - 'mwe-transition_in' => 'Übergang ein', |
172 | | - 'mwe-transition_out' => 'Übergang aus', |
173 | | - 'mwe-remove_transition' => 'Übergang entfernen', |
174 | | - 'mwe-menu_transition' => 'Übergänge und Effekte', |
175 | | - 'mwe-menu_resource_overview' => 'Quellübersicht', |
176 | | - 'mwe-menu_options' => 'Optionen', |
177 | | - 'mwe-loading_timeline' => 'Lade Zeitleiste …', |
178 | | - 'mwe-loading_user_rights' => 'Lade Benutzerrechte …', |
179 | | - 'mwe-no_edit_permissions' => 'Du hast keine Berechtigungen, Änderungen zu dieser Sequenz zu speichern', |
180 | | - 'mwe-edit_clip' => 'Clip bearbeiten', |
181 | | - 'mwe-edit_save' => 'Sequenzänderungen speichern', |
182 | | - 'mwe-saving_wait' => 'Speichere (bitte warten)', |
183 | | - 'mwe-save_done' => 'Speicherung fertig', |
184 | | - 'mwe-edit_cancel' => 'Sequenzbearbeitung abbrechen', |
185 | | - 'mwe-edit_cancel_confirm' => 'Bist du sicher, dass du deine Bearbeitung abbrechen willst? Änderungen gehen verloren.', |
186 | | - 'mwe-zoom_in' => 'Vergrößern', |
187 | | - 'mwe-zoom_out' => 'Verkleinern', |
188 | | - 'mwe-cut_clip' => 'Clips schneiden', |
189 | | - 'mwe-expand_track' => 'Spur ausklappen', |
190 | | - 'mwe-collapse_track' => 'Spur einklappen', |
191 | | - 'mwe-play_from_position' => 'Abspielen ab Playline-Position', |
192 | | - 'mwe-rmclip' => 'Clip entfernen', |
193 | | - 'mwe-clip_in' => 'Clip hinzufügen', |
194 | | - 'mwe-clip_out' => 'Clip entfernen', |
195 | | - 'mwe-no_selected_resource' => '<h3>Keine Quelle ausgewählt</h3> Wähle einen Clip aus, um das Bearbeiten zu aktivieren.', |
196 | | - 'mwe-error_edit_multiple' => '<h3>Mehrere Quellen ausgewählt</h3> Wähle nur einen Clip aus, um ihn zu bearbeiten.', |
197 | | - 'mwe-editor_options' => 'Editoroptionen', |
198 | | - 'mwe-editor_mode' => 'Editormodus', |
199 | | - 'mwe-simple_editor_desc' => 'einfacher Editor (iMovie-Stil)', |
200 | | - 'mwe-advanced_editor_desc' => 'erweiterter Editor (Final-Cut-Stil)', |
201 | | - 'mwe-other_options' => 'Andere Optionen', |
202 | | - 'mwe-contextmenu_opt' => 'Kontextmenüs aktivieren', |
203 | | - 'mwe-sequencer_credit_line' => 'Entwickelt von <a href="http://kaltura.com">Kaltura, Inc.</a> in Zusammenarbeit mit der <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">mehr Informationen</a>).', |
204 | | -); |
205 | | -$messages['diq'] = array( |
206 | | - 'mwe-transition_in' => 'dekewtış', |
207 | | - 'mwe-transition_out' => 'teber kewtış', |
208 | | - 'mwe-effects' => 'loda (kopê) efekti', |
209 | | - 'mwe-remove_transition' => 'raviyertış wedar/werad', |
210 | | - 'mwe-edit_transin' => 'şiyayişê klibi bıvurn', |
211 | | - 'mwe-edit_transout' => 'klip ra şliyayiş bıvurn', |
212 | | - 'mwe-add-transition' => 'Yew çarnayiş de bike', |
213 | | - 'mwe-menu_clipedit' => 'medya bıvurn', |
214 | | - 'mwe-menu_transition' => 'efekt u raviyertışi', |
215 | | - 'mwe-menu_cliplib' => 'medya têarê ker', |
216 | | - 'mwe-menu_resource_overview' => 'Resource overview', |
217 | | - 'mwe-menu_options' => 'tercihi', |
218 | | - 'mwe-loading_timeline' => 'Loading timeline ...', |
219 | | - 'mwe-loading_user_rights' => 'heqê karberi bar bêni', |
220 | | - 'mwe-no_edit_permissions' => 'şıma nêşkeni vuriyayişan no rêzkerdışi re qeyd bıkeri', |
221 | | - 'mwe-edit_clip' => 'klib bıvurn', |
222 | | - 'mwe-edit_save' => 'vuriyayişanê rêzkerdışan qeyd bıker', |
223 | | - 'mwe-saving_wait' => 'qeyd kerdış dewam keno ( kerem kerê vınderê)', |
224 | | - 'mwe-save_done' => 'qeyd kerdış temam bı', |
225 | | - 'mwe-edit_cancel' => 'vuriyayişê rêzbiyayişi iptal bıker', |
226 | | - 'mwe-edit_cancel_confirm' => 'şıma raşta wazeni vurnayişanê xo iptal ker? vuriyayişi vindibeni', |
227 | | - 'mwe-zoom_in' => 'biyar nızdi (zoom ker)', |
228 | | - 'mwe-zoom_out' => 'dûr ker (zoom meker)', |
229 | | - 'mwe-cut_clip' => 'kliban bıqesn', |
230 | | - 'mwe-expand_track' => 'reç hêra ker', |
231 | | - 'mwe-collapse_track' => 'reç teng ker', |
232 | | - 'mwe-play_from_position' => 'bı serê xetê kaydayiş ra bıd\' kaydayış', |
233 | | - 'mwe-pixle2sec' => 'piksel re saniye', |
234 | | - 'mwe-rmclip' => 'klib wedar/werad', |
235 | | - 'mwe-clip_in' => 'zerre re klib', |
236 | | - 'mwe-clip_out' => 'teber re klib', |
237 | | - 'mwe-no_selected_resource' => '<h3>çı çıme nêvıciya</h3> qey aktifkerdışê vurnayişi yew klib bıvıcinê.', |
238 | | - 'mwe-error_edit_multiple' => '<h3>yew ra zêd çıme vıciya</h3> qey vurnayişi yew klib bıvıcinê.', |
239 | | - 'mwe-editor_options' => 'tercihê editori', |
240 | | - 'mwe-editor_mode' => 'modê editori', |
241 | | - 'mwe-simple_editor_desc' => 'editoro basit (bı stilê imovie\'yi)', |
242 | | - 'mwe-advanced_editor_desc' => 'editoro dewlemend (bı stilê final cut\'i)', |
243 | | - 'mwe-other_options' => 'tercihê bini', |
244 | | - 'mwe-contextmenu_opt' => 'menuyê muhtewayan aktif bıker', |
245 | | - 'mwe-sequencer_credit_line' => 'hetê <a href="http://kaltura.com">Kaltura, Inc.</a>yi ra pê ortaxiyê <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">qey malumato zêd</a>)yi dewlemend biyo.', |
246 | | -); |
247 | | -$messages['dsb'] = array( |
248 | | - 'mwe-transition_in' => 'Zablendowanje', |
249 | | - 'mwe-transition_out' => 'Wublendowanje', |
250 | | - 'mwe-effects' => 'Skład efektow', |
251 | | - 'mwe-remove_transition' => 'Pśechad wótpóraś', |
252 | | - 'mwe-edit_transin' => 'Zablendowanje do klipa wobźěłaś', |
253 | | - 'mwe-edit_transout' => 'Wublendowanje z klipa wobźěłaś', |
254 | | - 'mwe-add-transition' => 'Pśechad pśidaś', |
255 | | - 'mwe-menu_clipedit' => 'Medije wobźěłaś', |
256 | | - 'mwe-menu_transition' => 'Pśechady a efekty', |
257 | | - 'mwe-menu_cliplib' => 'Medije pśidaś', |
258 | | - 'mwe-menu_resource_overview' => 'Pśeglěd resursow', |
259 | | - 'mwe-menu_options' => 'Opcije', |
260 | | - 'mwe-loading_timeline' => 'Casowu ceru zacytaś ...', |
261 | | - 'mwe-loading_user_rights' => 'Wužywarske pšawa se zacytuju ...', |
262 | | - 'mwe-no_edit_permissions' => 'Njamaš pšawa, aby změny na toś tej sekwency składował.', |
263 | | - 'mwe-edit_clip' => 'Klip wobźěłaś', |
264 | | - 'mwe-edit_save' => 'Sekwencowe změny składowaś', |
265 | | - 'mwe-saving_wait' => 'Składujo se rowno (pšosym cakaj)', |
266 | | - 'mwe-save_done' => 'Składowanje dokóńcone', |
267 | | - 'mwe-edit_cancel' => 'Wobźěłanje sekwence pśetergnuś', |
268 | | - 'mwe-edit_cancel_confirm' => 'Coš napšawdu swójo wobźěłanje pśetergnuś? Změny se zgubiju.', |
269 | | - 'mwe-zoom_in' => 'Pówětšyś', |
270 | | - 'mwe-zoom_out' => 'Pómjeńšyś', |
271 | | - 'mwe-cut_clip' => 'Klipy stśigaś', |
272 | | - 'mwe-expand_track' => 'Ceru wuklapnuś', |
273 | | - 'mwe-collapse_track' => 'Ceru złožyś', |
274 | | - 'mwe-play_from_position' => 'Wót pozicije wótegraś', |
275 | | - 'mwe-pixle2sec' => 'piksele do sekundow', |
276 | | - 'mwe-rmclip' => 'Klip wótpóraś', |
277 | | - 'mwe-clip_in' => 'Klip pśidaś', |
278 | | - 'mwe-clip_out' => 'Klip wótpóraś', |
279 | | - 'mwe-no_selected_resource' => '<h3>Žedna resursa wubrana</h3> Wubjeŕ klip, aby zmóžnił wobźěłowanje.', |
280 | | - 'mwe-error_edit_multiple' => '<h3>Někotare resurse wubrane</h3> Wubjeŕ jadnotliwy klip, aby jen wobźěłał.', |
281 | | - 'mwe-editor_options' => 'Editorowe opcije', |
282 | | - 'mwe-editor_mode' => 'Editorowy modus', |
283 | | - 'mwe-simple_editor_desc' => 'jadnory editor (stil iMovie)', |
284 | | - 'mwe-advanced_editor_desc' => 'rozšyrjony editor (stil Final Cut)', |
285 | | - 'mwe-other_options' => 'Druge opcije', |
286 | | - 'mwe-contextmenu_opt' => 'Kontekstowe menije zmóžniś', |
287 | | - 'mwe-sequencer_credit_line' => 'Wuwity wót <a href="http://kaltura.com">Kaltura, Inc.</a> gromaźe ze załožbu <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">dalšne informacije</a>).', |
288 | | -); |
289 | | -$messages['el'] = array( |
290 | | - 'mwe-transition_in' => 'Ταχύτητα μέσα', |
291 | | - 'mwe-transition_out' => 'Ταχύτητα έξω', |
292 | | - 'mwe-remove_transition' => 'Αφαίρεση ταχύτητας', |
293 | | - 'mwe-menu_clipedit' => 'Επεξεργασία μέσου', |
294 | | - 'mwe-menu_cliplib' => 'Προσθήκη μέσου', |
295 | | - 'mwe-menu_resource_overview' => 'Επισκόπηση πηγής', |
296 | | - 'mwe-menu_options' => 'Επιλογές', |
297 | | - 'mwe-loading_timeline' => 'Φορτώνει η χρονολογία ...', |
298 | | - 'mwe-loading_user_rights' => 'Φορτώνουν τα δικαιώματα χρήστη ...', |
299 | | - 'mwe-edit_clip' => 'Επεξεργασία κλιπ', |
300 | | - 'mwe-edit_save' => 'Αποθήκευση αλλαγών ακολουθίας', |
301 | | - 'mwe-saving_wait' => 'Αποθήκευση σε εξέλιξη (παρακαλώ περιμένετε)', |
302 | | - 'mwe-save_done' => 'Η αποθήκευση ολοκληρώθηκε', |
303 | | - 'mwe-edit_cancel' => 'Ακύρωση επεξεργασίας ακολουθίας', |
304 | | - 'mwe-zoom_in' => 'Μεγέθυνση', |
305 | | - 'mwe-zoom_out' => 'Σμίκρυνση', |
306 | | - 'mwe-pixle2sec' => 'πίξελ ανά δευτερόλεπτα', |
307 | | - 'mwe-rmclip' => 'Αφαίρεση κλιπ', |
308 | | - 'mwe-editor_options' => 'Επιλογές επεξεργαστή', |
309 | | - 'mwe-editor_mode' => 'Λειτουργία επεξεργαστή', |
310 | | - 'mwe-simple_editor_desc' => 'απλός επεξεργαστής (iMovie στυλ)', |
311 | | - 'mwe-advanced_editor_desc' => 'προχωρημένος επεξεργαστής (Final Cut στυλ)', |
312 | | - 'mwe-other_options' => 'Άλλες επιλογές', |
313 | | -); |
314 | | -$messages['eo'] = array( |
315 | | - 'mwe-menu_options' => 'Agordoj', |
316 | | - 'mwe-zoom_in' => 'Zomi', |
317 | | - 'mwe-zoom_out' => 'Malzomi', |
318 | | - 'mwe-editor_options' => 'Opcioj por redaktilo', |
319 | | - 'mwe-editor_mode' => 'Redakta reĝimo', |
320 | | - 'mwe-other_options' => 'Aliaj agordoj', |
321 | | -); |
322 | | -$messages['es'] = array( |
323 | | - 'mwe-transition_in' => 'Transición de entrada', |
324 | | - 'mwe-transition_out' => 'Transición de salida', |
325 | | - 'mwe-effects' => 'Pila de efectos', |
326 | | - 'mwe-remove_transition' => 'Remover transición', |
327 | | - 'mwe-edit_transin' => 'Editar la transición en el clip', |
328 | | - 'mwe-edit_transout' => 'Editar la transición fuera del clip', |
329 | | - 'mwe-add-transition' => 'Añadir una transición', |
330 | | - 'mwe-menu_clipedit' => 'Editar medios', |
331 | | - 'mwe-menu_transition' => 'Transiciones y efectos', |
332 | | - 'mwe-menu_cliplib' => 'Agregar medios', |
333 | | - 'mwe-menu_options' => 'Opciones', |
334 | | - 'mwe-loading_timeline' => 'Cargando línea temporal...', |
335 | | - 'mwe-loading_user_rights' => 'Cargando derechos de usuario...', |
336 | | - 'mwe-no_edit_permissions' => 'No tienes permisos para grabar cambios a esta secuencia', |
337 | | - 'mwe-edit_clip' => 'Editar clip', |
338 | | - 'mwe-edit_save' => 'Grabar cambios de secuencia', |
339 | | - 'mwe-saving_wait' => 'Grabado en proceso (por favor espere)', |
340 | | - 'mwe-save_done' => 'Grabar completo', |
341 | | - 'mwe-edit_cancel' => 'Cancelar edición de secuencia', |
342 | | - 'mwe-edit_cancel_confirm' => 'Estás seguro que deseas cancelar tu edición? Los cambios se perderán.', |
343 | | - 'mwe-zoom_in' => 'Agrandar', |
344 | | - 'mwe-zoom_out' => 'Achicar', |
345 | | - 'mwe-cut_clip' => 'Cortar clips', |
346 | | - 'mwe-expand_track' => 'Expandir la pista', |
347 | | - 'mwe-collapse_track' => 'Contraer la pista', |
348 | | - 'mwe-pixle2sec' => 'píxeles a segundos', |
349 | | - 'mwe-rmclip' => 'Remover clip', |
350 | | - 'mwe-editor_options' => 'Opciones de editor', |
351 | | - 'mwe-editor_mode' => 'Modo editor', |
352 | | - 'mwe-simple_editor_desc' => 'editor simple(estilo iMovie)', |
353 | | - 'mwe-advanced_editor_desc' => 'editor avanzado (estilo Final Cut)', |
354 | | - 'mwe-other_options' => 'Otras opciones', |
355 | | - 'mwe-contextmenu_opt' => 'Habilitar menúes contextuales', |
356 | | - 'mwe-sequencer_credit_line' => 'Desarrollado por <a href="http://kaltura.com">Kaltura, Inc.</a> en asociación con <a href="http://wikimediafoundation.org/wiki/Home">Fundación Wikimedia</a> (<a href="#">más información</a>).', |
357 | | -); |
358 | | -$messages['fi'] = array( |
359 | | - 'mwe-menu_options' => 'Asetukset', |
360 | | - 'mwe-simple_editor_desc' => 'yksinkertainen editori (iMovie-tyyli)', |
361 | | - 'mwe-other_options' => 'Muut valinnat', |
362 | | - 'mwe-sequencer_credit_line' => 'Kehittänyt <a href="http://kaltura.com">Kaltura, Inc.</a> yhteistyössä <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundationin</a> kanssa (<a href="#">lisätietoja</a>).', |
363 | | -); |
364 | | -$messages['fr'] = array( |
365 | | - 'mwe-transition_in' => 'Transition entrante', |
366 | | - 'mwe-transition_out' => 'Transition sortante', |
367 | | - 'mwe-effects' => 'Pile d\'effets', |
368 | | - 'mwe-remove_transition' => 'Supprimer la transition', |
369 | | - 'mwe-edit_transin' => 'Modifier la transition vers le clip', |
370 | | - 'mwe-edit_transout' => 'Modifier la transition hors du clip', |
371 | | - 'mwe-add-transition' => 'Ajouter une traduction', |
372 | | - 'mwe-menu_clipedit' => 'Modifier le media', |
373 | | - 'mwe-menu_transition' => 'Transitions et effets', |
374 | | - 'mwe-menu_cliplib' => 'Ajouter un media', |
375 | | - 'mwe-menu_resource_overview' => 'Vue d\'ensemble de la ressource', |
376 | | - 'mwe-menu_options' => 'Options', |
377 | | - 'mwe-loading_timeline' => 'Chargement de la chronologie ...', |
378 | | - 'mwe-loading_user_rights' => 'Chargement des droits d\'utilisateur ...', |
379 | | - 'mwe-no_edit_permissions' => 'Vous n\'avez pas l\'autorisation de sauvegarder les changements apportés à cette séquence', |
380 | | - 'mwe-edit_clip' => 'Modifier le clip', |
381 | | - 'mwe-edit_save' => 'Sauvegarder les modifications de la séquence', |
382 | | - 'mwe-saving_wait' => 'Sauvegarde en cours (veuillez patienter)', |
383 | | - 'mwe-save_done' => 'Sauvegarde terminée', |
384 | | - 'mwe-edit_cancel' => 'Annuler la modification de la séquence', |
385 | | - 'mwe-edit_cancel_confirm' => 'Êtes-vous sûr de vouloir annuler votre modification ? Les changements seront perdus.', |
386 | | - 'mwe-zoom_in' => 'Zoom avant', |
387 | | - 'mwe-zoom_out' => 'Zoom arrière', |
388 | | - 'mwe-cut_clip' => 'Couper les clips', |
389 | | - 'mwe-expand_track' => 'Étendre la piste', |
390 | | - 'mwe-collapse_track' => 'Réduire la piste', |
391 | | - 'mwe-play_from_position' => 'Lire à partir de la position de lecture', |
392 | | - 'mwe-pixle2sec' => 'pixels vers secondes', |
393 | | - 'mwe-rmclip' => 'Supprimer le clip', |
394 | | - 'mwe-clip_in' => 'attacher', |
395 | | - 'mwe-clip_out' => 'détacher', |
396 | | - 'mwe-no_selected_resource' => '<h3>Aucune ressource sélectionnée</h3> Sélectionnez un clip pour activer l\'édition', |
397 | | - 'mwe-error_edit_multiple' => '<h3>Plusieurs ressources sélectionnées</h3> Sélectionnez un seul clip pour le modifier', |
398 | | - 'mwe-editor_options' => 'Options de l\'éditeur', |
399 | | - 'mwe-editor_mode' => 'Mode de l\'éditeur', |
400 | | - 'mwe-simple_editor_desc' => 'éditeur simple (style iMovie)', |
401 | | - 'mwe-advanced_editor_desc' => 'éditeur avancé (style Final Cut)', |
402 | | - 'mwe-other_options' => 'Autres options', |
403 | | - 'mwe-contextmenu_opt' => 'Activer les menus contextuels', |
404 | | - 'mwe-sequencer_credit_line' => 'Développé par <a href="http://kaltura.com">Kaltura, Inc.</a> en partenariat avec la <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">plus d\'information</a>).', |
405 | | -); |
406 | | -$messages['gl'] = array( |
407 | | - 'mwe-transition_in' => 'Transición de entrada', |
408 | | - 'mwe-transition_out' => 'Transición de saída', |
409 | | - 'mwe-effects' => 'Pila de efectos', |
410 | | - 'mwe-remove_transition' => 'Eliminar a transición', |
411 | | - 'mwe-edit_transin' => 'Editar a transición no vídeo', |
412 | | - 'mwe-edit_transout' => 'Editar a transición fóra do vídeo', |
413 | | - 'mwe-add-transition' => 'Engadir unha transición', |
414 | | - 'mwe-menu_clipedit' => 'Editar o soporte', |
415 | | - 'mwe-menu_transition' => 'Transicións e efectos', |
416 | | - 'mwe-menu_cliplib' => 'Engadir un soporte', |
417 | | - 'mwe-menu_resource_overview' => 'Vista xeral dos recursos', |
418 | | - 'mwe-menu_options' => 'Opcións', |
419 | | - 'mwe-loading_timeline' => 'Cargando a liña do tempo...', |
420 | | - 'mwe-loading_user_rights' => 'Cargando os dereitos de usuario...', |
421 | | - 'mwe-no_edit_permissions' => 'Non ten os permisos necesarios para gardar os cambios feitos nesta secuencia', |
422 | | - 'mwe-edit_clip' => 'Editar o vídeo', |
423 | | - 'mwe-edit_save' => 'Gardar os cambios feitos na secuencia', |
424 | | - 'mwe-saving_wait' => 'Gardando (por favor, espere)', |
425 | | - 'mwe-save_done' => 'Gardado', |
426 | | - 'mwe-edit_cancel' => 'Cancelar a edición da secuencia', |
427 | | - 'mwe-edit_cancel_confirm' => 'Está seguro de querer cancelar a súa edición? Perderanse todos os cambios feitos.', |
428 | | - 'mwe-zoom_in' => 'Ampliar', |
429 | | - 'mwe-zoom_out' => 'Reducir', |
430 | | - 'mwe-cut_clip' => 'Cortar os vídeos', |
431 | | - 'mwe-expand_track' => 'Expandir a pista', |
432 | | - 'mwe-collapse_track' => 'Contraer a pista', |
433 | | - 'mwe-play_from_position' => 'Reproducir desde a posición de lectura', |
434 | | - 'mwe-pixle2sec' => 'píxeles a segundos', |
435 | | - 'mwe-rmclip' => 'Eliminar o vídeo', |
436 | | - 'mwe-clip_in' => 'achegar', |
437 | | - 'mwe-clip_out' => 'separar', |
438 | | - 'mwe-no_selected_resource' => '<h3>Non se seleccionou ningún recurso</h3> Seleccione un vídeo para permitir a edición.', |
439 | | - 'mwe-error_edit_multiple' => '<h3>Seleccionáronse varios recursos</h3> Seleccione soamente un vídeo para editalo.', |
440 | | - 'mwe-editor_options' => 'Opcións do editor', |
441 | | - 'mwe-editor_mode' => 'Modo do editor', |
442 | | - 'mwe-simple_editor_desc' => 'editor simple (estilo iMovie)', |
443 | | - 'mwe-advanced_editor_desc' => 'editor avanzado (estilo Final Cut)', |
444 | | - 'mwe-other_options' => 'Outras opcións', |
445 | | - 'mwe-contextmenu_opt' => 'Activar os menús contextuais', |
446 | | - 'mwe-sequencer_credit_line' => 'Desenvolvido por <a href="http://kaltura.com">Kaltura, Inc.</a> en colaboración coa <a href="http://wikimediafoundation.org/wiki/Portada_galega">Fundación Wikimedia</a> (<a href="#">máis información</a>).', |
447 | | -); |
448 | | -$messages['gsw'] = array( |
449 | | - 'mwe-transition_in' => 'Ibergang aa', |
450 | | - 'mwe-transition_out' => 'Ibergang ab', |
451 | | - 'mwe-effects' => 'Effäkt-Stacks', |
452 | | - 'mwe-remove_transition' => 'Ibergang useneh', |
453 | | - 'mwe-edit_transin' => 'Ibergang im Clip bearbeite', |
454 | | - 'mwe-edit_transout' => 'Ibergang usserhalb vum Clip bearbeite', |
455 | | - 'mwe-add-transition' => 'Ibergang zuefiege', |
456 | | - 'mwe-menu_clipedit' => 'Medie bearbeite', |
457 | | - 'mwe-menu_transition' => 'Ibergäng un Effäkt', |
458 | | - 'mwe-menu_cliplib' => 'Medie zuefiege', |
459 | | - 'mwe-menu_resource_overview' => 'Quälleibersicht', |
460 | | - 'mwe-menu_options' => 'Optione', |
461 | | - 'mwe-loading_timeline' => 'Am Lade vun ere Zytzylete ...', |
462 | | - 'mwe-loading_user_rights' => 'Am Lade vu Benutzerrächt ...', |
463 | | - 'mwe-no_edit_permissions' => 'Du derfsch Änderige in däm Abschnitt nit spychere', |
464 | | - 'mwe-edit_clip' => 'Clip bearbeite', |
465 | | - 'mwe-edit_save' => 'Änderige am Abschnitt spychere', |
466 | | - 'mwe-saving_wait' => 'Grad am Spychere (bitte wart no)', |
467 | | - 'mwe-save_done' => 'Spychere fertig', |
468 | | - 'mwe-edit_cancel' => 'Bearbeitig vu däm Abschnitt abbräche', |
469 | | - 'mwe-edit_cancel_confirm' => 'Bisch sicher, ass Du Dyni bearbeitig witt abbräche? Alli Änderige gehn derno verlore.', |
470 | | - 'mwe-zoom_in' => 'Vergreßere', |
471 | | - 'mwe-zoom_out' => 'Verchleinere', |
472 | | - 'mwe-cut_clip' => 'Clips uusschnitte', |
473 | | - 'mwe-expand_track' => 'Spur uusklappe', |
474 | | - 'mwe-collapse_track' => 'Spur yyklappe', |
475 | | - 'mwe-play_from_position' => 'Abspile ab dr Playline-Position', |
476 | | - 'mwe-pixle2sec' => 'Pixel je Sekund', |
477 | | - 'mwe-rmclip' => 'Clip uuseneh', |
478 | | - 'mwe-clip_in' => 'Clip zuefiege', |
479 | | - 'mwe-clip_out' => 'Clip uuseneh', |
480 | | - 'mwe-no_selected_resource' => '<h3>Kei Quälle uusgwehlt</h3> Wehl e Clip uus go s Bearbeite meglig mache.', |
481 | | - 'mwe-error_edit_multiple' => '<h3>Meh wie ei Quälle uusgwehlt</h3> Wehl ei einzige Clip zuem Bearbeite uus.', |
482 | | - 'mwe-editor_options' => 'Yystellige zum Bearbeite', |
483 | | - 'mwe-editor_mode' => 'Bearbeitigsmodus', |
484 | | - 'mwe-simple_editor_desc' => 'Eifachi Bearbeitig (iMovie-Stil)', |
485 | | - 'mwe-advanced_editor_desc' => 'Fortgschritteni Bearbeitig (Final Cut-Stil)', |
486 | | - 'mwe-other_options' => 'Anderi Optione', |
487 | | - 'mwe-contextmenu_opt' => 'Kontext-Menüs zueloo', |
488 | | - 'mwe-sequencer_credit_line' => 'Entwicklet dur <a href="http://kaltura.com">Kaltura, Inc.</a> zämme mit dr <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">meh Informatione</a>).', |
489 | | -); |
490 | | -$messages['he'] = array( |
491 | | - 'mwe-transition_in' => 'מעברון כניסה', |
492 | | - 'mwe-transition_out' => 'מעברון יציאה', |
493 | | - 'mwe-effects' => 'מכלול האפקטים', |
494 | | - 'mwe-remove_transition' => 'הסרת המעברון', |
495 | | - 'mwe-edit_transin' => 'עריכת המעברון אל תוך הסרטון', |
496 | | - 'mwe-edit_transout' => 'עריכת המעברון אל מחוץ לסרטון', |
497 | | - 'mwe-menu_clipedit' => 'עריכת המדיה', |
498 | | - 'mwe-menu_transition' => 'מעברונים ואפקטים', |
499 | | - 'mwe-menu_cliplib' => 'הוספת מדיה', |
500 | | - 'mwe-menu_resource_overview' => 'סקירת המשאבים', |
501 | | - 'mwe-menu_options' => 'אפשרויות', |
502 | | - 'mwe-loading_timeline' => 'מתבצעת טעינת ציר הזמן ...', |
503 | | - 'mwe-loading_user_rights' => 'מתבצעת טעינת הרשאות המשתמש ...', |
504 | | - 'mwe-no_edit_permissions' => 'אין לכם הרשאות לשמור את השינויים לרצף זה', |
505 | | - 'mwe-edit_clip' => 'עריכת הסרטון', |
506 | | - 'mwe-edit_save' => 'שמירת השינויים ברצף', |
507 | | - 'mwe-saving_wait' => 'השמירה מתבצעת (נא להמתין)', |
508 | | - 'mwe-save_done' => 'השמירה הושלמה', |
509 | | - 'mwe-edit_cancel' => 'ביטול עריכת הרצף', |
510 | | - 'mwe-edit_cancel_confirm' => 'האם אתם בטוחים שברצונם לבטל את עריכתכם? השינויים יאבדו.', |
511 | | - 'mwe-zoom_in' => 'התקרבות', |
512 | | - 'mwe-zoom_out' => 'התרחקות', |
513 | | - 'mwe-cut_clip' => 'גזירת סרטונים', |
514 | | - 'mwe-expand_track' => 'הרחבת הרצועה', |
515 | | - 'mwe-collapse_track' => 'צמצום הרצועה', |
516 | | - 'mwe-play_from_position' => 'נגינה מהמיקום בשורת הנגינה', |
517 | | - 'mwe-pixle2sec' => 'פיקסלים לשניות', |
518 | | - 'mwe-rmclip' => 'הסרת סרטון', |
519 | | - 'mwe-no_selected_resource' => '<h3>לא נבחר משאב</h3> יש לבחור סרטון כדי לאפשר עריכה.', |
520 | | - 'mwe-error_edit_multiple' => '<h3>נבחרו מספר מקורות</h3> יש לבחור בקטע בודד כדי לערוך אותו.', |
521 | | - 'mwe-editor_options' => 'אפשרויות העורך', |
522 | | - 'mwe-editor_mode' => 'מצב עורך', |
523 | | - 'mwe-simple_editor_desc' => 'עורך פשוט (בסגנון iMovie)', |
524 | | - 'mwe-advanced_editor_desc' => 'עורך מתקדם (בסגנון Final Cut)', |
525 | | - 'mwe-other_options' => 'אפשרויות אחרות', |
526 | | - 'mwe-contextmenu_opt' => 'הפעלת תפריטי ההקשר', |
527 | | - 'mwe-sequencer_credit_line' => 'פותח על ידי <a href="http://kaltura.com">Kaltura בע"מ</a> בשיתוף עם <a href="http://wikimediafoundation.org/wiki/Home">קרן ויקימדיה</a> (<a href="#">למידע נוסף</a>).', |
528 | | -); |
529 | | -$messages['hsb'] = array( |
530 | | - 'mwe-transition_in' => 'Zablendować', |
531 | | - 'mwe-transition_out' => 'Wublendować', |
532 | | - 'mwe-effects' => 'Stapl efektow', |
533 | | - 'mwe-remove_transition' => 'Přechad wotstronić', |
534 | | - 'mwe-edit_transin' => 'Přechod do klipa wobdźěłać', |
535 | | - 'mwe-edit_transout' => 'Přechod z klipa wobdźěłać', |
536 | | - 'mwe-add-transition' => 'Přechad přidać', |
537 | | - 'mwe-menu_clipedit' => 'Medije wobdźěłać', |
538 | | - 'mwe-menu_transition' => 'Přechady a efekty', |
539 | | - 'mwe-menu_cliplib' => 'Medije přidać', |
540 | | - 'mwe-menu_resource_overview' => 'Resursowy přehlad', |
541 | | - 'mwe-menu_options' => 'Opcije', |
542 | | - 'mwe-loading_timeline' => 'Časowa lajsta ...', |
543 | | - 'mwe-loading_user_rights' => 'Wužiwarske prawa so začituja ...', |
544 | | - 'mwe-no_edit_permissions' => 'Nimaš prawa, zo by změny na tutej sekwency składował', |
545 | | - 'mwe-edit_clip' => 'Klip wobdźěłać', |
546 | | - 'mwe-edit_save' => 'Změny sekwency składować', |
547 | | - 'mwe-saving_wait' => 'Składuje so runje (prošu čakać)', |
548 | | - 'mwe-save_done' => 'Składowanje zakónčene', |
549 | | - 'mwe-edit_cancel' => 'Wobdźěłowanje sekwency přetorhnyć', |
550 | | - 'mwe-edit_cancel_confirm' => 'Chceš woprawdźe swoje wobdźěłanje zaćisnyć? Změny so zhubja.', |
551 | | - 'mwe-zoom_in' => 'Powjetšić', |
552 | | - 'mwe-zoom_out' => 'Pomjeńšić', |
553 | | - 'mwe-cut_clip' => 'Klipy třihać', |
554 | | - 'mwe-expand_track' => 'Ćěr rozfałdować', |
555 | | - 'mwe-collapse_track' => 'Ćěr fałdować', |
556 | | - 'mwe-play_from_position' => 'Wot aktuelneje pozicije wohtrać', |
557 | | - 'mwe-pixle2sec' => 'piksele do sekundow', |
558 | | - 'mwe-rmclip' => 'Klip wotstronić', |
559 | | - 'mwe-clip_in' => 'klip přidać', |
560 | | - 'mwe-clip_out' => 'klip wotstronić', |
561 | | - 'mwe-no_selected_resource' => '<h3>Žana resursa wubrana</h3> Wubjer klip, zo by wobdźěłowanje zmóžnił.', |
562 | | - 'mwe-error_edit_multiple' => '<h3>Wjacore resursy wubrane</h3> Wubjer jednotliwy klip za wobdźěłanje.', |
563 | | - 'mwe-editor_options' => 'Editorowe opcije', |
564 | | - 'mwe-editor_mode' => 'Editorowy modus', |
565 | | - 'mwe-simple_editor_desc' => 'jednory editor (stil iMovie)', |
566 | | - 'mwe-advanced_editor_desc' => 'rozšěrjeny editor (stil Final Cut)', |
567 | | - 'mwe-other_options' => 'Druhe opcije', |
568 | | - 'mwe-contextmenu_opt' => 'Kontekstowe menije zmóžnić', |
569 | | - 'mwe-sequencer_credit_line' => 'Wuwity wot <a href="http://kaltura.com">Kaltura, Inc.</a> w partnerstwje ze załožbu <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">dalše informacije</a>).', |
570 | | -); |
571 | | -$messages['hu'] = array( |
572 | | - 'mwe-transition_in' => 'Áttűnés kezdete', |
573 | | - 'mwe-transition_out' => 'Áttűnés vége', |
574 | | - 'mwe-effects' => 'Effektverem', |
575 | | - 'mwe-remove_transition' => 'Áttűnés eltávolítása', |
576 | | - 'mwe-edit_transin' => 'Kezdő átmenet szerkesztése', |
577 | | - 'mwe-edit_transout' => 'Klip végi átmenet szerkesztése', |
578 | | - 'mwe-add-transition' => 'Átmenet hozzáadása', |
579 | | - 'mwe-menu_clipedit' => 'Média szerkesztése', |
580 | | - 'mwe-menu_transition' => 'Áttűnések és effektek', |
581 | | - 'mwe-menu_cliplib' => 'Média hozzáadása', |
582 | | - 'mwe-menu_resource_overview' => 'Erőforrás áttekintés', |
583 | | - 'mwe-menu_options' => 'Beállítások', |
584 | | - 'mwe-loading_timeline' => 'Idővonal betöltése…', |
585 | | - 'mwe-loading_user_rights' => 'Felhasználói jogosultságok betöltése…', |
586 | | - 'mwe-no_edit_permissions' => 'Nincs jogosultságod a változtatások elmentéséhez a jelenetbe', |
587 | | - 'mwe-edit_clip' => 'Klip szerkesztése', |
588 | | - 'mwe-edit_save' => 'Jelenet változásainak mentése', |
589 | | - 'mwe-saving_wait' => 'Mentés folyamatban (kérlek várj)', |
590 | | - 'mwe-save_done' => 'Mentés kész', |
591 | | - 'mwe-edit_cancel' => 'Jelenet szerkesztésének eldobása', |
592 | | - 'mwe-edit_cancel_confirm' => 'Biztos vagy benne, hogy megszakítod a szerkesztést? A változtatások elvesznek.', |
593 | | - 'mwe-zoom_in' => 'Nagyítás', |
594 | | - 'mwe-zoom_out' => 'Kicsinyítés', |
595 | | - 'mwe-cut_clip' => 'Klipek vágása', |
596 | | - 'mwe-expand_track' => 'Sáv kibontása', |
597 | | - 'mwe-collapse_track' => 'Sáv összecsukása', |
598 | | - 'mwe-play_from_position' => 'Lejátszás a lejátszó pozíciójától', |
599 | | - 'mwe-pixle2sec' => 'képpontokat másodpercekké', |
600 | | - 'mwe-rmclip' => 'Klip eltávolítása', |
601 | | - 'mwe-clip_in' => 'klip eleji', |
602 | | - 'mwe-clip_out' => 'klip végi', |
603 | | - 'mwe-no_selected_resource' => '<h3>Nincs kiválasztott erőforrás</h3> Válassz egy klipet a szerkesztéshez.', |
604 | | - 'mwe-error_edit_multiple' => '<h3>Több erőforrás kiválasztva</h3> Egy klipet válassz a szerkesztéséhez.', |
605 | | - 'mwe-editor_options' => 'Szerkesztő beállításai', |
606 | | - 'mwe-editor_mode' => 'Szerkesztői mód', |
607 | | - 'mwe-simple_editor_desc' => 'egyszerű szerkesztő (iMovie stílusban)', |
608 | | - 'mwe-advanced_editor_desc' => 'haladó szerkesztő (Final Cut stílusban)', |
609 | | - 'mwe-other_options' => 'Egyéb beállítások', |
610 | | - 'mwe-contextmenu_opt' => 'Helyi menük engedélyezése', |
611 | | - 'mwe-sequencer_credit_line' => 'Fejlesztette a <a href="http://kaltura.com">Kaltura, Inc.</a> együttműködésben a <a href="http://wikimediafoundation.org/wiki/Home">Wikimédia Alapítvánnyal</a> (<a href="#">további információk</a>)', |
612 | | -); |
613 | | -$messages['ia'] = array( |
614 | | - 'mwe-transition_in' => 'Transition entrante', |
615 | | - 'mwe-transition_out' => 'Transition sortiente', |
616 | | - 'mwe-effects' => 'Pila de effectos', |
617 | | - 'mwe-remove_transition' => 'Remover transition', |
618 | | - 'mwe-edit_transin' => 'Inserer transition in clip', |
619 | | - 'mwe-edit_transout' => 'Remover transition del clip', |
620 | | - 'mwe-add-transition' => 'Adder un transition', |
621 | | - 'mwe-menu_clipedit' => 'Modificar multimedia', |
622 | | - 'mwe-menu_transition' => 'Transitiones e effectos', |
623 | | - 'mwe-menu_cliplib' => 'Adder multimedia', |
624 | | - 'mwe-menu_resource_overview' => 'Summario de ressources', |
625 | | - 'mwe-menu_options' => 'Optiones', |
626 | | - 'mwe-loading_timeline' => 'Carga chronologia ...', |
627 | | - 'mwe-loading_user_rights' => 'Carga derectos de usator ...', |
628 | | - 'mwe-no_edit_permissions' => 'Tu non ha le permission de immagazinar modificationes a iste sequentia', |
629 | | - 'mwe-edit_clip' => 'Modificar clip', |
630 | | - 'mwe-edit_save' => 'Immagazinar modificationes del sequentia', |
631 | | - 'mwe-saving_wait' => 'Immagazinage in curso (per favor attende)', |
632 | | - 'mwe-save_done' => 'Immagazinage complete', |
633 | | - 'mwe-edit_cancel' => 'Cancellar modification del sequentia', |
634 | | - 'mwe-edit_cancel_confirm' => 'Es tu secur de voler cancellar tu modification? Le cambiamentos essera perdite.', |
635 | | - 'mwe-zoom_in' => 'Zoom avante', |
636 | | - 'mwe-zoom_out' => 'Zoom retro', |
637 | | - 'mwe-cut_clip' => 'Trenchar clips', |
638 | | - 'mwe-expand_track' => 'Expander tracia', |
639 | | - 'mwe-collapse_track' => 'Contraher tracia', |
640 | | - 'mwe-play_from_position' => 'Reproducer a partir del position de lectura', |
641 | | - 'mwe-pixle2sec' => 'pixeles a secundas', |
642 | | - 'mwe-rmclip' => 'Remover clip', |
643 | | - 'mwe-clip_in' => 'attachar', |
644 | | - 'mwe-clip_out' => 'distachar', |
645 | | - 'mwe-no_selected_resource' => '<h3>Nulle ressource seligite</h3> Selige un clip pro activar le modification.', |
646 | | - 'mwe-error_edit_multiple' => '<h3>Plure ressources seligite</h3> Selige un sol clip pro modificar lo.', |
647 | | - 'mwe-editor_options' => 'Optiones de editor', |
648 | | - 'mwe-editor_mode' => 'Modo de editor', |
649 | | - 'mwe-simple_editor_desc' => 'editor simple (stilo iMovie)', |
650 | | - 'mwe-advanced_editor_desc' => 'editor avantiate (stilo Final Cut)', |
651 | | - 'mwe-other_options' => 'Altere optiones', |
652 | | - 'mwe-contextmenu_opt' => 'Activar menus contextual', |
653 | | - 'mwe-sequencer_credit_line' => 'Disveloppate per <a href="http://kaltura.com">Kaltura, Inc.</a> in association con le <a href="http://wikimediafoundation.org/wiki/Home">Fundation Wikimedia</a> (<a href="#">plus information</a>).', |
654 | | -); |
655 | | -$messages['id'] = array( |
656 | | - 'mwe-transition_in' => 'Transisi masuk', |
657 | | - 'mwe-transition_out' => 'Transisi keluar', |
658 | | - 'mwe-effects' => 'Tumpuk efek', |
659 | | - 'mwe-remove_transition' => 'Singkirkan transisi', |
660 | | - 'mwe-edit_transin' => 'Sunting transisi masuk klip', |
661 | | - 'mwe-edit_transout' => 'Sunting transisi keluar klip', |
662 | | - 'mwe-add-transition' => 'Tambahkan transisi', |
663 | | - 'mwe-menu_clipedit' => 'Sunting media', |
664 | | - 'mwe-menu_transition' => 'Transisi dan efek', |
665 | | - 'mwe-menu_cliplib' => 'Tambah media', |
666 | | - 'mwe-menu_resource_overview' => 'Tinjauan sumber daya', |
667 | | - 'mwe-menu_options' => 'Pilihan', |
668 | | - 'mwe-loading_timeline' => 'Memuat garis waktu ...', |
669 | | - 'mwe-loading_user_rights' => 'Memuat hak pengguna ...', |
670 | | - 'mwe-no_edit_permissions' => 'Anda tidak memiliki hak untuk menyimpan perubahan pada bagian ini', |
671 | | - 'mwe-edit_clip' => 'Sunting klip', |
672 | | - 'mwe-edit_save' => 'Simpan perubahan urutan', |
673 | | - 'mwe-saving_wait' => 'Penyimpanan dalam proses (mohoon tunggu)', |
674 | | - 'mwe-save_done' => 'Menyimpanan lengkap', |
675 | | - 'mwe-edit_cancel' => 'Batalkan suntingan urutan', |
676 | | - 'mwe-edit_cancel_confirm' => 'Apakan anda yakin akan membatalkan suntingan anda? Perubahan akan hilang.', |
677 | | - 'mwe-zoom_in' => 'Zum masuk', |
678 | | - 'mwe-zoom_out' => 'Zum keluar', |
679 | | - 'mwe-cut_clip' => 'Potong klip', |
680 | | - 'mwe-expand_track' => 'Kembangkan trek', |
681 | | - 'mwe-collapse_track' => 'Ciutkan trek', |
682 | | - 'mwe-play_from_position' => 'Putar dari posisi playline', |
683 | | - 'mwe-pixle2sec' => 'piksel ke detik', |
684 | | - 'mwe-rmclip' => 'Hapus klip', |
685 | | - 'mwe-clip_in' => 'klip masuk', |
686 | | - 'mwe-clip_out' => 'klip keluar', |
687 | | - 'mwe-no_selected_resource' => '<h3>Tidak ada sumber dipilih</h3> Pilih klip untuk mengaktifkan suntingan.', |
688 | | - 'mwe-error_edit_multiple' => '<h3>Beberapa sumber telah dipilih</h3> Pilih satu klip untuk disunting.', |
689 | | - 'mwe-editor_options' => 'Pilihan penyunting', |
690 | | - 'mwe-editor_mode' => 'Modus sunting', |
691 | | - 'mwe-simple_editor_desc' => 'suntingan sederhana (gaya iMovie)', |
692 | | - 'mwe-advanced_editor_desc' => 'suntingan lanjutan (gaya potongan akhir)', |
693 | | - 'mwe-other_options' => 'Pilihan lain', |
694 | | - 'mwe-contextmenu_opt' => 'Aktifkan menu konteks', |
695 | | - 'mwe-sequencer_credit_line' => 'Dikembangkan oleh <a href="http://kaltura.com">Kaltura, Inc</a> bekerja sama dengan <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">informasi lebih lanjut</a>).', |
696 | | -); |
697 | | -$messages['it'] = array( |
698 | | - 'mwe-menu_options' => 'Opzioni', |
699 | | - 'mwe-other_options' => 'Altre opzioni', |
700 | | - 'mwe-contextmenu_opt' => 'Attiva i menu contestuali', |
701 | | -); |
702 | | -$messages['ja'] = array( |
703 | | - 'mwe-transition_in' => 'トランジション・イン', |
704 | | - 'mwe-transition_out' => 'トランジション・アウト', |
705 | | - 'mwe-effects' => 'エフェクト棚', |
706 | | - 'mwe-remove_transition' => 'トランジションを除去', |
707 | | - 'mwe-edit_transin' => 'クリップのトランジション・インを編集', |
708 | | - 'mwe-edit_transout' => 'クリップのトランジション・アウトを編集', |
709 | | - 'mwe-add-transition' => 'トランジションを追加', |
710 | | - 'mwe-menu_clipedit' => 'メディアを編集', |
711 | | - 'mwe-menu_transition' => 'トランジションとエフェクト', |
712 | | - 'mwe-menu_cliplib' => 'メディアを追加', |
713 | | - 'mwe-menu_resource_overview' => 'リソース概観', |
714 | | - 'mwe-menu_options' => 'オプション', |
715 | | - 'mwe-loading_timeline' => 'タイムラインを読み込み中 …', |
716 | | - 'mwe-loading_user_rights' => '利用者権限を読み込み中 …', |
717 | | - 'mwe-no_edit_permissions' => 'あなたはこのシーケンスに変更を加える許可がありません', |
718 | | - 'mwe-edit_clip' => 'クリップを編集', |
719 | | - 'mwe-edit_save' => 'シーケンスの変更を保存', |
720 | | - 'mwe-saving_wait' => '保存処理中 (お待ちください)', |
721 | | - 'mwe-save_done' => '保存完了', |
722 | | - 'mwe-edit_cancel' => 'シーケンスの編集を中止', |
723 | | - 'mwe-edit_cancel_confirm' => '本当に編集を中止しますか?変更は失われます。', |
724 | | - 'mwe-zoom_in' => '拡大', |
725 | | - 'mwe-zoom_out' => '縮小', |
726 | | - 'mwe-cut_clip' => 'クリップを切り抜く', |
727 | | - 'mwe-expand_track' => 'トラックを展開', |
728 | | - 'mwe-collapse_track' => 'トラックを折り畳む', |
729 | | - 'mwe-play_from_position' => '再生開始位置から再生', |
730 | | - 'mwe-pixle2sec' => 'ピクセルから秒へ', |
731 | | - 'mwe-rmclip' => 'クリップを削除', |
732 | | - 'mwe-clip_in' => '添付する', |
733 | | - 'mwe-clip_out' => '除去する', |
734 | | - 'mwe-no_selected_resource' => '<h3>素材が選択されていません</h3>編集を行うにはクリップを選択してください。', |
735 | | - 'mwe-error_edit_multiple' => '<h3>複数の素材が選択されています</h3> 編集するにはクリップを1つだけ選択してください。', |
736 | | - 'mwe-editor_options' => '編集オプション', |
737 | | - 'mwe-editor_mode' => '編集モード', |
738 | | - 'mwe-simple_editor_desc' => '単純なエディター (iMovie 風)', |
739 | | - 'mwe-advanced_editor_desc' => '高度なエディター (Final Cut 風)', |
740 | | - 'mwe-other_options' => '他のオプション', |
741 | | - 'mwe-contextmenu_opt' => 'コンテキストメニューを有効化', |
742 | | - 'mwe-sequencer_credit_line' => '本機能は<a href="http://kaltura.com">Kaltura, Inc.</a> が <a href="http://wikimediafoundation.org/wiki/Home">ウィキメディア財団</a>の協力のもと開発しました (<a href="#">詳細情報</a>)。', |
743 | | -); |
744 | | -$messages['ko'] = array( |
745 | | - 'mwe-menu_options' => '설정', |
746 | | - 'mwe-zoom_in' => '확대', |
747 | | - 'mwe-zoom_out' => '축소', |
748 | | - 'mwe-editor_options' => '에디터 설정', |
749 | | - 'mwe-other_options' => '다른 설정', |
750 | | -); |
751 | | -$messages['ksh'] = array( |
752 | | - 'mwe-transition_in' => 'Övverjang en', |
753 | | - 'mwe-transition_out' => 'Övverjang uß', |
754 | | - 'mwe-effects' => 'Dä Pöngel met dä Effäkte', |
755 | | - 'mwe-remove_transition' => 'Dä Övverjang fott nämme', |
756 | | - 'mwe-edit_transin' => 'Donn dä Övverjang en dä Ußschnett eren bränge', |
757 | | - 'mwe-edit_transout' => 'Donn dä Övverjang uß däm Ußschned eruß bränge', |
758 | | - 'mwe-add-transition' => 'Donn ene Övverjang dobei', |
759 | | - 'mwe-menu_clipedit' => 'Meedije Ändere', |
760 | | - 'mwe-menu_transition' => 'Övverjäng un besönder Effäkte', |
761 | | - 'mwe-menu_cliplib' => 'Alle Meedije', |
762 | | - 'mwe-menu_resource_overview' => 'Övverseesch', |
763 | | - 'mwe-menu_options' => 'Ußwahle', |
764 | | - 'mwe-loading_timeline' => 'En Zick-Reih aam Laade …', |
765 | | - 'mwe-loading_user_rights' => 'Metmaacher-Rääschte aam Laade …', |
766 | | - 'mwe-no_edit_permissions' => 'Do häs nit dat Rääsch, Änderunge aan heh dä Afshpellleß afzeshpeishere', |
767 | | - 'mwe-edit_clip' => 'Ußschnett ändere', |
768 | | - 'mwe-edit_save' => 'Änderunge aan dä Afshpellleß afshpeishere', |
769 | | - 'mwe-saving_wait' => 'Et Afsheijshere es noch em Jang, donn noch jät waade.', |
770 | | - 'mwe-save_done' => 'Fäädesch afjeshpeishert', |
771 | | - 'mwe-edit_cancel' => 'Et Ändere vun dä Afshpellleß afbreshe', |
772 | | - 'mwe-edit_cancel_confirm' => 'Bes De sescher, dat De et Ändere afbräsche wells? All Ding Werrek beß jäz jeiht verschött!', |
773 | | - 'mwe-zoom_in' => 'Eraan zoome', |
774 | | - 'mwe-zoom_out' => 'Fott zoome', |
775 | | - 'mwe-cut_clip' => 'Ußschnedde ußschnigge', |
776 | | - 'mwe-expand_track' => 'Shpoor opklappe', |
777 | | - 'mwe-collapse_track' => 'Shpoor ennklappe', |
778 | | - 'mwe-play_from_position' => 'Vun dä Linnesch aan afschpelle', |
779 | | - 'mwe-pixle2sec' => 'Pixele pro Sekund', |
780 | | - 'mwe-rmclip' => 'Ußschnett fott schmiiße', |
781 | | - 'mwe-clip_in' => 'Ußschnett en', |
782 | | - 'mwe-clip_out' => 'Ußschnett uß', |
783 | | - 'mwe-no_selected_resource' => '<h3>Nix ußjesöhk</h3>Söhk ene Ußschnett uß, öm et Ändere müjjelesch ze maache.', |
784 | | - 'mwe-error_edit_multiple' => '<h3>Mieh wie ein Denge ußjesöhk</h3>Söhk ene einzel Ußschnett uß, öm et Ändere müjjelesch ze maache.', |
785 | | - 'mwe-editor_options' => 'Enshtällunge för et Ändere', |
786 | | - 'mwe-editor_mode' => 'Aat vum Beärbeide', |
787 | | - 'mwe-simple_editor_desc' => 'Eijfach Beärbeide (em Shtil vun <i lang="en">iMovie</i>)', |
788 | | - 'mwe-advanced_editor_desc' => 'Beärbeide met alle Schikaane (em Shtil vun <i lang="en">Final Cut</i>)', |
789 | | - 'mwe-other_options' => 'Ander Müjjeleshkeite', |
790 | | - 'mwe-contextmenu_opt' => 'Donn de Kontex-Menühß zohlohße', |
791 | | - 'mwe-sequencer_credit_line' => 'Äntweckelt vun dä Ferma <i lang="en"><a href="http://kaltura.com">Kaltura, Inc.</a></i> em Zosammewerke met dä <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Shtefftung</a> (<a href="#">mieh Enfommazjohne</a>).', |
792 | | -); |
793 | | -$messages['lb'] = array( |
794 | | - 'mwe-transition_in' => 'Iwwergang fir eran', |
795 | | - 'mwe-transition_out' => 'Iwwergang fir eraus', |
796 | | - 'mwe-remove_transition' => 'Iwwergang ewechhuelen', |
797 | | - 'mwe-add-transition' => 'En Iwwergang derbäisetzen', |
798 | | - 'mwe-menu_transition' => 'Iwwergäng an Effekter', |
799 | | - 'mwe-menu_cliplib' => 'E Medium derbäi setzen', |
800 | | - 'mwe-menu_resource_overview' => 'Iwwersiicht iwwer d\'Ressourcen', |
801 | | - 'mwe-menu_options' => 'Optiounen', |
802 | | - 'mwe-loading_timeline' => 'Zäitläischt lueden ...', |
803 | | - 'mwe-loading_user_rights' => 'Benotzerrechter lueden ...', |
804 | | - 'mwe-no_edit_permissions' => 'Dir hutt net d\'Rechter fir Ännerungen un dëser Sequenz', |
805 | | - 'mwe-edit_clip' => 'Clip änneren', |
806 | | - 'mwe-edit_save' => 'D\'Ännerunge vun der Sequenz späicheren', |
807 | | - 'mwe-saving_wait' => 'Späicheren amgaang (waard w.e.g.)', |
808 | | - 'mwe-save_done' => 'Späicheren ofgeschloss', |
809 | | - 'mwe-edit_cancel' => 'Ännerung vun der Sequenz ofbriechen', |
810 | | - 'mwe-edit_cancel_confirm' => 'Sidd Dir sécher datt dir Är Ännerung ofbrieche wëllt? D\'Ännerunge gi verluer.', |
811 | | - 'mwe-zoom_in' => 'Era zoomen', |
812 | | - 'mwe-cut_clip' => 'Clippe schneiden', |
813 | | - 'mwe-pixle2sec' => 'Pixelen op Sekonnen', |
814 | | - 'mwe-rmclip' => 'Clip ewechhuelen', |
815 | | - 'mwe-clip_in' => 'Clip derbäisetzen', |
816 | | - 'mwe-clip_out' => 'Clip ewechhuelen', |
817 | | - 'mwe-other_options' => 'Aner Optiounen', |
818 | | - 'mwe-contextmenu_opt' => 'Kontextmenüen aktivéieren', |
819 | | - 'mwe-sequencer_credit_line' => 'Entwéckelt vu <a href="http://kaltura.com">Kaltura, Inc.</a> an zesummenaarbecht mat der <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">méi Informatiounen</a>).', |
820 | | -); |
821 | | -$messages['ml'] = array( |
822 | | - 'mwe-menu_clipedit' => 'മീഡിയ തിരുത്തുക', |
823 | | - 'mwe-menu_cliplib' => 'മീഡിയ കൂട്ടിച്ചേർക്കുക', |
824 | | - 'mwe-menu_resource_overview' => 'സ്രോതസ്സ് അവലോകനം', |
825 | | - 'mwe-menu_options' => 'ഐച്ഛികങ്ങൾ', |
826 | | - 'mwe-loading_timeline' => 'സമയരേഖ ശേഖരിക്കുന്നു ...', |
827 | | - 'mwe-loading_user_rights' => 'ഉപയോക്തൃ അവകാശങ്ങൾ ശേഖരിക്കുന്നു ...', |
828 | | - 'mwe-no_edit_permissions' => 'ഈ അനുവർത്തനത്തിൽ മാറ്റങ്ങൾ സേവ് ചെയ്യാനുള്ള അനുമതി താങ്കൾക്കില്ല', |
829 | | - 'mwe-edit_clip' => 'ചലച്ചിത്രശകലം തിരുത്തുക', |
830 | | - 'mwe-edit_save' => 'അനുവർത്തനത്തിലെ മാറ്റങ്ങൾ സേവ് ചെയ്യുക', |
831 | | - 'mwe-saving_wait' => 'സേവ് ചെയ്യൽ പുരോഗമിക്കുന്നു (ദയവായി കാത്തിരിക്കുക)', |
832 | | - 'mwe-save_done' => 'പൂർണ്ണമായത് സേവ് ചെയ്യുക', |
833 | | - 'mwe-edit_cancel' => 'അനുവർത്തനത്തിലെ തിരുത്തൽ റദ്ദാക്കുക', |
834 | | - 'mwe-edit_cancel_confirm' => 'താങ്കളുടെ തിരുത്തൽ റദ്ദാക്കണം എന്നതിൽ താങ്കൾ ഉറച്ചു നിൽക്കുന്നുവോ? മാറ്റങ്ങൾ നഷ്ടമാവുന്നതാണ്.', |
835 | | - 'mwe-zoom_in' => 'വലുതാക്കുക', |
836 | | - 'mwe-zoom_out' => 'ചെറുതാക്കുക', |
837 | | - 'mwe-cut_clip' => 'ചലച്ചിത്രശകലം മുറിയ്ക്കുക', |
838 | | - 'mwe-rmclip' => 'ചലച്ചിത്രശകലം നീക്കംചെയ്യുക', |
839 | | - 'mwe-clip_in' => 'ചലച്ചിത്രശകലം ഉൾപ്പെടുത്തുക', |
840 | | - 'mwe-clip_out' => 'ചലച്ചിത്രശകലം പുറംതള്ളുക', |
841 | | - 'mwe-no_selected_resource' => '<h3>ഒരു സ്രോതസ്സും തിരഞ്ഞെടുത്തിട്ടില്ല</h3> മാറ്റംവരുത്തുവാൻ ഒരു ചലച്ചിത്രശകലം തിരഞ്ഞെടുക്കുക.', |
842 | | - 'mwe-error_edit_multiple' => '<h3>നിരവധി സ്രോതസ്സുകൾ തിരഞ്ഞെടുത്തിരിക്കുന്നു</h3> മാറ്റംവരുത്തുവാനായി ഒരു ചലച്ചിത്രശകലം തിരഞ്ഞെടുക്കുക.', |
843 | | - 'mwe-editor_options' => 'തിരുത്തലുപകരണ ഐച്ഛികങ്ങൾ', |
844 | | - 'mwe-editor_mode' => 'തിരുത്തലുപകരണ സമ്പ്രദായം', |
845 | | - 'mwe-simple_editor_desc' => 'ലളിതമായ തിരുത്തലുപകരണം (iMovie രീതി)', |
846 | | - 'mwe-advanced_editor_desc' => 'വിപുലമായ തിരുത്തലുപകരണം (ഫൈനൽ കട്ട് രീതി)', |
847 | | - 'mwe-other_options' => 'മറ്റ് ഐച്ഛികങ്ങൾ', |
848 | | - 'mwe-sequencer_credit_line' => '<a href="http://kaltura.com">Kaltura, Inc.</a>, <a href="http://wikimediafoundation.org/wiki/Home">വിക്കിമീഡിയ ഫൗണ്ടേഷന്റെ</a> പങ്കാളിത്തത്തോടു കൂടി വികസിപ്പിച്ചെടുത്തത് (<a href="#">കൂടുതൽ വിവരങ്ങൾ</a>).', |
849 | | -); |
850 | | -$messages['nl'] = array( |
851 | | - 'mwe-transition_in' => 'Overgangen', |
852 | | - 'mwe-transition_out' => 'Overgang einde', |
853 | | - 'mwe-effects' => 'Effecten', |
854 | | - 'mwe-remove_transition' => 'Overgang verwijderen', |
855 | | - 'mwe-edit_transin' => 'Overgang in clip bewerken', |
856 | | - 'mwe-edit_transout' => 'Overgang uit clip verwijderen', |
857 | | - 'mwe-add-transition' => 'Overgang toevoegen', |
858 | | - 'mwe-menu_clipedit' => 'Media bewerken', |
859 | | - 'mwe-menu_transition' => 'Overgangseffecten', |
860 | | - 'mwe-menu_cliplib' => 'Media toevoegen', |
861 | | - 'mwe-menu_resource_overview' => 'Bronnenoverzicht', |
862 | | - 'mwe-menu_options' => 'Instellingen', |
863 | | - 'mwe-loading_timeline' => 'Bezig met het laden van de tijdlijn ...', |
864 | | - 'mwe-loading_user_rights' => 'Bezig met laden van gebruikersrechten ...', |
865 | | - 'mwe-no_edit_permissions' => 'U hebt geen rechten om wijzigingen aan deze reeks op te slaan', |
866 | | - 'mwe-edit_clip' => 'Clip bewerken', |
867 | | - 'mwe-edit_save' => 'Wijzigingen aan de reeks opslaan', |
868 | | - 'mwe-saving_wait' => 'Bezig met opslaan. Even geduld, alstublieft.', |
869 | | - 'mwe-save_done' => 'Opslaan voltooid.', |
870 | | - 'mwe-edit_cancel' => 'Bewerken van de reeks annuleren', |
871 | | - 'mwe-edit_cancel_confirm' => 'Weet u zeker dat u uw bewerking wilt afbreken? Alle wijzigingen worden ongedaan gemaakt.', |
872 | | - 'mwe-zoom_in' => 'Vergroten', |
873 | | - 'mwe-zoom_out' => 'Verkleinen', |
874 | | - 'mwe-cut_clip' => 'Clips uitsnijden', |
875 | | - 'mwe-expand_track' => 'Spoor uitklappen', |
876 | | - 'mwe-collapse_track' => 'Spoor inklappen', |
877 | | - 'mwe-play_from_position' => 'Afspelen vanaf positie', |
878 | | - 'mwe-pixle2sec' => 'pixels naar seconden', |
879 | | - 'mwe-rmclip' => 'Clip verwijderen', |
880 | | - 'mwe-clip_in' => 'clip toevoegen', |
881 | | - 'mwe-clip_out' => 'clip verwijderen', |
882 | | - 'mwe-no_selected_resource' => '<h3>Er is geen bestand geselecteerd</h3> |
883 | | -Selecteer een te bewerken clip.', |
884 | | - 'mwe-error_edit_multiple' => '<h3>Er zijn meerdere bestanden geselecteerd</h3> |
885 | | -Selecteer één te bewerken clip.', |
886 | | - 'mwe-editor_options' => 'Editorinstellingen', |
887 | | - 'mwe-editor_mode' => 'Bewerkingsmodus', |
888 | | - 'mwe-simple_editor_desc' => 'eenvoudige editor (iMovie-stijl)', |
889 | | - 'mwe-advanced_editor_desc' => 'uitgebreide editor (Final Cut-stijl)', |
890 | | - 'mwe-other_options' => 'Ander opsies', |
891 | | - 'mwe-contextmenu_opt' => 'Contextafhankelijke menu\'s inschakelen', |
892 | | - 'mwe-sequencer_credit_line' => 'Ontwikkeld door <a href="http://kaltura.com">Kaltura, Inc.</a> in samenwerking met de <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">meer informatie</a>).', |
893 | | -); |
894 | | -$messages['oc'] = array( |
895 | | - 'mwe-transition_in' => 'Transicion entranta', |
896 | | - 'mwe-transition_out' => 'Transicion sortenta', |
897 | | - 'mwe-effects' => 'Pila d\'efièches', |
898 | | - 'mwe-remove_transition' => 'Suprimir la transicion', |
899 | | - 'mwe-edit_transin' => 'Modificar la transicion cap al clip', |
900 | | - 'mwe-edit_transout' => 'Modificar la transicion en defòta del clip', |
901 | | - 'mwe-menu_clipedit' => 'Modificar lo mèdia', |
902 | | - 'mwe-menu_transition' => 'Transicions e efièches', |
903 | | - 'mwe-menu_cliplib' => 'Apondre un mèdia', |
904 | | - 'mwe-menu_resource_overview' => 'Vista d\'ensemble de la ressorsa', |
905 | | - 'mwe-menu_options' => 'Opcions', |
906 | | - 'mwe-loading_timeline' => 'Cargament de la cronologia ...', |
907 | | - 'mwe-loading_user_rights' => 'Cargament dels dreches d\'utilizaire ...', |
908 | | - 'mwe-no_edit_permissions' => 'Avètz pas l\'autorizacion de salvar los cambiaments aportats a aquesta sequéncia', |
909 | | - 'mwe-edit_clip' => 'Modificar lo clip', |
910 | | - 'mwe-edit_save' => 'Salvar las modificacions de la sequéncia', |
911 | | - 'mwe-saving_wait' => 'Salvament en cors (pacientatz)', |
912 | | - 'mwe-save_done' => 'Salvament acabat', |
913 | | - 'mwe-edit_cancel' => 'Anullar la modificacion de la sequéncia', |
914 | | - 'mwe-edit_cancel_confirm' => 'Sètz segur que volètz anullar vòstra modificacion ? Los cambiaments seràn perduts.', |
915 | | - 'mwe-zoom_in' => 'Agrandir', |
916 | | - 'mwe-zoom_out' => 'Reduire', |
917 | | - 'mwe-cut_clip' => 'Copar los clips', |
918 | | - 'mwe-expand_track' => 'Espandir la pista', |
919 | | - 'mwe-collapse_track' => 'Reduire la pista', |
920 | | - 'mwe-play_from_position' => 'Legir a partir de la posicion de lectura', |
921 | | - 'mwe-pixle2sec' => 'pixèls cap a segondas', |
922 | | - 'mwe-rmclip' => 'Suprimir lo clip', |
923 | | - 'mwe-clip_in' => 'estacar', |
924 | | - 'mwe-clip_out' => 'destacar', |
925 | | - 'mwe-no_selected_resource' => '<h3>Cap de ressorsa pas seleccionada</h3> Seleccionatz un clip per activar l\'edicion', |
926 | | - 'mwe-error_edit_multiple' => '<h3>Mantuna ressorsa seleccionada</h3> Seleccionatz un sol clip per lo modificar', |
927 | | - 'mwe-editor_options' => 'Opcions de l\'editor', |
928 | | - 'mwe-editor_mode' => 'Mòde de l\'editor', |
929 | | - 'mwe-simple_editor_desc' => 'editor simple (estil iMovie)', |
930 | | - 'mwe-advanced_editor_desc' => 'editor avançat (estil Final Cut)', |
931 | | - 'mwe-other_options' => 'Autras opcions', |
932 | | - 'mwe-contextmenu_opt' => 'Activar los menuts contextuals', |
933 | | - 'mwe-sequencer_credit_line' => 'Desvolopat per <a href="http://kaltura.com">Kaltura, Inc.</a> en partenariat amb la <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">mai d\'entresenhas</a>).', |
934 | | -); |
935 | | -$messages['pl'] = array( |
936 | | - 'mwe-transition_in' => 'Wejście', |
937 | | - 'mwe-transition_out' => 'Wyjście', |
938 | | - 'mwe-effects' => 'Stos efektów', |
939 | | - 'mwe-remove_transition' => 'Usuń przejście', |
940 | | - 'mwe-edit_transin' => 'Edytuj przejście do klipu', |
941 | | - 'mwe-edit_transout' => 'Edytuj przejście zakończenia klipu', |
942 | | - 'mwe-menu_clipedit' => 'Edytuj multimeda', |
943 | | - 'mwe-menu_transition' => 'Przejścia i efekty', |
944 | | - 'mwe-menu_cliplib' => 'Dodaj media', |
945 | | - 'mwe-menu_resource_overview' => 'Przegląd zasobów', |
946 | | - 'mwe-menu_options' => 'Opcje', |
947 | | - 'mwe-loading_timeline' => 'Ładowanie osi czasu ...', |
948 | | - 'mwe-loading_user_rights' => 'Ładowanie praw użytkowników ...', |
949 | | - 'mwe-no_edit_permissions' => 'Nie masz uprawnień, aby zapisać zmiany w tej kolejności', |
950 | | - 'mwe-edit_clip' => 'Edytuj klip', |
951 | | - 'mwe-edit_save' => 'Zapisz sekwencję zmian', |
952 | | - 'mwe-saving_wait' => 'Zapisywanie trwa (proszę czekać)', |
953 | | - 'mwe-save_done' => 'Zapisano', |
954 | | - 'mwe-edit_cancel' => 'Anuluj sekwencję zmian', |
955 | | - 'mwe-edit_cancel_confirm' => 'Czy na pewno chcesz anulować edycję? Zmiany zostaną utracone.', |
956 | | - 'mwe-zoom_in' => 'Powiększ', |
957 | | - 'mwe-zoom_out' => 'Pomniejsz', |
958 | | - 'mwe-cut_clip' => 'Przytnij klipy', |
959 | | - 'mwe-rmclip' => 'Usuń klip', |
960 | | - 'mwe-clip_in' => 'początek klipu', |
961 | | - 'mwe-clip_out' => 'koniec klipu', |
962 | | - 'mwe-no_selected_resource' => '<h3>Nie wybrano zasobu</h3> Wybierz klip, jeśli chcesz edytować.', |
963 | | - 'mwe-error_edit_multiple' => '<h3>Wybrano wiele zasobów</h3> Wybierz jeden klip, jeśli chcesz edytować.', |
964 | | - 'mwe-editor_options' => 'Opcje edytora', |
965 | | - 'mwe-editor_mode' => 'Tryb pracy edytora', |
966 | | - 'mwe-simple_editor_desc' => 'prosty edytor tekstu (w stylu iMovie)', |
967 | | - 'mwe-advanced_editor_desc' => 'zaawansowany edytor (w stylu Final Cut)', |
968 | | - 'mwe-other_options' => 'Inne opcje', |
969 | | - 'mwe-contextmenu_opt' => 'Włącz menu kontekstowe', |
970 | | - 'mwe-sequencer_credit_line' => 'Wykonane przez <a href="http://kaltura.com">Kaltura, Inc,</a> we współpracy z <a href="http://wikimediafoundation.org/wiki/Home">Fundacją Wikimedia</a> (<a href="#">więcej informacji</a>).', |
971 | | -); |
972 | | -$messages['pt'] = array( |
973 | | - 'mwe-transition_in' => 'Entrada da transição', |
974 | | - 'mwe-transition_out' => 'Saída da transição', |
975 | | - 'mwe-effects' => 'Pilha de efeitos', |
976 | | - 'mwe-remove_transition' => 'Remover transição', |
977 | | - 'mwe-edit_transin' => 'Inserir transição no clipe', |
978 | | - 'mwe-edit_transout' => 'Remover transição do clipe', |
979 | | - 'mwe-add-transition' => 'Adicionar uma transição', |
980 | | - 'mwe-menu_clipedit' => 'Editar multimédia', |
981 | | - 'mwe-menu_transition' => 'Transições e efeitos', |
982 | | - 'mwe-menu_cliplib' => 'Adicionar multimédia', |
983 | | - 'mwe-menu_resource_overview' => 'Visão geral dos recursos', |
984 | | - 'mwe-menu_options' => 'Opções', |
985 | | - 'mwe-loading_timeline' => 'A carregar linha do tempo ...', |
986 | | - 'mwe-loading_user_rights' => 'A carregar os direitos do utilizador ...', |
987 | | - 'mwe-no_edit_permissions' => 'Não tem permissões para gravar alterações a esta sequência', |
988 | | - 'mwe-edit_clip' => 'Editar clipe', |
989 | | - 'mwe-edit_save' => 'Gravar mudanças na sequência', |
990 | | - 'mwe-saving_wait' => 'Gravação em progresso (por favor, aguarde)', |
991 | | - 'mwe-save_done' => 'Gravação completa', |
992 | | - 'mwe-edit_cancel' => 'Cancelar edição da sequência', |
993 | | - 'mwe-edit_cancel_confirm' => 'Tem a certeza de que quer cancelar a edição? As alterações serão perdidas.', |
994 | | - 'mwe-zoom_in' => 'Aproximar', |
995 | | - 'mwe-zoom_out' => 'Afastar', |
996 | | - 'mwe-cut_clip' => 'Cortar clipes', |
997 | | - 'mwe-expand_track' => 'Expandir faixa', |
998 | | - 'mwe-collapse_track' => 'Colapsar faixa', |
999 | | - 'mwe-play_from_position' => 'Começar a partir da posicão na linha', |
1000 | | - 'mwe-pixle2sec' => 'pixels para segundos', |
1001 | | - 'mwe-rmclip' => 'Remover clipe', |
1002 | | - 'mwe-clip_in' => 'entrada do clipe', |
1003 | | - 'mwe-clip_out' => 'saída do clipe', |
1004 | | - 'mwe-no_selected_resource' => '<h3>Nenhum recurso seleccionado</h3> Seleccione um clip para possibilitar edição.', |
1005 | | - 'mwe-error_edit_multiple' => '<h3>Vários recursos seleccionados</h3> Seleccione um único clipe para editá-lo.', |
1006 | | - 'mwe-editor_options' => 'Opções do editor', |
1007 | | - 'mwe-editor_mode' => 'Modo editor', |
1008 | | - 'mwe-simple_editor_desc' => 'editor simples (estilo iMovie)', |
1009 | | - 'mwe-advanced_editor_desc' => 'editor avançado (estilo Final Cut)', |
1010 | | - 'mwe-other_options' => 'Outras opções', |
1011 | | - 'mwe-contextmenu_opt' => 'Possibilitar menus de contexto', |
1012 | | - 'mwe-sequencer_credit_line' => 'Desenvolvido por <a href="http://kaltura.com">Kaltura, Inc.</a> em parceria com a <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">mais informações</a>).', |
1013 | | -); |
1014 | | -$messages['pt-br'] = array( |
1015 | | - 'mwe-menu_options' => 'Opções', |
1016 | | - 'mwe-loading_user_rights' => 'A carregar direitos de usuário ...', |
1017 | | - 'mwe-other_options' => 'Outras opções', |
1018 | | - 'mwe-contextmenu_opt' => 'Habilitar menus de contexto', |
1019 | | -); |
1020 | | -$messages['ru'] = array( |
1021 | | - 'mwe-transition_in' => 'Переход в', |
1022 | | - 'mwe-transition_out' => 'Переход из', |
1023 | | - 'mwe-effects' => 'Набор эффектов', |
1024 | | - 'mwe-remove_transition' => 'Удалить переход', |
1025 | | - 'mwe-edit_transin' => 'Изменить переход в клипе', |
1026 | | - 'mwe-edit_transout' => 'Изменить переход-выход в клипе', |
1027 | | - 'mwe-add-transition' => 'Добавить переход', |
1028 | | - 'mwe-menu_clipedit' => 'Изменить медиа', |
1029 | | - 'mwe-menu_transition' => 'Переходы и эффекты', |
1030 | | - 'mwe-menu_cliplib' => 'Добавить медиа', |
1031 | | - 'mwe-menu_resource_overview' => 'Обзор ресурсов', |
1032 | | - 'mwe-menu_options' => 'Настройки', |
1033 | | - 'mwe-loading_timeline' => 'Загружается хронология …', |
1034 | | - 'mwe-loading_user_rights' => 'Загружаются права участников …', |
1035 | | - 'mwe-no_edit_permissions' => 'У вас нет разрешения сохранять изменения последовательности', |
1036 | | - 'mwe-edit_clip' => 'Редактировать клип', |
1037 | | - 'mwe-edit_save' => 'Сохранить изменения последовательности', |
1038 | | - 'mwe-saving_wait' => 'Идёт сохранение (пожалуйста, подождите)', |
1039 | | - 'mwe-save_done' => 'Сохранение завершено', |
1040 | | - 'mwe-edit_cancel' => 'Отменить правку последовательности', |
1041 | | - 'mwe-edit_cancel_confirm' => 'Вы уверены, что хотите отменить Вашу правку? Изменения будут потеряны.', |
1042 | | - 'mwe-zoom_in' => 'Увеличить', |
1043 | | - 'mwe-zoom_out' => 'Уменьшить', |
1044 | | - 'mwe-cut_clip' => 'Кадрирование клипов', |
1045 | | - 'mwe-expand_track' => 'Развернуть трек', |
1046 | | - 'mwe-collapse_track' => 'Свернуть трек', |
1047 | | - 'mwe-play_from_position' => 'Проигрывать с позиции линии воспроизведения', |
1048 | | - 'mwe-pixle2sec' => 'пикселов в секунду', |
1049 | | - 'mwe-rmclip' => 'Удалить клип', |
1050 | | - 'mwe-clip_in' => 'добавить клип', |
1051 | | - 'mwe-clip_out' => 'убрать клип', |
1052 | | - 'mwe-no_selected_resource' => '<h3>Не выбран ресурс</h3>Выберите клип для редактирования.', |
1053 | | - 'mwe-error_edit_multiple' => '<h3>Выбрано несколько ресурсов</h3> Выберите один клип для редактирования.', |
1054 | | - 'mwe-editor_options' => 'Настройки редактора', |
1055 | | - 'mwe-editor_mode' => 'Режим редактора', |
1056 | | - 'mwe-simple_editor_desc' => 'простой редактор (стиль iMovie)', |
1057 | | - 'mwe-advanced_editor_desc' => 'улучшенный редактор (стиль Final Cut)', |
1058 | | - 'mwe-other_options' => 'Другие настройки', |
1059 | | - 'mwe-contextmenu_opt' => 'Включить контекстные меню', |
1060 | | - 'mwe-sequencer_credit_line' => 'Разработано <a href="http://kaltura.com">Kaltura, Inc</a> в сотрудничестве с <a href="http://wikimediafoundation.org/wiki/Home">Фондом Викимедиа</a> (<a href="#">подробнее</a>).', |
1061 | | -); |
1062 | | -$messages['sah'] = array( |
1063 | | - 'mwe-menu_options' => 'Туруоруулар', |
1064 | | - 'mwe-edit_clip' => 'Клибы уларытыы', |
1065 | | - 'mwe-zoom_in' => 'Улаатыннар', |
1066 | | - 'mwe-zoom_out' => 'Кыччат', |
1067 | | -); |
1068 | | -$messages['sk'] = array( |
1069 | | - 'mwe-transition_in' => 'Prechod do', |
1070 | | - 'mwe-transition_out' => 'Prechod z', |
1071 | | - 'mwe-effects' => 'Zásobník efektov', |
1072 | | - 'mwe-remove_transition' => 'Odstrániť prechod', |
1073 | | - 'mwe-edit_transin' => 'Upraviť prechod do klipu', |
1074 | | - 'mwe-edit_transout' => 'Upraviť prechod z klipu', |
1075 | | - 'mwe-menu_clipedit' => 'Upraviť multimédiá', |
1076 | | - 'mwe-menu_transition' => 'Prechody a efekty', |
1077 | | - 'mwe-menu_cliplib' => 'Pridať multimédiá', |
1078 | | - 'mwe-menu_resource_overview' => 'Prehľad zdroja', |
1079 | | - 'mwe-menu_options' => 'Možnosti', |
1080 | | - 'mwe-loading_timeline' => 'Načítava sa časová os ...', |
1081 | | - 'mwe-loading_user_rights' => 'Načítavajú sa oprávnenia používateľov ...', |
1082 | | - 'mwe-no_edit_permissions' => 'Nemáte oprávnenie ukladať zmenu tejto sekvencie', |
1083 | | - 'mwe-edit_clip' => 'Upraviť klip', |
1084 | | - 'mwe-edit_save' => 'Uložiť zmeny sekvencie', |
1085 | | - 'mwe-saving_wait' => 'Prebieha ukladanie (prosím, čakajte)', |
1086 | | - 'mwe-save_done' => 'Ukladanie dokončené', |
1087 | | - 'mwe-edit_cancel' => 'Zrušiť úpravu sekvencie', |
1088 | | - 'mwe-edit_cancel_confirm' => 'Ste si istý, že chcete zrušiť svoje úpravy? Zmeny sa stratia.', |
1089 | | - 'mwe-zoom_in' => 'Priblížiť', |
1090 | | - 'mwe-zoom_out' => 'Oddialiť', |
1091 | | - 'mwe-cut_clip' => 'Strih klipov', |
1092 | | - 'mwe-expand_track' => 'Rozšíriť stopu', |
1093 | | - 'mwe-collapse_track' => 'Zmrštiť stopu', |
1094 | | - 'mwe-play_from_position' => 'Prehrať od značky', |
1095 | | - 'mwe-pixle2sec' => 'pixle na sekundy', |
1096 | | - 'mwe-rmclip' => 'Odstrániť klip', |
1097 | | - 'mwe-no_selected_resource' => '<h3>Nebol vybraný žiadny zdroj</h3> Úpravu začnete vybraním klipu.', |
1098 | | - 'mwe-error_edit_multiple' => '<h3>Boli vybrané viaceré zdroje</h3> Úpravu začnete vybraním jediného klipu.', |
1099 | | - 'mwe-editor_options' => 'Možnosti editora', |
1100 | | - 'mwe-editor_mode' => 'Režim editora', |
1101 | | - 'mwe-simple_editor_desc' => 'jednoduchý editor (v štýle iMovie)', |
1102 | | - 'mwe-advanced_editor_desc' => 'pokročilý editor (v štýle Final Cut)', |
1103 | | - 'mwe-other_options' => 'Ďalšie možnosti', |
1104 | | - 'mwe-contextmenu_opt' => 'Zapnúť kontextové menu', |
1105 | | - 'mwe-sequencer_credit_line' => 'Vyvinula <a href="http://kaltura.com">Kaltura, Inc.</a> v spolupráci s <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">ďalšie informácie</a>).', |
1106 | | -); |
1107 | | -$messages['sv'] = array( |
1108 | | - 'mwe-menu_clipedit' => 'Redigera media', |
1109 | | - 'mwe-menu_cliplib' => 'Lägg till media', |
1110 | | - 'mwe-menu_options' => 'Alternativ', |
1111 | | - 'mwe-loading_timeline' => 'Laddar tidslinje...', |
1112 | | - 'mwe-loading_user_rights' => 'Laddar användarrättigheter...', |
1113 | | - 'mwe-zoom_in' => 'Zooma in', |
1114 | | - 'mwe-zoom_out' => 'Zooma ut', |
1115 | | - 'mwe-pixle2sec' => 'Pixlar till sekunder', |
1116 | | - 'mwe-other_options' => 'Andra alternativ', |
1117 | | -); |
1118 | | -$messages['te'] = array( |
1119 | | - 'mwe-menu_options' => 'ఎంపికలు', |
1120 | | - 'mwe-saving_wait' => 'భద్రపరడం జరుగుతూంది (దయచేసి వేచివుండండి)', |
1121 | | - 'mwe-save_done' => 'భద్రపరచడం పూర్తయ్యింది', |
1122 | | - 'mwe-edit_cancel_confirm' => 'మీరు నిజంగానే మీ మార్పుని రద్దుచేయాలనుకుంటున్నారా? మార్పులు పోతాయి.', |
1123 | | - 'mwe-editor_options' => 'కూర్పరి ఎంపికలు', |
1124 | | - 'mwe-other_options' => 'ఇతర ఎంపికలు', |
1125 | | -); |
1126 | | -$messages['tr'] = array( |
1127 | | - 'mwe-transition_in' => 'İçe geçiş', |
1128 | | - 'mwe-transition_out' => 'Dışa geçiş', |
1129 | | - 'mwe-effects' => 'Efekt yığını', |
1130 | | - 'mwe-remove_transition' => 'Geçişi kaldır', |
1131 | | - 'mwe-edit_transin' => 'Klibe geçişi değiştir', |
1132 | | - 'mwe-edit_transout' => 'Klipten geçişi değiştir', |
1133 | | - 'mwe-add-transition' => 'Geçiş ekle', |
1134 | | - 'mwe-menu_clipedit' => 'Ortamı değiştir', |
1135 | | - 'mwe-menu_transition' => 'Geçişler ve efektler', |
1136 | | - 'mwe-menu_cliplib' => 'Ortam ekle', |
1137 | | - 'mwe-menu_resource_overview' => 'Kaynak genel bakışı', |
1138 | | - 'mwe-menu_options' => 'Seçenekler', |
1139 | | - 'mwe-loading_timeline' => 'Zaman çizelgesi yükleniyor ...', |
1140 | | - 'mwe-loading_user_rights' => 'Kullanıcı hakları yükleniyor ...', |
1141 | | - 'mwe-no_edit_permissions' => 'Bu dizilişe değişiklikleri kaydetme izniniz yok', |
1142 | | - 'mwe-edit_clip' => 'Klibi değiştir', |
1143 | | - 'mwe-edit_save' => 'Diziliş değişikliklerini kaydet', |
1144 | | - 'mwe-saving_wait' => 'Kaydetme sürüyor (lütfen bekleyin)', |
1145 | | - 'mwe-save_done' => 'Kaydetme tamamlandı', |
1146 | | - 'mwe-edit_cancel' => 'Diziliş değişikliğini iptal et', |
1147 | | - 'mwe-edit_cancel_confirm' => 'Değişikliğinizi iptal etmek istediğinize emin misiniz? Değişiklikler kaybolacaktır.', |
1148 | | - 'mwe-zoom_in' => 'Yakınlaştır', |
1149 | | - 'mwe-zoom_out' => 'Uzaklaştır', |
1150 | | - 'mwe-cut_clip' => 'Klipleri kes', |
1151 | | - 'mwe-expand_track' => 'İzi genişlet', |
1152 | | - 'mwe-collapse_track' => 'İzi daralt', |
1153 | | - 'mwe-play_from_position' => 'Oynatma çizgisi konumundan oynat', |
1154 | | - 'mwe-pixle2sec' => 'piksele saniye', |
1155 | | - 'mwe-rmclip' => 'Klibi kaldır', |
1156 | | - 'mwe-clip_in' => 'içe klip', |
1157 | | - 'mwe-clip_out' => 'dışa klip', |
1158 | | - 'mwe-no_selected_resource' => '<h3>Hiç kaynak seçilmedi</h3> Değiştirmeyi etkinleştirmek için bir klip seçin.', |
1159 | | - 'mwe-error_edit_multiple' => '<h3>Birden fazla kaynak seçildi</h3> Değiştirmek için tek klip seçin.', |
1160 | | - 'mwe-editor_options' => 'Düzenleyici seçenekleri', |
1161 | | - 'mwe-editor_mode' => 'Düzenleyici kipi', |
1162 | | - 'mwe-simple_editor_desc' => 'basit düzenleyici (iMovie tarzı)', |
1163 | | - 'mwe-advanced_editor_desc' => 'gelişmiş düzenleyici (Final Cut tarzı)', |
1164 | | - 'mwe-other_options' => 'Diğer seçenekler', |
1165 | | - 'mwe-contextmenu_opt' => 'İçerik menülerini etkinleştir', |
1166 | | - 'mwe-sequencer_credit_line' => '<a href="http://kaltura.com">Kaltura, Inc.</a> tarafından, <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> (<a href="#">daha fazla bilgi</a>) ortaklığında geliştirilmiştir.', |
1167 | | -); |
1168 | | -$messages['vec'] = array( |
1169 | | - 'mwe-menu_options' => 'Opzioni', |
1170 | | - 'mwe-saving_wait' => 'So\' drio salvar (speta n\'atimo, par piaser)', |
1171 | | - 'mwe-save_done' => 'Salvatajo conpleto', |
1172 | | - 'mwe-zoom_in' => 'Strenzi zoom', |
1173 | | - 'mwe-zoom_out' => 'Slarga zoom', |
1174 | | -); |
1175 | | -$messages['vep'] = array( |
1176 | | - 'mwe-menu_cliplib' => 'Ližata medijad', |
1177 | | - 'mwe-rmclip' => 'Heitta klip poiš', |
1178 | | -); |
1179 | | -$messages['vi'] = array( |
1180 | | - 'mwe-transition_in' => 'Chuyển tiếp vào', |
1181 | | - 'mwe-transition_out' => 'Chuyển tiếp ra', |
1182 | | - 'mwe-effects' => 'Đống hiệu ứng', |
1183 | | - 'mwe-remove_transition' => 'Xóa chuyển tiếp', |
1184 | | - 'mwe-edit_transin' => 'Sửa chuyển tiếp vào clip', |
1185 | | - 'mwe-edit_transout' => 'Sửa chuyển tiếp ra khỏi clip', |
1186 | | - 'mwe-menu_clipedit' => 'Sửa tập tin nghe nhìn', |
1187 | | - 'mwe-menu_transition' => 'Điểm chuyển và hiệu ứng', |
1188 | | - 'mwe-menu_cliplib' => 'Thêm phương tiện', |
1189 | | - 'mwe-menu_resource_overview' => 'Tổng quát tài nguyên', |
1190 | | - 'mwe-menu_options' => 'Tùy chọn', |
1191 | | - 'mwe-loading_timeline' => 'Đang tải dòng thời gian ...', |
1192 | | - 'mwe-loading_user_rights' => 'Đang tải quyền thành viên ...', |
1193 | | - 'mwe-no_edit_permissions' => 'Bạn không quyền lưu thay đổi vào cảnh này', |
1194 | | - 'mwe-edit_clip' => 'Sửa clip', |
1195 | | - 'mwe-edit_save' => 'Lưu thay đổi trong cảnh', |
1196 | | - 'mwe-saving_wait' => 'Đang lưu (xin chờ)', |
1197 | | - 'mwe-save_done' => 'Đã lưu', |
1198 | | - 'mwe-edit_cancel' => 'Hủy sửa cảnh', |
1199 | | - 'mwe-edit_cancel_confirm' => 'Bạn có chắc là mình muốn hủy sửa đổi không? Các thay đổi sẽ bị mất.', |
1200 | | - 'mwe-zoom_in' => 'Phóng to', |
1201 | | - 'mwe-zoom_out' => 'Thu nhỏ', |
1202 | | - 'mwe-cut_clip' => 'Cắt clip', |
1203 | | - 'mwe-expand_track' => 'Bung track', |
1204 | | - 'mwe-collapse_track' => 'Thu nhỏ track', |
1205 | | - 'mwe-play_from_position' => 'Chơi từ vị trí playline', |
1206 | | - 'mwe-pixle2sec' => 'pixel sang giây', |
1207 | | - 'mwe-rmclip' => 'Xóa clip', |
1208 | | - 'mwe-no_selected_resource' => '<h3>Chưa chọn tài nguyên</h3> Hãy chọn clip để sửa đổi.', |
1209 | | - 'mwe-error_edit_multiple' => '<h3>Đã chọn hơn một tài nguyên</h3> Hãy chỉ chọn một clip để sửa đổi nó.', |
1210 | | - 'mwe-editor_options' => 'Tùy chọn sửa đổi', |
1211 | | - 'mwe-editor_mode' => 'Chế độ sửa đổi', |
1212 | | - 'mwe-simple_editor_desc' => 'bộ sửa đổi đơn giản (kiểu iMovie)', |
1213 | | - 'mwe-advanced_editor_desc' => 'bộ sửa đổi nâng cấp (kiểu Final Cut)', |
1214 | | - 'mwe-other_options' => 'Tùy chọn khác', |
1215 | | - 'mwe-sequencer_credit_line' => 'Do <a href="http://kaltura.com">Kaltura, Inc.</a> phát triển với sự hỗ trợ của <a href="http://wikimediafoundation.org/wiki/Trang_chủ?uselang=vi">Quỹ Wikimedia</a> (<a href="#">chi tiết</a>).', |
1216 | | -); |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/mw.SeqRemoteSearchDriver.js |
— | — | @@ -1,184 +0,0 @@ |
2 | | -/* the sequence remote search driver |
3 | | -* extends the base remote search driver for use in the sequencer |
4 | | -*/ |
5 | | - |
6 | | -mw.SeqRemoteSearchDriver = function( mySequence ) { |
7 | | - return this.init( mySequence ) |
8 | | -} |
9 | | - |
10 | | -mw.SeqRemoteSearchDriver.prototype = { |
11 | | - sequence_add_target:false, |
12 | | - init:function( mySequence ) { |
13 | | - var _this = this; |
14 | | - mw.log( "init:seqRemoteSearchDriver" ); |
15 | | - |
16 | | - // Setup remote search driver with a seq parent: |
17 | | - this.pSeq = mySequence; |
18 | | - var options = { |
19 | | - 'target_container' : '#cliplib_ic', |
20 | | - 'instance_name' : mySequence.instance_name + '.mySearch', |
21 | | - 'default_query' : this.pSeq.plObj.title |
22 | | - } |
23 | | - |
24 | | - // Extend the options with any sequencer provided add-media-wizard config |
25 | | - if ( typeof mySequence.amw_conf != 'undefined' ) |
26 | | - $j.extend( options, mySequence.amw_conf ); |
27 | | - |
28 | | - |
29 | | - // Inherit the remoteSearchDriver properties:n |
30 | | - var tmpRemoteSearchDriver = new mw.RemoteSearchDriver( options ); |
31 | | - for ( var i in tmpRemoteSearchDriver ) { |
32 | | - if ( this[i] ) { |
33 | | - this['parent_' + i] = tmpRemoteSearchDriver[i]; |
34 | | - } else { |
35 | | - this[i] = tmpRemoteSearchDriver[i]; |
36 | | - } |
37 | | - } |
38 | | - |
39 | | - // Extend parent_do_refresh_timeline actions: |
40 | | - if ( !this.pSeq.parent_do_refresh_timeline ) { |
41 | | - this.pSeq.parent_do_refresh_timeline = this.pSeq.do_refresh_timeline; |
42 | | - this.pSeq.do_refresh_timeline = function() { |
43 | | - mw.log( "seqRemoteSearchDriver::" + _this.pSeq.disp_menu_item ); |
44 | | - // call the parent |
45 | | - _this.pSeq.parent_do_refresh_timeline(); |
46 | | - //Add our local bindings |
47 | | - _this.addResultBindings(); |
48 | | - return true; |
49 | | - } |
50 | | - } |
51 | | - }, |
52 | | - addResultBindings:function() { |
53 | | - // set up seq: |
54 | | - var _this = this; |
55 | | - // setup parent bindings: |
56 | | - this.parent_addResultBindings(); |
57 | | - |
58 | | - // Add an additional click binding |
59 | | - $j( '.rsd_res_item' ).click( function() { |
60 | | - mw.log( 'SeqRemoteSearch: rsd_res_item: click (remove sequence_add_target)' ); |
61 | | - _this.sequence_add_target = false; |
62 | | - } ); |
63 | | - |
64 | | - // Add an additional drag binding |
65 | | - $j( '.rsd_res_item' ).draggable( 'destroy' ).draggable( { |
66 | | - helper:function() { |
67 | | - return $j( this ). clone ().appendTo( 'body' ).css( { 'z-index':9999 } ).get( 0 ); |
68 | | - }, |
69 | | - revert:'invalid', |
70 | | - start:function() { |
71 | | - mw.log( 'start drag' ); |
72 | | - } |
73 | | - } ); |
74 | | - $j( ".mv_clip_drag" ).droppable( 'destroy' ).droppable( { |
75 | | - accept: '.rsd_res_item', |
76 | | - over:function( event, ui ) { |
77 | | - // mw.log("over : mv_clip_drag: " + $j(this).attr('id') ); |
78 | | - $j( this ).css( 'border-right', 'solid thick red' ); |
79 | | - }, |
80 | | - out:function( event, ui ) { |
81 | | - $j( this ).css( 'border-right', 'solid thin white' ); |
82 | | - }, |
83 | | - drop: function( event, ui ) { |
84 | | - $j( this ).css( 'border-right', 'solid thin white' ); |
85 | | - mw.log( "Droped: " + $j( ui.draggable ).attr( 'id' ) + ' on ' + $j( this ).attr( 'id' ) ); |
86 | | - _this.sequence_add_target = $j( this ).attr( 'id' ); |
87 | | - // load the original draged item |
88 | | - var rObj = _this.getResourceFromId( $j( ui.draggable ).attr( 'id' ) ); |
89 | | - _this.showResourceEditor( rObj, ui.draggable ); |
90 | | - } |
91 | | - } ); |
92 | | - |
93 | | - }, |
94 | | - insertResource:function( rObj ) { |
95 | | - var _this = this; |
96 | | - mw.log( "SEQ insert resource after:" + _this.sequence_add_target + ' of type: ' + rObj.mime ); |
97 | | - if ( _this.sequence_add_target ) { |
98 | | - var tClip = _this.pSeq.getClipFromSeqID( _this.sequence_add_target ); |
99 | | - var target_order = false; |
100 | | - if ( tClip ) |
101 | | - var target_order = tClip.order; |
102 | | - } |
103 | | - |
104 | | - // Check if the file is already Available |
105 | | - this.isFileLocallyAvailable( rObj, function( status ) { |
106 | | - |
107 | | - var clipConfig = { |
108 | | - 'type' : rObj.mime, |
109 | | - 'uri' : _this.fileNS + ':' + rObj.target_resource_title, |
110 | | - 'title' : rObj.title |
111 | | - }; |
112 | | - |
113 | | - // Set via local properties if available |
114 | | - clipConfig['src'] = ( rObj.local_src ) ? rObj.local_src : rObj.src; |
115 | | - clipConfig['poster'] = ( rObj.local_poster ) ? rObj.local_poster : rObj.poster; |
116 | | - |
117 | | - if ( rObj.start_time && rObj.end_time ) { |
118 | | - clipConfig['dur'] = mw.npt2seconds( rObj.end_time ) - mw.npt2seconds( rObj.start_time ); |
119 | | - } else { |
120 | | - // Provide a default duration if none set |
121 | | - clipConfig['dur'] = 4; |
122 | | - } |
123 | | - |
124 | | - // Create the media element (target order+1 (since we insert (after) |
125 | | - _this.pSeq.plObj.tryAddMediaObj( clipConfig, ( parseInt( target_order ) + 1 ) ); |
126 | | - |
127 | | - // Refresh the timeline: |
128 | | - _this.pSeq.do_refresh_timeline(); |
129 | | - mw.log( "run close all: " ); |
130 | | - _this.closeAll(); |
131 | | - } ); |
132 | | - }, |
133 | | - getClipEditControlActions:function() { |
134 | | - var _this = this; |
135 | | - return { |
136 | | - 'insert_seq':function( rObj ) { |
137 | | - _this.insertResource( rObj ) |
138 | | - }, |
139 | | - 'cancel':function( rObj ) { |
140 | | - _this.cancelClipEditCB( rObj ) |
141 | | - } |
142 | | - }; |
143 | | - }, |
144 | | - showResourceEditor:function( rObj, rsdElement ) { |
145 | | - var _this = this; |
146 | | - // Open up a new target_contaienr: |
147 | | - if ( $j( '#seq_resource_import' ).length == 0 ) |
148 | | - $j( 'body' ).append( '<div id="seq_resource_import" style="position:relative"></div>' ); |
149 | | - |
150 | | - var buttons = { }; |
151 | | - buttons[ gM( 'mwe-cancel' ) ] = function() { |
152 | | - $j( this ).dialog( "close" ); |
153 | | - } |
154 | | - |
155 | | - $j( '#seq_resource_import' ).dialog( 'destroy' ).dialog( { |
156 | | - bgiframe: true, |
157 | | - width:750, |
158 | | - height:480, |
159 | | - modal: true, |
160 | | - buttons: buttons |
161 | | - } ); |
162 | | - _this.target_container = '#seq_resource_import'; |
163 | | - // do parent resource edit (with updated target) |
164 | | - this.parent_showResourceEditor( rObj, rsdElement ); |
165 | | - }, |
166 | | - closeAll:function() { |
167 | | - mw.log( 'should close: seq_resource_import' ); |
168 | | - $j( '#seq_resource_import' ).dialog( 'close' ).dialog( 'destroy' ).remove(); |
169 | | - // Unhide the results container |
170 | | - $j( '#rsd_results_container' ).show(); |
171 | | - //this.parent_closeAll(); |
172 | | - }, |
173 | | - getEditToken:function( callback ) { |
174 | | - if ( this.pSeq.sequenceEditToken ) { |
175 | | - callback( this.pSeq.sequenceEditToken ) |
176 | | - } else { |
177 | | - this.parent_getEditToken( callback ); |
178 | | - } |
179 | | - }, |
180 | | - cancelClipEditCB:function() { |
181 | | - mw.log( 'seqRSD:cancelClipEditCB' ); |
182 | | - $j( '#seq_resource_import' ).dialog( 'close' ).dialog( 'destroy' ).remove(); |
183 | | - } |
184 | | -}; |
185 | | - |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/mw.TimedEffectsEdit.js |
— | — | @@ -1,278 +0,0 @@ |
2 | | -/* |
3 | | -* mvTimedEffectsEdit |
4 | | -* |
5 | | -* for now just simple single stack transition control |
6 | | -* |
7 | | -*/ |
8 | | - |
9 | | -// Add our local msgs |
10 | | -mw.addMessages( { |
11 | | - "mwe-transition_in" : "Transition in", |
12 | | - "mwe-transition_out" : "Transition out", |
13 | | - "mwe-effects" : "Effects stack", |
14 | | - "mwe-remove_transition" : "Remove transition", |
15 | | - "mwe-edit_transin" : "Edit transition into clip", |
16 | | - "mwe-edit_transout" : "Edit transition out of clip", |
17 | | - "mwe-add-transition" : "Add a transition" |
18 | | -} ); |
19 | | - |
20 | | -var default_timed_effect_values = { |
21 | | - |
22 | | - // The Resource Object |
23 | | - 'rObj': null, |
24 | | - |
25 | | - // Target Display Clip |
26 | | - 'clip_disp_ct':null, |
27 | | - |
28 | | - // Control container |
29 | | - 'control_ct':null, |
30 | | - |
31 | | - // Parent container |
32 | | - 'parent_ct': null, |
33 | | - |
34 | | - // Parent sequence Object |
35 | | - 'pSeq': null, |
36 | | - |
37 | | - // The requested edit action |
38 | | - 'edit_action': null |
39 | | -} |
40 | | - |
41 | | -mw.TimedEffectsEdit = function( options ) { |
42 | | - return this.init( options ); |
43 | | -}; |
44 | | - |
45 | | -// Set up the TimedEffectsEdit object |
46 | | -mw.TimedEffectsEdit.prototype = { |
47 | | - |
48 | | - // Menu_items Object contains: default html, js setup/loader functions |
49 | | - menu_items : { |
50 | | - 'transin': { |
51 | | - 'title':gM( 'mwe-transition_in' ), |
52 | | - 'clip_attr':'transIn', |
53 | | - 'doEdit':function( _this ) { |
54 | | - _this.doTransitionDisplayEdit( 'transin' ); |
55 | | - } |
56 | | - }, |
57 | | - 'transout': { |
58 | | - 'title':gM( 'mwe-transition_out' ), |
59 | | - 'clip_attr':'transOut', |
60 | | - 'doEdit':function( _this ) { |
61 | | - _this.doTransitionDisplayEdit( 'transout' ); |
62 | | - } |
63 | | - }, |
64 | | - 'effects': { |
65 | | - 'title':gM( 'mwe-effects' ), |
66 | | - 'clip_attr':'Effects', |
67 | | - 'doEdit':function( _this ) { |
68 | | - // display |
69 | | - _this.doEditEffectDisplayEdit(); |
70 | | - } |
71 | | - } |
72 | | - }, |
73 | | - init:function( options ) { |
74 | | - // Init object: |
75 | | - for ( var i in default_timed_effect_values ) { |
76 | | - if ( options[i] ) { |
77 | | - this[i] = options[i]; |
78 | | - } |
79 | | - } |
80 | | - this.doEditMenu(); |
81 | | - }, |
82 | | - doEditMenu:function() { |
83 | | - mw.log( 'mvTimedEffects : doEditMenu::' ); |
84 | | - var _this = this; |
85 | | - // add in subMenus if set |
86 | | - // check for submenu and add to item container |
87 | | - |
88 | | - // update the default edit display (if we have a target) |
89 | | - var tTarget = 'transin'; |
90 | | - if ( this.rObj.transOut ) |
91 | | - tTarget = 'transout'; |
92 | | - if ( this.rObj.effects ) |
93 | | - tTarget = 'effects'; |
94 | | - |
95 | | - var o = ''; |
96 | | - var tabc = ''; |
97 | | - o += '<div id="mv_submenu_timedeffect">'; |
98 | | - o += '<ul>'; |
99 | | - var inx = 0; |
100 | | - var selected_tab = 0; |
101 | | - $j.each( this.menu_items, function( sInx, mItem ) { |
102 | | - if ( sInx == tTarget ) { |
103 | | - selected_tab = inx; |
104 | | - } |
105 | | - // check if the given editType is valid for our given media type |
106 | | - o += '<li>' + |
107 | | - '<a id="mv_te_' + sInx + '" href="#te_' + sInx + '">' + mItem.title + '</a>' + |
108 | | - '</li>'; |
109 | | - tabc += '<div id="te_' + sInx + '" style="overflow:auto;" ></div>'; |
110 | | - inx++; |
111 | | - } ); |
112 | | - o += '</ul>' + tabc; |
113 | | - o += '</div>'; |
114 | | - // add sub menu container with menu html: |
115 | | - $j( '#' + this.control_ct ).html( o ) ; |
116 | | - mw.log( 'should have set: #' + this.control_ct + ' to: ' + o ); |
117 | | - // set up bindins: |
118 | | - $j( '#mv_submenu_timedeffect' ).tabs( { |
119 | | - selected: selected_tab, |
120 | | - select: function( event, ui ) { |
121 | | - _this.showEditUI( $j( ui.tab ).attr( 'id' ).replace( 'mv_te_', '' ) ); |
122 | | - } |
123 | | - } ).addClass( 'ui-tabs-vertical ui-helper-clearfix' ); |
124 | | - // close left: |
125 | | - $j( "#mv_submenu_clipedit li" ).removeClass( 'ui-corner-top' ).addClass( 'ui-corner-left' ); |
126 | | - _this.showEditUI( tTarget ); |
127 | | - }, |
128 | | - showEditUI:function( tab_id ) { |
129 | | - // @@todo fix the double display of showEditUI |
130 | | - mw.log( "showEditUI::" ); |
131 | | - if ( !this.menu_items[ tab_id ] ) { |
132 | | - mw.log( 'error: showEditUI missing item:' + tab_id ); |
133 | | - } else { |
134 | | - // use the menu_item config to map to function display |
135 | | - this.menu_items[tab_id].doEdit( this ); |
136 | | - } |
137 | | - }, |
138 | | - doEditEffectDisplayEdit:function() { |
139 | | - var _this = this; |
140 | | - var appendTarget = '#te_effects'; |
141 | | - mw.log( 'type:' + _this.rObj['type'] ); |
142 | | - $j( appendTarget ).html( gM( 'mwe-loading_txt' ) ); |
143 | | - // @@todo integrate into core and loading system: |
144 | | - loadExternalJs( mw.getMwEmbedPath() + 'libClipEdit/pixastic-editor/editor.js?' + getMwReqParam() ); |
145 | | - loadExternalJs( mw.getMwEmbedPath() + 'libClipEdit/pixastic-editor/pixastic.all.js?' + getMwReqParam() ); |
146 | | - loadExternalJs( mw.getMwEmbedPath() + 'libClipEdit/pixastic-editor/ui.js?' + getMwReqParam() ); |
147 | | - loadExternalJs( mw.getMwEmbedPath() + 'libClipEdit/pixastic-editor/uidata.js?' + getMwReqParam() ); |
148 | | - mw.getStyleSheet( mw.getMwEmbedPath() + 'libClipEdit/pixastic-editor/pixastic.all.js?' + getMwReqParam() ); |
149 | | - |
150 | | - var isPixasticReady = function() { |
151 | | - if ( typeof PixasticEditor != 'undefined' ) { |
152 | | - $j( appendTarget ).html( '<a href="#" class="run_effect_demo">Run Pixastic Editor Demo</a> (not yet fully integrated/ super alpha)<br> best to view <a href="http://www.pixastic.com/editor-test/">stand alone</a>' ); |
153 | | - $j( appendTarget + ' .run_effect_demo' ).click( function() { |
154 | | - var cat = _this; |
155 | | - var imgElm = $j( '.clip_container:visible img' ).get( 0 ); |
156 | | - PixasticEditor.load( imgElm ); |
157 | | - } ); |
158 | | - } else { |
159 | | - setTimeout( isPixasticReady, 100 ) |
160 | | - } |
161 | | - } |
162 | | - isPixasticReady(); |
163 | | - }, |
164 | | - doTransitionDisplayEdit:function( target_item ) { |
165 | | - var _this = this; |
166 | | - mw.log( "doTransitionDisplayEdit: " + target_item ); |
167 | | - var apendTarget = '#te_' + target_item; |
168 | | - // check if we have a transition of type clip_attr |
169 | | - if ( !this.rObj[ this.menu_items[ target_item ].clip_attr ] ) { |
170 | | - // empty append the transition list: |
171 | | - this.getTransitionListControl( apendTarget ); |
172 | | - return ; |
173 | | - } |
174 | | - var cTran = this.rObj[ this.menu_items[ target_item ].clip_attr ]; |
175 | | - var o = '<h3>' + gM( 'mwe-edit_' + target_item ) + '</h3>'; |
176 | | - o += 'Type: ' + |
177 | | - '<select class="te_select_type">'; |
178 | | - for ( var typeKey in mvTransLib.type ) { |
179 | | - var selAttr = ( cTran.type == typeKey ) ? ' selected':''; |
180 | | - o += '<option value="' + typeKey + '"' + selAttr + '>' + typeKey + '</option>'; |
181 | | - } |
182 | | - o += '</select><br>'; |
183 | | - o += '<span class="te_subtype_container"></span>'; |
184 | | - |
185 | | - // add html and select bindings |
186 | | - $j( apendTarget ).html( o ).children( '.te_select_type' ) |
187 | | - .change( function() { |
188 | | - var selectedType = $j( this ).val(); |
189 | | - // update subtype listing: |
190 | | - _this.getSubTypeControl( target_item, selectedType, apendTarget + ' .te_subtype_container' ); |
191 | | - } ); |
192 | | - // add subtype control |
193 | | - _this.getSubTypeControl( target_item, cTran.type, apendTarget + ' .te_subtype_container' ); |
194 | | - |
195 | | - // add remove transition button: |
196 | | - $j( apendTarget ).append( '<br><br>' + $j.btnHtml( gM( 'mwe-remove_transition' ), 'te_remove_transition', 'close' ) ) |
197 | | - .children( '.te_remove_transition' ) |
198 | | - .click( function() { |
199 | | - // remove the transtion from the playlist |
200 | | - _this.pSeq.plObj.transitions[cTran.id] = null; |
201 | | - // remove the transtion from the clip: |
202 | | - _this.rObj[ _this.menu_items[ target_item ].clip_attr ] = null; |
203 | | - // update the interface: |
204 | | - _this.doTransitionDisplayEdit( target_item ); |
205 | | - // update the sequence |
206 | | - _this.pSeq.do_refresh_timeline(); |
207 | | - } ); |
208 | | - }, |
209 | | - getSubTypeControl:function( target_item, transition_type, htmlTarget ) { |
210 | | - var _this = this; |
211 | | - var cTran = this.rObj[ this.menu_items[ target_item ].clip_attr ]; |
212 | | - var o = 'Sub Type:<select class="te_subtype_select">'; |
213 | | - for ( var subTypeKey in mvTransLib.type[ transition_type ] ) { |
214 | | - var selAttr = ( cTran.subtype == subTypeKey ) ? ' selected' : ''; |
215 | | - o += '<option value="' + subTypeKey + '"' + selAttr + '>' + subTypeKey + '</option>'; |
216 | | - } |
217 | | - o += '</select><br>'; |
218 | | - $j( htmlTarget ).html( o ) |
219 | | - .children( '.te_subtype_select' ) |
220 | | - .change( function() { |
221 | | - // update the property |
222 | | - cTran.subtype = $j( this ).val(); |
223 | | - // re-gen timeline / playlist |
224 | | - _this.pSeq.do_refresh_timeline(); |
225 | | - // (re-select self?) |
226 | | - _this.getSubTypeControl( target_item, transition_type, htmlTarget ); |
227 | | - } ); |
228 | | - var o = ''; |
229 | | - // check for extra properties control: |
230 | | - for ( var i = 0; i < mvTransLib.type[ transition_type ][ cTran.subtype ].attr.length; i++ ) { |
231 | | - var tAttr = mvTransLib.type[ transition_type ][ cTran.subtype ].attr[i] |
232 | | - switch( tAttr ) { |
233 | | - case 'fadeColor': |
234 | | - var cColor = ( cTran['fadeColor'] ) ? cTran['fadeColor']:''; |
235 | | - $j( htmlTarget ).append( 'Select Color: <div class="colorSelector"><div class="colorIndicator" style="background-color: ' + cColor + '"></div></div>' ); |
236 | | - mw.log( 'cs target: ' + htmlTarget + ' .colorSelector' ); |
237 | | - |
238 | | - |
239 | | - $j( htmlTarget + ' .colorSelector' ).ColorPicker( { |
240 | | - color: cColor, |
241 | | - onShow: function ( colpkr ) { |
242 | | - // make sure its ontop: |
243 | | - $j( colpkr ).css( "zIndex", "12" ); |
244 | | - $j( colpkr ).fadeIn( 500 ); |
245 | | - return false; |
246 | | - }, |
247 | | - onHide: function ( colpkr ) { |
248 | | - $j( colpkr ).fadeOut( 500 ); |
249 | | - _this.pSeq.plObj.setCurrentTime( 0, function() { |
250 | | - mw.log( "render ready" ); |
251 | | - } ); |
252 | | - return false; |
253 | | - }, |
254 | | - onChange: function ( hsb, hex, rgb ) { |
255 | | - $j( htmlTarget + ' .colorIndicator' ).css( 'backgroundColor', '#' + hex ); |
256 | | - // update the transition |
257 | | - cTran['fadeColor'] = '#' + hex; |
258 | | - } |
259 | | - } ) |
260 | | - break; |
261 | | - } |
262 | | - } |
263 | | - // and finally add effect timeline scruber (for timed effects this also stores keyframes) |
264 | | - |
265 | | - }, |
266 | | - getTransitionListControl : function( target_out ) { |
267 | | - mw.log( "getTransitionListControl" ); |
268 | | - var o = '<h3>' + gM( 'mwe-add-transition' ) + '</h3>'; |
269 | | - for ( var type in mvTransLib['type'] ) { |
270 | | - mw.log( 'on tran type: ' + type ); |
271 | | - var tLibSet = mvTransLib['type'][ type ]; |
272 | | - for ( var subtype in tLibSet ) { |
273 | | - o += '<img style="float:left;padding:10px;" ' + |
274 | | - 'src="' + mvTransLib.getTransitionIcon( type, subtype ) + '">'; |
275 | | - } |
276 | | - } |
277 | | - $j( target_out ).html( o ); |
278 | | - } |
279 | | -}; |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/mw.SequenceEdit.js |
— | — | @@ -1,1646 +0,0 @@ |
2 | | -/* |
3 | | - * mw.Sequencer.js Created on Oct 17, 2007 |
4 | | - * |
5 | | - * All Metavid Wiki code is Released under the GPL2 |
6 | | - * for more info visit http://metavid.org/wiki/Code |
7 | | - * |
8 | | - * @author Michael Dale |
9 | | - * @email mdale@wikimedia.org |
10 | | - * |
11 | | - * Further developed in open source development partnership with kaltura. |
12 | | - * more info at http://kaltura.com & http://kaltura.org |
13 | | - * |
14 | | - * mv_sequencer.js |
15 | | - * is a basic embeddeble sequencer. |
16 | | - * extends the playlist with drag/drop/sortable/add/remove functionality |
17 | | - * editing of annotative content (mostly for wiki) |
18 | | - * enables more dynamic layouts |
19 | | - * exports back out to json or inline format |
20 | | - */ |
21 | | - |
22 | | -mw.includeAllModuleMessages(); |
23 | | -/* |
24 | | -* Setup the sequencer jQuery binding: |
25 | | -*/ |
26 | | -( function( $ ) { |
27 | | - $.fn.sequencer = function( options, callback ) { |
28 | | - // Debugger |
29 | | - options['target_sequence_container'] = this.selector; |
30 | | - // Issue a request to get the CSS file (if not already included): |
31 | | - mw.log( 'calling new mvSequencer' ); |
32 | | - // Initialise the sequence object (it will take over from there) |
33 | | - // No more than one mvSeq obj for now: |
34 | | - if ( !mw['mvSeq'] ) { |
35 | | - mw['mvSeq'] = new mw.SequenceEdit( options ); |
36 | | - } else { |
37 | | - mw.log( 'mvSeq already init' ); |
38 | | - } |
39 | | - } |
40 | | -} )( jQuery ); |
41 | | - |
42 | | - // used to set default values and validate the passed init object |
43 | | -var sequencerDefaultValues = { |
44 | | - |
45 | | - // Instance name of sequencer |
46 | | - instance_name:'mvSeq', |
47 | | - |
48 | | - // Target sequence container |
49 | | - target_sequence_container:null, |
50 | | - |
51 | | - target_form_text: null, |
52 | | - |
53 | | - // what is our save mode: |
54 | | - // can save to 'api' url or 'form' |
55 | | - saveMode : 'api', |
56 | | - |
57 | | - video_container_id:'mv_video_container', |
58 | | - |
59 | | - video_width : 400, |
60 | | - video_height: 300, |
61 | | - |
62 | | - sequence_tools_id:'mv_sequence_tools', |
63 | | - timeline_id:'mv_timeline', |
64 | | - smilPlayerId:'seq_pl', |
65 | | - plObj:'null', |
66 | | - |
67 | | - // In pixel to second ratio ie 100pixles for every ~30seconds |
68 | | - timeline_scale:.06, |
69 | | - |
70 | | - // Default timeline duration in seconds |
71 | | - timeline_duration:500, |
72 | | - |
73 | | - playline_time:0, |
74 | | - track_thumb_height:60, |
75 | | - track_text_height:20, |
76 | | - |
77 | | - // Default timeline mode: "story" (i-movie like) or "time" (finalCut like) |
78 | | - timeline_mode:'storyboard', |
79 | | - |
80 | | - // How large are the i-movie type clips |
81 | | - track_clipThumb_height:80, |
82 | | - |
83 | | - // Default time to subtract or add when adjusting clips. |
84 | | - base_adj_duration:.5, |
85 | | - |
86 | | - // Default clipboard is empty: |
87 | | - clipboard:new Array(), |
88 | | - |
89 | | - // Stores the clipboard edit token (if user has rights to edit their User page) |
90 | | - clipboardEditToken:null, |
91 | | - |
92 | | - // Stores the sequence edit token (if user has rights to edit the current sequence) |
93 | | - sequenceEditToken:null, |
94 | | - |
95 | | - // The time the sequence was last touched (grabbed at time of startup) |
96 | | - sequenceTouchedTime:null, |
97 | | - |
98 | | - // Default config for the add media wizard |
99 | | - amw_conf: { }, |
100 | | - |
101 | | - |
102 | | - inline_playlist:'null', |
103 | | - inline_playlist_id:'null', |
104 | | - smilSource:'null', |
105 | | - |
106 | | - // The edit stack (so that you can "undo" edits) |
107 | | - edit_stack:new Array(), |
108 | | - disp_menu_item:null, |
109 | | - |
110 | | - // Track Object |
111 | | - tracks: { } |
112 | | -} |
113 | | -mw.SequenceEdit = function( iObj ) { |
114 | | - return this.init( iObj ); |
115 | | -}; |
116 | | -// Set up the mvSequencer object |
117 | | -mw.SequenceEdit.prototype = { |
118 | | - // The menu_items Object contains: default html, js setup/loader functions |
119 | | - menu_items : { |
120 | | - 'clipedit': { |
121 | | - 'default':0, |
122 | | - 'html':'', |
123 | | - 'js': function( this_seq ) { |
124 | | - this_seq.doEditSelectedClip(); |
125 | | - }, |
126 | | - 'click_js':function( this_seq ) { |
127 | | - this_seq.doEditSelectedClip(); |
128 | | - } |
129 | | - }, |
130 | | - 'transition': { |
131 | | - 'default':0, |
132 | | - 'html' : '<h3>' + gM( 'mwe-menu_transition' ) + '</h3>', |
133 | | - 'js':function( this_seq ) { |
134 | | - this_seq.doEditTransitionSelectedClip(); |
135 | | - }, |
136 | | - 'click_js':function( this_seq ) { |
137 | | - // Highlight the transition of the selected clip: |
138 | | - this_seq.doEditTransitionSelectedClip(); |
139 | | - } |
140 | | - }, |
141 | | - 'cliplib': { |
142 | | - 'default':0, |
143 | | - 'html': gM( 'mwe-loading_txt' ), |
144 | | - 'js':function( this_seq ) { |
145 | | - // Load the search interface with sequence tool targets |
146 | | - mw.load( [ |
147 | | - 'mw.RemoteSearchDriver', |
148 | | - 'mw.SeqRemoteSearchDriver' |
149 | | - ], function() { |
150 | | - this_seq.mySearch = new mw.SeqRemoteSearchDriver( this_seq ); |
151 | | - this_seq.mySearch.showDialog(); |
152 | | - } ); |
153 | | - } |
154 | | - }, |
155 | | - 'options': { |
156 | | - 'default':0, |
157 | | - 'html' : '<h3>' + gM( 'mwe-menu_options' ) + '</h3>' + |
158 | | - gM( 'mwe-editor_mode' ) + '<br> ' + |
159 | | - '<blockquote><input type="radio" value="simple_editor" name="opt_editor">' + |
160 | | - gM( 'mwe-simple_editor_desc' ) + ' </blockquote>' + |
161 | | - '<blockquote><input type="radio" value="advanced_editor" name="opt_editor">' + |
162 | | - gM( 'mwe-advanced_editor_desc' ) + ' </blockquote>' + |
163 | | - gM( 'mwe-other_options' ) + '<br>' + |
164 | | - '<blockquote><input type="checkbox" value="contextmenu_opt" name="contextmenu_opt">' + |
165 | | - gM( 'mwe-contextmenu_opt' ) + ' </blockquote>', |
166 | | - 'js':function( this_seq ) { |
167 | | - $j( '#options_ic input[value=\'simple_editor\']' ).attr( { |
168 | | - 'checked':( this_seq.timeline_mode == 'storyboard' ) ? true:false |
169 | | - } ).click( function() { |
170 | | - this_seq.doSimpleTl(); |
171 | | - } ); |
172 | | - $j( '#options_ic input[value=\'advanced_editor\']' ).attr( { |
173 | | - 'checked':( this_seq.timeline_mode == 'time' ) ? true:false |
174 | | - } ).click( function() { |
175 | | - this_seq.doAdvancedTl(); |
176 | | - } ); |
177 | | - // set up the options for context menus |
178 | | - } |
179 | | - } |
180 | | - }, |
181 | | - |
182 | | - // set up initial key states: |
183 | | - key_shift_down:false, |
184 | | - key_ctrl_down:false, |
185 | | - inputFocus:false, |
186 | | - |
187 | | - init: function( iObj ) { |
188 | | - // set up pointer to _this for current scope: |
189 | | - var _this = this; |
190 | | - // set the default values: |
191 | | - for ( var i in sequencerDefaultValues ) { |
192 | | - this[ i ] = sequencerDefaultValues[i]; |
193 | | - } |
194 | | - for ( var i in iObj ) { |
195 | | - // mw.log('on '+ i + ' :' + iObj[i]); |
196 | | - if ( typeof sequencerDefaultValues[i] != 'undefined' ) { // make sure its a valid property |
197 | | - this[i] = iObj[i]; |
198 | | - } |
199 | | - } |
200 | | - |
201 | | - // check for sequence_container |
202 | | - if ( $j( this.target_sequence_container ).length === 0 ) { |
203 | | - mw.log( "Error: missing target_sequence_container" ); |
204 | | - return false; |
205 | | - } |
206 | | - |
207 | | - // $j(this.target_sequence_container).css('position', 'relative'); |
208 | | - this['base_width'] = $j( this.target_sequence_container ).width(); |
209 | | - this['base_height'] = $j( this.target_sequence_container ).height(); |
210 | | - |
211 | | - // add the container divs (with basic layout ~universal~ |
212 | | - $j( this.target_sequence_container ).html( '' + |
213 | | - '<div id="' + this.video_container_id + '" style="position:absolute;right:0px;top:0px;' + |
214 | | - 'width:' + this.video_width + 'px;height:' + ( this.video_height + 54 ) + 'px;"/>' + |
215 | | - '<div id="' + this.timeline_id + '" class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;' + |
216 | | - 'left:0px;right:0px;top:' + ( this.video_height + 60 ) + 'px;bottom:20px;overflow:auto;">' + |
217 | | - gM( 'mwe-loading_timeline' ) + '</div>' + |
218 | | - '<div class="seq_status" style="position:absolute;left:0px;width:300px;"></div>' + |
219 | | - '<div class="seq_save_cancel" style="position:absolute;' + |
220 | | - 'left:5px;bottom:0px;height:15px;">' + |
221 | | - gM( 'mwe-loading_user_rights' ) + |
222 | | - '</div>' + |
223 | | - '<div class="about_editor" style="position:absolute;right:5px;bottom:0px;">' + |
224 | | - gM( 'mwe-sequencer_credit_line' ) + |
225 | | - '</div>' + |
226 | | - '<div id="' + this.sequence_tools_id + '" style="position:absolute;' + |
227 | | - 'left:0px;right:' + ( this.video_width + 10 ) + 'px;top:0px;height:' + ( this.video_height + 47 ) + 'px;"/>' |
228 | | - ).css( { |
229 | | - 'min-width':'850px' |
230 | | - } ); |
231 | | - |
232 | | - |
233 | | - // Check for source based sequence editor (a clean page load of the editor) |
234 | | - if ( this.smilSource != 'null' ) { |
235 | | - mw.log( 'smilSource:: ' + this.smilSource ); |
236 | | - var src_attr = ' src="' + this.smilSource + '" '; |
237 | | - } else { |
238 | | - mw.log( ' null playlist src .. (start empty) ' ); |
239 | | - var src_attr = ''; |
240 | | - } |
241 | | - $j( '#' + this.video_container_id ).append( |
242 | | - $j('<video />').css({ |
243 | | - 'width': this.video_width, |
244 | | - 'height': this.video_height |
245 | | - }).attr({ |
246 | | - 'id' : this.smilPlayerId |
247 | | - }).append( |
248 | | - $j('<source />').attr({ |
249 | | - 'type' : 'application/smil', |
250 | | - 'src' : this.smilSource |
251 | | - }) |
252 | | - ) |
253 | | - ) |
254 | | - $j('#' + this.smilPlayerId ).embedPlayer(); |
255 | | - |
256 | | - setTimeout( function() { |
257 | | - _this.checkReadyPlObj() |
258 | | - }, 25 ); |
259 | | - }, |
260 | | - updateSeqSaveButtons:function() { |
261 | | - var _this = this; |
262 | | - if ( this.sequenceEditToken ) { |
263 | | - $j( this.target_sequence_container + ' .seq_save_cancel' ).html( |
264 | | - $j.btnHtml( gM( 'mwe-edit_save' ), 'seq_edit_save', 'close' ) + ' ' + |
265 | | - $j.btnHtml( gM( 'mwe-edit_cancel' ), 'seq_edit_cancel', 'close' ) |
266 | | - ); |
267 | | - } else { |
268 | | - $j( this.target_sequence_container + ' .seq_save_cancel' ).html( gM( 'mwe-no_edit_permissions' ) ); |
269 | | - } |
270 | | - // assign bindings |
271 | | - $j( this.target_sequence_container + ' .seq_edit_cancel' ).unbind().click( function() { |
272 | | - var x = window.confirm( gM( 'mwe-edit_cancel_confirm' ) ); |
273 | | - if ( x ) { |
274 | | - _this.closeModEditor(); |
275 | | - } else { |
276 | | - // close request canceled. |
277 | | - } |
278 | | - } ); |
279 | | - $j( this.target_sequence_container + ' .seq_edit_save' ).unbind().click( function() { |
280 | | - // pop up progress dialog ~requesting edit line summary~ |
281 | | - // remove any other save dialog |
282 | | - $j( '#seq_save_dialog' ).remove(); |
283 | | - $j( 'body' ).append( |
284 | | - $j('<div />').attr({ |
285 | | - 'id':"seq_save_dialog", |
286 | | - 'title': gM( 'mwe-edit_save' ) |
287 | | - }).append( |
288 | | - $j('<span />') |
289 | | - .addClass( 'mw-summary') |
290 | | - .append( |
291 | | - $j('<label />').attr('for', 'seq_save_summary') |
292 | | - ), |
293 | | - $j('<input />') |
294 | | - .attr({ |
295 | | - 'id' : 'seq_save_summary', |
296 | | - 'tabindex' : 1, |
297 | | - 'maxlength' : 200, |
298 | | - 'size': 30, |
299 | | - 'name' : 'seq_save_summary' |
300 | | - }) |
301 | | - ) |
302 | | - ); |
303 | | - var bConf = { }; |
304 | | - bConf[ gM( 'mwe-cancel' ) ] = function() { |
305 | | - $j( this ).dialog( 'close' ); |
306 | | - }; |
307 | | - bConf[ gM( 'mwe-edit_save' ) ] = function() { |
308 | | - var saveReq = { |
309 | | - 'action' : 'edit', |
310 | | - 'title' : _this.plObj.mTitle, |
311 | | - // the text is the sequence XML + the description |
312 | | - 'text' : _this.getSeqOutputHLRDXML() + "\n" + |
313 | | - _this.plObj.wikiDesc, |
314 | | - 'token' : _this.sequenceEditToken, |
315 | | - 'summary' : $j( '#seq_save_summary' ).val() |
316 | | - }; |
317 | | - // change to progress bar and save: |
318 | | - $j( '#seq_save_dialog' ).html( '<div class="progress" /><br>' + |
319 | | - gM( 'mwe-saving_wait' ) |
320 | | - ) |
321 | | - $j( '#seq_save_dialog .progress' ).progressbar( { |
322 | | - value: 100 |
323 | | - } ); |
324 | | - // run the Seq Save Request: |
325 | | - mw.getJSON( _this.getLocalApiUrl(), saveReq, function( data ) { |
326 | | - $j( '#seq_save_dialog' ).html( gM( 'mwe-save_done' ) ); |
327 | | - $j( '#seq_save_dialog' ).dialog( 'option', |
328 | | - 'buttons', { |
329 | | - "Done":function() { |
330 | | - // refresh the page? |
331 | | - window.location.reload(); |
332 | | - }, |
333 | | - "Do More Edits": function() { |
334 | | - $j( this ).dialog( "close" ); |
335 | | - } |
336 | | - } ); |
337 | | - } ); |
338 | | - }; |
339 | | - // dialog: |
340 | | - $j( '#seq_save_dialog' ).dialog( { |
341 | | - bgiframe: true, |
342 | | - autoOpen: true, |
343 | | - modal: true, |
344 | | - buttons: bConf |
345 | | - } ); |
346 | | - } ) |
347 | | - }, |
348 | | - // display a menu item (hide the rest) |
349 | | - disp:function( item, dispCall ) { |
350 | | - mw.log( 'menu_item disp: ' + item ); |
351 | | - this.disp_menu_item = item; |
352 | | - // update the display and item state: |
353 | | - if ( this.menu_items[item] ) { |
354 | | - // update the tabs display: |
355 | | - if ( !dispCall ) |
356 | | - $j( "#seq_menu" ).tabs( 'select', this.menu_items[item].inx ); |
357 | | - |
358 | | - this.menu_items[item]['default'] = 1; |
359 | | - // do any click_js actions:getInsertControl |
360 | | - if ( this.menu_items[item].click_js ) |
361 | | - this.menu_items[item].click_js( this ); |
362 | | - } |
363 | | - }, |
364 | | - // setup the menu items: |
365 | | - setupMenuItems:function() { |
366 | | - mw.log( 'loadInitMenuItems' ); |
367 | | - var _this = this; |
368 | | - // do all the menu_items setup: @@we could defer this to once the menu item is requested |
369 | | - for ( var i in this.menu_items ) { |
370 | | - if ( this.menu_items[i].js ) |
371 | | - this.menu_items[i].js( this ); |
372 | | - } |
373 | | - }, |
374 | | - renderTimeLine:function() { |
375 | | - // empty out the top level html: |
376 | | - $j( '#' + this.timeline_id ).html( '' ); |
377 | | - // add html general for timeline |
378 | | - if ( this.timeline_mode == 'time' ) { |
379 | | - $j( '#' + this.timeline_id ).html( '' + |
380 | | - '<div id="' + this.timeline_id + '_left_cnt" class="mv_tl_left_cnt">' + |
381 | | - '<div id="' + this.timeline_id + '_head_control" style="position:absolute;top:0px;left:0px;right:0px;height:30px;">' + |
382 | | - '<a title="' + gM( 'mwe-play_from_position' ) + '" href="javascript:' + this.instance_name + '.play_jt()">' + |
383 | | - '<img style="width:16px;height:16px;border:0" src="' + mw.getMwEmbedPath() + 'images/control_play_blue.png">' + |
384 | | - '</a>' + |
385 | | - '<a title="' + gM( 'mwe-zoom_in' ) + '" href="javascript:' + this.instance_name + '.zoom_in()">' + |
386 | | - '<img style="width:16px;height:16px;border:0" src="' + mw.getMwEmbedPath() + 'images/zoom_in.png">' + |
387 | | - '</a>' + |
388 | | - '<a title="' + gM( 'mwe-zoom_out' ) + '" href="javascript:' + this.instance_name + '.zoom_out()">' + |
389 | | - '<img style="width:16px;height:16px;border:0" src="' + mw.getMwEmbedPath() + 'images/zoom_out.png">' + |
390 | | - '</a>' + |
391 | | - '<a title="' + gM( 'mwe-cut_clip' ) + '" href="javascript:' + this.instance_name + '.cut_mode()">' + |
392 | | - '<img style="width:16px;height:16px;border:0" src="' + mw.getMwEmbedPath() + 'images/cut.png">' + |
393 | | - '</a>' + |
394 | | - '</div>' + |
395 | | - '</div>' + |
396 | | - '<div id="' + this.timeline_id + '_tracks" class="mv_seq_tracks">' + |
397 | | - '<div id="' + this.timeline_id + '_head_jump" class="mv_head_jump" style="position:absolute;top:0px;left:0px;height:20px;"></div>' + |
398 | | - '<div id="' + this.timeline_id + '_playline" class="mv_playline"></div>' + |
399 | | - '</div>' |
400 | | - ); |
401 | | - // add playlist hook to update timeline |
402 | | - this.plObj.update_tl_hook = this.instance_name + '.update_tl_hook'; |
403 | | - var this_sq = this; |
404 | | - var top_pos = 25; |
405 | | - // add tracks: |
406 | | - for ( var i in this.plObj.tracks ) { |
407 | | - var track = this.plObj.tracks[i]; |
408 | | - // mw.log("on track: "+ i + ' t:'+ $j('#'+this.timeline_id+'_left_cnt').html() ); |
409 | | - // set up track based on disp type |
410 | | - switch( track.disp_mode ) { |
411 | | - case 'timeline_thumb': |
412 | | - var track_height = 60; |
413 | | - var exc_img = 'opened'; |
414 | | - var exc_action = 'close'; |
415 | | - var exc_msg = gM( 'mwe-collapse_track' ); |
416 | | - break; |
417 | | - case 'text': |
418 | | - var track_height = 20; |
419 | | - var exc_img = 'closed'; |
420 | | - var exc_action = 'open'; |
421 | | - var exc_msg = gM( 'mwe-expand_track' ); |
422 | | - break; |
423 | | - } |
424 | | - // add track name: |
425 | | - $j( '#' + this.timeline_id + '_left_cnt' ).append( |
426 | | - '<div id="track_cnt_' + i + '" style="top:' + top_pos + 'px;height:' + track_height + 'px;" class="track_name">' + |
427 | | - '<a id="mv_exc_' + i + '" title="' + exc_msg + '" href="javascript:' + this_sq.instance_name + '.exc_track(' + i + ',\'' + exc_action + '\')">' + |
428 | | - '<img id="' + this_sq.timeline_id + '_close_expand" style="width:16px;height:16px;border:0" ' + |
429 | | - ' src="' + mw.getMwEmbedPath() + 'images/' + exc_img + '.png">' + |
430 | | - '</a>' + |
431 | | - track.title + '</div>' |
432 | | - ); |
433 | | - // also render the clips in the trackset container: (thumb or text view) |
434 | | - $j( '#' + this.timeline_id + '_tracks' ).append( |
435 | | - '<div id="container_track_' + i + '" style="top:' + top_pos + 'px;height:' + ( track_height + 2 ) + 'px;left:0px;right:0px;" class="container_track" />' |
436 | | - ); |
437 | | - top_pos += track_height + 20; |
438 | | - } |
439 | | - } |
440 | | - if ( this.timeline_mode == 'storyboard' ) { |
441 | | - var top_pos = this.plObj.org_control_height; |
442 | | - // debugger; |
443 | | - for ( var i in this.plObj.tracks ) { |
444 | | - var track_height = this.track_clipThumb_height; |
445 | | - var timeline_id = this.timeline_id |
446 | | - // add in play box and container tracks |
447 | | - $j( '#' + timeline_id ).append( '' + |
448 | | - '<div id="interface_container_track_' + i + '" ' + |
449 | | - ' style="position:absolute;top:5px;height:' + ( track_height + 30 ) + 'px;left:10px;right:0px;"' + |
450 | | - '>' + |
451 | | - '<div id="container_track_' + i + '" style="position:relative;top:0px;' + |
452 | | - 'height:' + ( track_height + 30 ) + 'px;left:0px;right:0px;" class="container_track">' + |
453 | | - '</div>' + |
454 | | - '<div id="' + timeline_id + '_playline" class="mv_story_playline">' + |
455 | | - '<div class="mv_playline_top"/>' + |
456 | | - '</div>' + |
457 | | - '</div>' |
458 | | - ); |
459 | | - top_pos += track_height + 20; |
460 | | - } |
461 | | - } |
462 | | - }, |
463 | | - // Once playlist is ready continue |
464 | | - checkReadyPlObj: function() { |
465 | | - var _this = this; |
466 | | - // set up pointers from sequencer to pl obj |
467 | | - this.plObj = $j( '#' + this.smilPlayerId ).get( 0 ); |
468 | | - |
469 | | - // & from seq obj to sequencer |
470 | | - this.plObj.pSeq = this; |
471 | | - |
472 | | - if ( this.plObj ) { |
473 | | - if ( ! this.plObj.loading ) { |
474 | | - this.plReadyInit(); |
475 | | - return ; |
476 | | - } |
477 | | - } |
478 | | - |
479 | | - // else keep checking for the playlist to be ready |
480 | | - if ( this.plObj.loading ) { |
481 | | - if ( this.plReadyTimeout == 200 ) { |
482 | | - mw.log( 'error playlist never ready' ); |
483 | | - } else { |
484 | | - this.plReadyTimeout++; |
485 | | - setTimeout( function() { |
486 | | - _this.checkReadyPlObj(); |
487 | | - }, 25 ); |
488 | | - } |
489 | | - } |
490 | | - }, |
491 | | - getLocalApiUrl:function() { |
492 | | - return this.plObj.interface_url; |
493 | | - }, |
494 | | - plReadyInit:function() { |
495 | | - var _this = this; |
496 | | - mw.log( 'plReadyInit' ); |
497 | | - mw.log( this.plObj ); |
498 | | - |
499 | | - // Give the playlist a pointer to its parent seq: |
500 | | - this.plObj['seqObj'] = this; |
501 | | - |
502 | | - // Update playlist (if its empty right now) |
503 | | - if ( this.plObj.getClipCount() == 0 ) { |
504 | | - $j( '#' + this.smilPlayerId ).html( 'empty playlist' ); |
505 | | - } |
506 | | - |
507 | | - // propagate the edit tokens |
508 | | - // if on an edit page just grab from the form: |
509 | | - this.sequenceEditToken = $j( 'input[wpEditToken]' ).val(); |
510 | | - |
511 | | - // Update the buttons for no Api url (local editor) |
512 | | - if( !this.getLocalApiUrl() ) { |
513 | | - _this.updateSeqSaveButtons(); |
514 | | - } |
515 | | - |
516 | | - if ( typeof this.sequenceEditToken == 'undefined' && this.getLocalApiUrl() != null ) { |
517 | | - mw.getToken( _this.getLocalApiUrl(), _this.plObj.mTitle, function( token ) { |
518 | | - if ( token ) { |
519 | | - _this.sequenceEditToken = token; |
520 | | - _this.updateSeqSaveButtons(); |
521 | | - } |
522 | | - } ); |
523 | | - |
524 | | - // also grab permissions for sending clipboard commands to the server |
525 | | - |
526 | | - // (calling the sequencer inline) try and get edit token via api call: |
527 | | - // (somewhat fragile way to get at the api... should move to config |
528 | | - /*var token_url = this.plObj.interface_url.replace(/index\.php/, 'api.php'); |
529 | | - token_url += '?action=query&format=xml&prop=info&intoken=edit&titles='; |
530 | | - $j.ajax({ |
531 | | - type: "GET", |
532 | | - url: token_url + _this.plObj.mTitle, |
533 | | - success:function(data) { |
534 | | - var pageElm = data.getElementsByTagName('page')[0]; |
535 | | - if( $j(pageElm).attr('edittoken') ) { |
536 | | - _this.sequenceEditToken = $j(pageElm).attr('edittoken'); |
537 | | - } |
538 | | - |
539 | | - } |
540 | | - });*/ |
541 | | - // also grab permissions for sending clipboard commands to the server |
542 | | - /*$j.ajax({ |
543 | | - type:"GET", |
544 | | - url: token_url + _this.plObj.mTalk, |
545 | | - success:function(data) { |
546 | | - var pageElm = data.getElementsByTagName('page')[0]; |
547 | | - if( $j(pageElm).attr('edittoken') ) { |
548 | | - _this.clipboardEditToken = $j(pageElm).attr('edittoken'); |
549 | | - } |
550 | | - } |
551 | | - });*/ |
552 | | - } |
553 | | - |
554 | | - |
555 | | - // Render the menu tabs:: |
556 | | - var item_containers = ''; |
557 | | - var inx = 0; |
558 | | - var selected_tab = 0; |
559 | | - var tabc = ''; |
560 | | - var o = '<div id="seq_menu" style="width:100%;height:100%">'; |
561 | | - o += '<ul>'; |
562 | | - for ( var tab_id in this.menu_items ) { |
563 | | - menu_item = this.menu_items[tab_id]; |
564 | | - menu_item.inx = inx; |
565 | | - if ( menu_item['default'] ) { |
566 | | - selected_tab = inx; |
567 | | - _this.disp_menu_item = tab_id; |
568 | | - } |
569 | | - |
570 | | - o += '<li>' + |
571 | | - '<a id="mv_menu_item_' + tab_id + '" href="#' + tab_id + '_ic">' + gM( 'mwe-menu_' + tab_id ) + '</a>' + |
572 | | - '</li>'; |
573 | | - |
574 | | - tabc += '<div id="' + tab_id + '_ic" style="overflow:auto;height:268px;" >'; |
575 | | - tabc += ( menu_item.html ) ? menu_item.html : '<h3>' + gM( 'mwe-menu_' + tab_id ) + '</h3>'; |
576 | | - tabc += '</div>'; |
577 | | - inx++; |
578 | | - }; |
579 | | - o += '</ul>'; |
580 | | - o += tabc; |
581 | | - $j( '#' + this.sequence_tools_id ).html( o ); |
582 | | - |
583 | | - |
584 | | - $j( "#seq_menu" ).tabs( { |
585 | | - selected:selected_tab, |
586 | | - select: function( event, ui ) { |
587 | | - _this.disp( $j( ui.tab ).attr( 'id' ).replace( 'mv_menu_item_', '' ), true ); |
588 | | - } |
589 | | - // Add sorting |
590 | | - } ).find( ".ui-tabs-nav" ).sortable( { axis : 'x' } ); |
591 | | - |
592 | | - |
593 | | - // Render the timeline |
594 | | - this.renderTimeLine(); |
595 | | - this.do_refresh_timeline(); |
596 | | - |
597 | | - // Load initial content into containers |
598 | | - this.setupMenuItems(); |
599 | | - |
600 | | - this.doFocusBindings(); |
601 | | - |
602 | | - // Set up key bidnings |
603 | | - $j( window ).keydown( function( e ) { |
604 | | - mw.log( 'pushed down on:' + e.which ); |
605 | | - if ( e.which == 16 ) |
606 | | - _this.key_shift_down = true; |
607 | | - |
608 | | - if ( e.which == 17 ) |
609 | | - _this.key_ctrl_down = true; |
610 | | - |
611 | | - if ( ( e.which == 67 && _this.key_ctrl_down ) && !_this.inputFocus ) |
612 | | - _this.copySelectedClips(); |
613 | | - |
614 | | - if ( ( e.which == 88 && _this.key_ctrl_down ) && !_this.inputFocus ) |
615 | | - _this.cutSelectedClips(); |
616 | | - |
617 | | - // Paste cips on v + ctrl while not focused on a text area: |
618 | | - if ( ( e.which == 86 && _this.key_ctrl_down ) && !_this.inputFocus ) |
619 | | - _this.pasteClipBoardClips(); |
620 | | - |
621 | | - } ); |
622 | | - $j( window ).keyup( function( e ) { |
623 | | - mw.log( 'key up on ' + e.which ); |
624 | | - // User let go of "shift" turn off multi-select |
625 | | - if ( e.which == 16 ) |
626 | | - _this.key_shift_down = false; |
627 | | - |
628 | | - if ( e.which == 17 ) |
629 | | - _this.key_ctrl_down = false; |
630 | | - |
631 | | - // Escape key ( deselect ) |
632 | | - if ( e.which == 27 ) |
633 | | - _this.deselectClip(); |
634 | | - |
635 | | - |
636 | | - // Backspace or Delete key while not focused on a text area: |
637 | | - if ( ( e.which == 8 || e.which == 46 ) && !_this.inputFocus ) |
638 | | - _this.removeSelectedClips(); |
639 | | - } ); |
640 | | - }, |
641 | | - /** |
642 | | - * Check all text nodes for focus |
643 | | - */ |
644 | | - doFocusBindings:function() { |
645 | | - var _this = this; |
646 | | - // if an input or text area has focus disable delete key binding |
647 | | - $j( "input,textarea" ).focus( function () { |
648 | | - mw.log( "inputFocus:true" ); |
649 | | - _this.inputFocus = true; |
650 | | - } ); |
651 | | - $j( "input,textarea" ).blur( function () { |
652 | | - mw.log( "inputFocus:blur" ); |
653 | | - _this.inputFocus = false; |
654 | | - } ) |
655 | | - }, |
656 | | - /* |
657 | | - * Update the timeline hook |
658 | | - */ |
659 | | - update_tl_hook:function( jh_time_ms ) { |
660 | | - // Put into seconds scale: |
661 | | - var jh_time_sec_float = jh_time_ms / 1000; |
662 | | - // Render playline at given time |
663 | | - $j( '#' + this.timeline_id + '_playline' ) |
664 | | - .css( |
665 | | - 'left', |
666 | | - Math.round( jh_time_sec_float / this.timeline_scale ) + 'px' |
667 | | - ); |
668 | | - // mw.log('at time:'+ jh_time_sec + ' px:'+ Math.round(jh_time_sec_float/this.timeline_scale)); |
669 | | - }, |
670 | | - /* |
671 | | - * Returns a xml or json representation of the current sequence |
672 | | - */ |
673 | | - getSeqOutputJSON:function() { |
674 | | - mw.log( 'json output:' ); |
675 | | - }, |
676 | | - |
677 | | - /** |
678 | | - * Get the Sequence as a formated high level resource description xml string |
679 | | - * @returns {xml} |
680 | | - */ |
681 | | - getSeqOutputHLRDXML: function() { |
682 | | - var o = '<sequence_hlrd>' + "\n"; |
683 | | - o += "\t<head>\n"; |
684 | | - // Get transitions |
685 | | - for ( var i in this.plObj.transitions ) { |
686 | | - if ( this.plObj.transitions[i] ) { |
687 | | - var tObj = this.plObj.transitions[i].getAttributeObj(); |
688 | | - o += "\t\t<transition "; |
689 | | - for ( var j in tObj ) { |
690 | | - o += ' ' + j + '="' + tObj[j] + '"\n\t\t'; |
691 | | - } |
692 | | - o += '/>' + "\n"; // transitions don't have children |
693 | | - } |
694 | | - } |
695 | | - o += "\t</head>\n"; |
696 | | - |
697 | | - // Get clips |
698 | | - o += "\t<body>\n"; |
699 | | - // Output each track: |
700 | | - for ( var i in this.plObj.tracks ) { |
701 | | - var curTrack = this.plObj.tracks[i]; |
702 | | - o += "\t<seq"; |
703 | | - var tAttr = curTrack.getAttributeObj(); |
704 | | - for ( var j in tAttr ) { |
705 | | - o += ' ' + j + '="' + tAttr[j] + '"\n\t\t\t'; |
706 | | - } |
707 | | - o += ">\n"; |
708 | | - for ( var k in curTrack.clips ) { |
709 | | - var curClip = curTrack.clips[k]; |
710 | | - o += "\t\t<ref "; |
711 | | - var cAttr = curClip.getAttributeObj(); |
712 | | - var lt = ''; |
713 | | - for ( var j in cAttr ) { |
714 | | - var val = ( j == 'transIn' || j == 'transOut' ) ? cAttr[j].id : cAttr[j]; |
715 | | - o += lt + j + '="' + val + '"'; |
716 | | - lt = "\n\t\t"; |
717 | | - } |
718 | | - o += ">\n" // close the clip |
719 | | - for ( var pName in curClip.params ) { |
720 | | - var pVal = curClip.params[pName]; |
721 | | - o += "\t\t\t" + '<param name="' + pName + '">' + pVal + '</param>' + "\n"; |
722 | | - } |
723 | | - o += "\t\t</ref>\n\n"; |
724 | | - } |
725 | | - o += "\n</seq>\n"; |
726 | | - } |
727 | | - o += "\t</body>\n"; |
728 | | - // Close the tag |
729 | | - o += '</sequence_hlrd>'; |
730 | | - |
731 | | - return o; |
732 | | - }, |
733 | | - /** |
734 | | - * Takes a track index and a clip index, to get a clip Object. |
735 | | - * It then calls doEditClip with that clip Object. |
736 | | - */ |
737 | | - editClip:function( track_inx, clip_inx ) { |
738 | | - var cObj = this.plObj.tracks[ track_inx ].clips[ clip_inx ]; |
739 | | - this.doEditClip( cObj ); |
740 | | - }, |
741 | | - /** |
742 | | - * Calls the doEditClip interface on the selected clip |
743 | | - * Handles cases where no clips are selected or multiple clips are selected. |
744 | | - */ |
745 | | - doEditSelectedClip:function() { |
746 | | - mw.log( "f:doEditSelectedClip:" ); |
747 | | - // And only one clip selected |
748 | | - if ( $j( '.mv_selected_clip' ).length == 1 ) { |
749 | | - this.doEditClip( this.getClipFromSeqID( $j( '.mv_selected_clip' ).parent().attr( 'id' ) ) ); |
750 | | - } else if ( $j( '.mv_selected_clip' ).length === 0 ) { |
751 | | - // No clip selected warning: |
752 | | - $j( '#clipedit_ic' ).html( gM( 'mwe-no_selected_resource' ) ); |
753 | | - } else { |
754 | | - // Multiple clip selected warning: |
755 | | - $j( '#clipedit_ic' ).html( gM( 'mwe-error_edit_multiple' ) ); |
756 | | - } |
757 | | - }, |
758 | | - /** |
759 | | - * Pulls up the edit transition interface for the selected clip |
760 | | - */ |
761 | | - doEditTransitionSelectedClip:function() { |
762 | | - var _this = this; |
763 | | - mw.log( "f:doEditTransitionSelectedClip:" + $j( '.mv_selected_clip' ).length ); |
764 | | - if ( $j( '.mv_selected_clip' ).length == 1 ) { |
765 | | - _this.doEditTransition( _this.getClipFromSeqID( $j( '.mv_selected_clip' ).parent().attr( 'id' ) ) ); |
766 | | - } else if ( $j( '.mv_selected_clip' ).length === 0 ) { |
767 | | - // no clip selected warning: |
768 | | - $j( '#transition_ic' ).html( gM( 'mwe-no_selected_resource' ) ); |
769 | | - } else { |
770 | | - // multiple clip selected warning: |
771 | | - $j( '#transition_ic' ).html( gM( 'mwe-error_edit_multiple' ) ); |
772 | | - } |
773 | | - }, |
774 | | - /** |
775 | | - * Loads the transition edit javascript libs and |
776 | | - * displays the transition edit interface. |
777 | | - */ |
778 | | - doEditTransition:function( cObj ) { |
779 | | - mw.log( "sequence:doEditTransition" ); |
780 | | - var _this = this; |
781 | | - // Add a loading image |
782 | | - $j( '#transitions_ic' ).loadingSpinner(); |
783 | | - mw.load( [ |
784 | | - '$j.fn.ColorPicker', |
785 | | - 'mw.TimedEffectsEdit' |
786 | | - ], function() { |
787 | | - // For some reason we lose scope in the options passed to mvTimedEffectsEdit |
788 | | - // so we re refrence the sequence here: |
789 | | - var localSeqRef = _this; |
790 | | - _this.myEffectEdit = new mvTimedEffectsEdit( { |
791 | | - 'rObj' : cObj, |
792 | | - 'control_ct' : 'transition_ic', |
793 | | - 'pSeq' : localSeqRef |
794 | | - } ); |
795 | | - } ) |
796 | | - }, |
797 | | - /* |
798 | | - * Updates the clip details div if edit resource is set |
799 | | - */ |
800 | | - doEditClip:function( resource ) { |
801 | | - mw.log( 'seq:doEditClip' ); |
802 | | - var _this = this; |
803 | | - |
804 | | - $j( '#clipedit_ic' ).loadingSpinner(); |
805 | | - |
806 | | - // Load the clipEdit library if not already loaded: |
807 | | - mw.load( [ |
808 | | - 'ClipEdit' |
809 | | - ], function() { |
810 | | - // Zero out the current editor: |
811 | | - _this.myClipEditor = { }; |
812 | | - // Setup the cliploader options |
813 | | - _this.myClipEditor = new mw.ClipEdit( { |
814 | | - 'resource' : resource, |
815 | | - 'target_control_display' : 'clipedit_ic', |
816 | | - 'target_clip_display' : resource.id, |
817 | | - 'parentSequence' : _this, |
818 | | - 'profile' : 'sequence' |
819 | | - } ); |
820 | | - } ); |
821 | | - }, |
822 | | - |
823 | | - /* |
824 | | - * Save new clip segment |
825 | | - * FIXME this is just a stub |
826 | | - */ |
827 | | - saveClipEdit:function() { |
828 | | - // saves the clip updates |
829 | | - }, |
830 | | - |
831 | | - /** |
832 | | - * Closes the sequence and dereferences the global instance. |
833 | | - */ |
834 | | - closeModEditor:function() { |
835 | | - // unset the sequencer |
836 | | - mw['mySequence'] = null; |
837 | | - $j( this.target_sequence_container + ',.ui-widget-overlay' ).remove(); |
838 | | - }, |
839 | | - |
840 | | - /** |
841 | | - * Copies the selected clips to the server hosted "clipboard" |
842 | | - * |
843 | | - * FIXME need to support local clipboard for stand alone editing. |
844 | | - * FIXME this does not really work at all right now |
845 | | - */ |
846 | | - copySelectedClips:function() { |
847 | | - var _this = this; |
848 | | - // set all the selected clips |
849 | | - this.clipboard = new Array(); |
850 | | - $j( '.mv_selected_clip' ).each( function() { |
851 | | - |
852 | | - // Add each clip to the clip board: |
853 | | - var cur_clip = _this.getClipFromSeqID( $j( this ).parent().attr( 'id' ) ); |
854 | | - _this.clipboard.push( cur_clip.getAttributeObj() ); |
855 | | - |
856 | | - } ); |
857 | | - |
858 | | - // Upload clipboard to the server (if possible) |
859 | | - if ( ! mw.isLocalDomain( _this.plObj.interface_url )) { |
860 | | - mw.log( 'error: presently we can\'t copy clips across domains' ); |
861 | | - } else { |
862 | | - // FIXME we need to add an api entry point to store a "clipboard" |
863 | | - // right now this is dependent on a custom hook: |
864 | | - if ( _this.clipboardEditToken && _this.plObj.interface_url ) { |
865 | | - var req_url = _this.plObj.interface_url.replace( /api.php/, 'index.php' ) + '?action=ajax&rs=mv_seqtool_clipboard&rsargs[]=copy'; |
866 | | - $j.ajax( { |
867 | | - type: "POST", |
868 | | - url : req_url, |
869 | | - data: $j.param( { |
870 | | - "clipboard_data": $j.toJSON( _this.clipboard ), |
871 | | - "clipboardEditToken": _this.clipboardEditToken |
872 | | - } ), |
873 | | - success:function( data ) { |
874 | | - mw.log( 'did clipboard push ' + $j.toJSON( _this.clipboard ) ); |
875 | | - } |
876 | | - } ); |
877 | | - } else { |
878 | | - mw.log( 'error: no clipboardEditToken to uplaod clipboard to server' ); |
879 | | - } |
880 | | - } |
881 | | - }, |
882 | | - /* |
883 | | - * Paste the clipboard clips into the sequence |
884 | | - */ |
885 | | - pasteClipBoardClips:function() { |
886 | | - mw.log( 'f:pasteClipBoardClips' ); |
887 | | - // @@todo query the server for updated clipboard |
888 | | - // paste before the "current clip" |
889 | | - this.addClips( this.clipboard, this.plObj.cur_clip.order ); |
890 | | - }, |
891 | | - |
892 | | - /** |
893 | | - * Cut selected clips from the timeline |
894 | | - */ |
895 | | - cutSelectedClips:function() { |
896 | | - this.copySelectedClips(); |
897 | | - this.removeSelectedClips(); |
898 | | - }, |
899 | | - |
900 | | - /** |
901 | | - * Remove selected clips from the timeline |
902 | | - */ |
903 | | - removeSelectedClips:function() { |
904 | | - var remove_clip_ary = new Array(); |
905 | | - // Remove selected clips from display |
906 | | - $j( '.container_track .mv_selected_clip' ).each( function() { |
907 | | - // grab the track index from the id (assumes track_#_clip_# |
908 | | - remove_clip_ary.push ( $j( this ).parent().attr( 'id' ).replace( 'track_', '' ).replace( 'clip_', '' ).split( '_' ) ); |
909 | | - } ); |
910 | | - if ( remove_clip_ary.length != 0 ) |
911 | | - this.removeClips( remove_clip_ary ); |
912 | | - |
913 | | - // doEdit selected clips (updated selected resource) |
914 | | - // @@todo refresh menu of current |
915 | | - this.doEditSelectedClip(); |
916 | | - }, |
917 | | - /* |
918 | | - * Add a clip to the timeline |
919 | | - */ |
920 | | - addClip:function( clip, before_clip_pos, track_inx ) { |
921 | | - this.addClips( [clip], before_clip_pos, track_inx ) |
922 | | - }, |
923 | | - /** |
924 | | - * add a single or set of clips |
925 | | - * to a given position and track_inx |
926 | | - */ |
927 | | - addClips:function( clipSet, before_clip_pos, track_inx ) { |
928 | | - _this = this; |
929 | | - |
930 | | - if ( !track_inx ) |
931 | | - track_inx = this.plObj.default_track.inx; |
932 | | - |
933 | | - if ( !before_clip_pos ) |
934 | | - before_clip_pos = this.plObj.default_track.getClipCount(); |
935 | | - |
936 | | - mw.log( "seq: add clip: at: " + before_clip_pos + ' in track: ' + track_inx ); |
937 | | - var cur_pos = before_clip_pos; |
938 | | - |
939 | | - $j.each( clipSet, function( inx, clipInitDom ) { |
940 | | - var mediaElement = document.createElement( 'ref' ); |
941 | | - for ( var i in clipInitDom ) { |
942 | | - mw.log( "set: " + i + ' to ' + clipInitDom[i] ); |
943 | | - if ( i != 'id' ) |
944 | | - $j( mediaElement ).attr( i, clipInitDom[i] ); |
945 | | - } |
946 | | - if ( _this.plObj.tryAddMedia( mediaElement, cur_pos, track_inx ) ) |
947 | | - cur_pos++; |
948 | | - } ); |
949 | | - // debugger; |
950 | | - this.do_refresh_timeline(); |
951 | | - }, |
952 | | - |
953 | | - /** |
954 | | - * Removes Clips listed in the remove_clip_ary paramater |
955 | | - */ |
956 | | - removeClips:function( remove_clip_ary ) { |
957 | | - var _this = this; |
958 | | - var jselect = coma = ''; |
959 | | - mw.log( 'clip count before removal : ' + _this.plObj.default_track.clips.length + ' should remove ' + remove_clip_ary.length ); |
960 | | - var afected_tracks = new Array(); |
961 | | - // add order to track_clip before we start removing: |
962 | | - $j.each( remove_clip_ary, function( inx, track_clip ) { |
963 | | - remove_clip_ary[inx]['order'] = _this.plObj.tracks[ track_clip[0] ].clips[ track_clip[1] ].order; |
964 | | - } ); |
965 | | - $j.each( remove_clip_ary, function( inx, track_clip ) { |
966 | | - var track_inx = track_clip[0]; |
967 | | - var clip_inx = track_clip[1]; |
968 | | - var clip_rm_order = track_clip['order']; |
969 | | - mw.log( 'remove t:' + track_inx + ' c:' + clip_inx + ' id:' + ' #track_' + track_inx + '_clip_' + clip_inx + ' order:' + clip_rm_order ); |
970 | | - // remove the clips from the base tracks |
971 | | - for ( var i in _this.plObj.tracks[ track_inx ].clips ) { |
972 | | - cur_clip = _this.plObj.tracks[ track_inx ].clips[i] |
973 | | - if ( cur_clip.order == clip_rm_order ) { |
974 | | - _this.plObj.tracks[ track_clip[0] ].clips.splice( i, 1 ); |
975 | | - } |
976 | | - } |
977 | | - // add track to affected track list: |
978 | | - afected_tracks[ track_inx ] = true; |
979 | | - jselect += coma + '#track_' + track_inx + '_clip_' + clip_inx; |
980 | | - coma = ','; |
981 | | - } ); |
982 | | - // update/ reorder: |
983 | | - $j.each( afected_tracks, function( track_inx, affected ) { |
984 | | - _this.plObj.tracks[track_inx].reOrderClips(); |
985 | | - } ); |
986 | | - |
987 | | - mw.log( 'clip count after removal : ' + _this.plObj.default_track.clips.length ); |
988 | | - // animate the removal (@@todo should be able to call the resulting fadeOut only once without a flag) |
989 | | - var done_with_refresh = false; |
990 | | - $j( jselect ).fadeOut( "slow", function() { |
991 | | - if ( !done_with_refresh ) |
992 | | - _this.do_refresh_timeline(); |
993 | | - done_with_refresh = true; |
994 | | - } ).empty(); // empty to remove any persistent bindings |
995 | | - }, |
996 | | - doEdit:function( editObj ) { |
997 | | - // add the current editObj to the edit stack (should allow for "undo") |
998 | | - this.edit_stack.push( editObj ); |
999 | | - // make the adjustments |
1000 | | - this.makeAdjustment( editObj ); |
1001 | | - }, |
1002 | | - /* |
1003 | | - * takes adjust ment object with options: |
1004 | | - * track_inx, clip_inx, start, end delta |
1005 | | - */ |
1006 | | - makeAdjustment:function( e ) { |
1007 | | - switch( e.type ) { |
1008 | | - case 'resize_start': |
1009 | | - this.plObj.tracks[e.track_inx].clips[e.clip_inx].doAdjust( 'start', e.delta ); |
1010 | | - break; |
1011 | | - case 'resize_end': |
1012 | | - this.plObj.tracks[e.track_inx].clips[e.clip_inx].doAdjust( 'end', e.delta ); |
1013 | | - break; |
1014 | | - } |
1015 | | - mw.log( 're render: ' + e.track_inx ); |
1016 | | - // refresh the playlist after adjustment |
1017 | | - this.do_refresh_timeline(); |
1018 | | - }, |
1019 | | - // @@todo set up key bindings for undo |
1020 | | - undoEdit:function() { |
1021 | | - var editObj = this.edit_stack.pop(); |
1022 | | - // invert the delta |
1023 | | - |
1024 | | - }, |
1025 | | - exc_track:function( inx, req ) { |
1026 | | - _this = this; |
1027 | | - if ( req == 'close' ) { |
1028 | | - $j( '#mv_exc_' + inx ).attr( 'href', 'javascript:' + this.instance_name + '.exc_track(' + inx + ',\'open\')' ); |
1029 | | - $j( '#mv_exc_' + inx + ' > img' ).attr( 'src', mw.getMwEmbedPath() + 'images/closed.png' ); |
1030 | | - $j( '#track_cnt_' + inx + ',#container_track_' + inx ).animate( { height:this.track_text_height }, "slow", '', |
1031 | | - function() { |
1032 | | - _this.plObj.tracks[inx].disp_mode = 'text'; |
1033 | | - _this.render_tracks( inx ); |
1034 | | - } ); |
1035 | | - } else if ( req == 'open' ) { |
1036 | | - $j( '#mv_exc_' + inx ).attr( 'href', 'javascript:' + this.instance_name + '.exc_track(' + inx + ',\'close\')' ); |
1037 | | - $j( '#mv_exc_' + inx + ' > img' ).attr( 'src', mw.getMwEmbedPath() + 'images/opened.png' ); |
1038 | | - $j( '#track_cnt_' + inx + ',#container_track_' + inx ).animate( { height:this.track_thumb_height }, "slow", '', |
1039 | | - function() { |
1040 | | - _this.plObj.tracks[inx].disp_mode = 'timeline_thumb'; |
1041 | | - _this.render_tracks( inx ); |
1042 | | - } ); |
1043 | | - |
1044 | | - } |
1045 | | - }, |
1046 | | - // adds tracks |
1047 | | - add_track:function( inx, track ) { |
1048 | | - |
1049 | | - }, |
1050 | | - // toggle cut mode (change icon to cut) |
1051 | | - cut_mode:function() { |
1052 | | - mw.log( 'do cut mode' ); |
1053 | | - // add cut layer ontop of clips |
1054 | | - }, |
1055 | | - doAdvancedTl:function() { |
1056 | | - this.timeline_mode = 'time'; |
1057 | | - this.renderTimeLine(); |
1058 | | - this.do_refresh_timeline(); |
1059 | | - return false; |
1060 | | - }, |
1061 | | - doSimpleTl:function() { |
1062 | | - this.timeline_mode = 'storyboard'; |
1063 | | - this.renderTimeLine(); |
1064 | | - this.do_refresh_timeline(); |
1065 | | - return false; |
1066 | | - }, |
1067 | | - // renders updates the timeline based on the current scale |
1068 | | - render_tracks:function( track_inx ) { |
1069 | | - mw.log( "f::render track: " + track_inx ); |
1070 | | - var _this = this; |
1071 | | - // inject the tracks into the timeline (if not already there) |
1072 | | - for ( var track_id in this.plObj.tracks ) { |
1073 | | - if ( track_inx == track_id || typeof track_inx == 'undefined' ) { |
1074 | | - // empty out the track container: |
1075 | | - // $j('#container_track_'+track_id).empty(); |
1076 | | - var track_html = droppable_html = ''; |
1077 | | - // set up per track vars: |
1078 | | - var track = this.plObj.tracks[track_id]; |
1079 | | - var cur_clip_time = 0; |
1080 | | - |
1081 | | - // set up some constants for timeline_mode == storyboard: |
1082 | | - if ( this.timeline_mode == 'storyboard' ) { |
1083 | | - var frame_width = Math.round( this.track_clipThumb_height * 1.3333333 ); |
1084 | | - var container_width = frame_width + 60; |
1085 | | - } |
1086 | | - |
1087 | | - // for each clip: |
1088 | | - for ( var j in track.clips ) { |
1089 | | - clip = track.clips[j]; |
1090 | | - // var img = clip.getClipImg('icon'); |
1091 | | - if ( this.timeline_mode == 'storyboard' ) { |
1092 | | - clip.left_px = j * container_width; |
1093 | | - clip.width_px = container_width; |
1094 | | - var base_id = 'track_' + track_id + '_clip_' + j; |
1095 | | - track_html += '<span id="' + base_id + '" ' + |
1096 | | - 'class="mv_storyboard_container mv_clip_drag" ' + |
1097 | | - 'style="' + |
1098 | | - 'left:' + clip.left_px + 'px;' + |
1099 | | - 'height:' + ( this.track_clipThumb_height + 30 ) + 'px;' + |
1100 | | - 'width:' + ( container_width ) + 'px;" >'; |
1101 | | - track_html += clip.embed.renderTimelineThumbnail( { |
1102 | | - 'width' : frame_width, |
1103 | | - 'thumb_class' : 'mv_clip_thumb', |
1104 | | - 'height':this.track_clipThumb_height, |
1105 | | - 'time':0 |
1106 | | - } ); |
1107 | | - // render out edit button |
1108 | | - /*track_html+='<div class="clip_edit_button clip_edit_base clip_control"/>';*/ |
1109 | | - |
1110 | | - // check if the clip has transitions |
1111 | | - var imgHtml = ''; |
1112 | | - var imsrc = ''; |
1113 | | - var cat = clip; |
1114 | | - if ( clip.transIn || clip.transOut ) { |
1115 | | - if ( clip.transIn && clip.transIn.getIconSrc ) |
1116 | | - imsrc = clip.transIn.getIconSrc(); |
1117 | | - // @@todo put transOut somewhere else |
1118 | | - if ( clip.transOut && clip.transOut.getIconSrc ) |
1119 | | - imsrc = clip.transOut.getIconSrc(); |
1120 | | - if ( imsrc != '' ) |
1121 | | - imgHtml = '<img style="width:32px;height:32px" src="' + imsrc + '" />'; |
1122 | | - } |
1123 | | - // render out transition edit box |
1124 | | - track_html += '<div id="tb_' + base_id + '" class="clip_trans_box">' + |
1125 | | - imgHtml + |
1126 | | - '</div>' |
1127 | | - |
1128 | | - // render out adjustment text |
1129 | | - /*track_html+='<div id="' + base_id + '_adj' + '" class="mv_adj_text" style="top:'+ (this.track_clipThumb_height+10 )+'px;">'+ |
1130 | | - '<span class="mv_adjust_click" onClick="'+this.instance_name+'.adjClipDur(' + track_id + ',' + j + ',\'-\')" /> - </span>'+ |
1131 | | - ( (clip.getDuration() > 60 )? mw.seconds2npt(clip.getDuration()): clip.getDuration() ) + |
1132 | | - '<span class="mv_adjust_click" onClick="'+this.instance_name+'.adjClipDur(' + track_id + ',' + j + ',\'+\')" /> + </span>'+ |
1133 | | - '</div>'; |
1134 | | - */ |
1135 | | - track_html += '</span>'; |
1136 | | - |
1137 | | - } |
1138 | | - // do timeline_mode rendering: |
1139 | | - if ( this.timeline_mode == 'time' ) { |
1140 | | - clip.left_px = Math.round( cur_clip_time / this.timeline_scale ); |
1141 | | - clip.width_px = Math.round( Math.round( clip.getDuration() ) / this.timeline_scale ); |
1142 | | - clip.height_px = 60; |
1143 | | - mw.log( 'at time:' + cur_clip_time + ' left: ' + clip.left_px + ' clip dur: ' + Math.round( clip.getDuration() ) + ' clip width:' + clip.width_px ); |
1144 | | - |
1145 | | - // for every clip_width pixle output image |
1146 | | - if ( track.disp_mode == 'timeline_thumb' ) { |
1147 | | - track_html += '<span id="track_' + track_id + '_clip_' + j + '" ' + |
1148 | | - 'class="mv_tl_clip mv_clip_drag" ' + |
1149 | | - 'style="' + |
1150 | | - 'left:' + clip.left_px + 'px;' + |
1151 | | - 'width:' + clip.width_px + 'px;' + |
1152 | | - 'height:' + clip.height_px + 'px" >'; |
1153 | | - track_html += this.render_clip_frames( clip ); |
1154 | | - } else if ( track.disp_mode == 'text' ) { |
1155 | | - // '+left_px+ |
1156 | | - track_html += '<span id="track_' + track_id + '_clip_' + j + '" style="left:' + clip.left_px + 'px;' + |
1157 | | - 'width:' + clip.width_px + 'px;background:' + clip.getColor() + |
1158 | | - '" class="mv_time_clip_text mv_clip_drag">' + clip.title; |
1159 | | - } |
1160 | | - // add in per clip controls |
1161 | | - track_html += '<div title="' + gM( 'mwe-clip_in' ) + ' ' + clip.embed.start_ntp + '" class="ui-resizable-w ui-resizable-handle" style="width: 16px; height: 16px; left: 0px; top: 2px;background:url(\'' + mw.getMwEmbedPath() + 'images/application_side_contract.png\');" ></div>' + "\n"; |
1162 | | - track_html += '<div title="' + gM( 'mwe-clip_out' ) + ' ' + clip.embed.end_ntp + '" class="ui-resizable-e ui-resizable-handle" style="width: 16px; height: 16px; right: 0px; top: 2px;background:url(\'' + mw.getMwEmbedPath() + 'images/application_side_expand.png\');" ></div>' + "\n"; |
1163 | | - track_html += '<div title="' + gM( 'mwe-rmclip' ) + '" onClick="' + this.instance_name + '.removeClips(new Array([' + track_id + ',' + j + ']))" style="position:absolute;cursor:pointer;width: 16px; height: 16px; left: 0px; bottom:2px;background:url(\'' + mw.getMwEmbedPath() + 'images/delete.png\');"></div>' + "\n"; |
1164 | | - track_html += '<span style="display:none;" class="mv_clip_stats"></span>'; |
1165 | | - |
1166 | | - track_html += '</span>'; |
1167 | | - // droppable_html+='<div id="dropBefore_'+i+'_c_'+j+'" class="mv_droppable" style="height:'+this.track_thumb_height+'px;left:'+clip.left_px+'px;width:'+Math.round(clip.width_px/2)+'px"></div>'; |
1168 | | - // droppable_html+='<div id="dropAfter_'+i+'_c_'+j+'" class="mv_droppable" style="height:'+this.track_thumb_height+'px;left:'+(clip.left_px+Math.round(clip.width_px/2))+'px;width:'+(clip.width_px/2)+'px"></div>'; |
1169 | | - cur_clip_time += Math.round( clip.getDuration() ); // increment cur_clip_time |
1170 | | - } |
1171 | | - |
1172 | | - } |
1173 | | - |
1174 | | - // mw.log("new htmL for track i: "+track_id + ' html:'+track_html); |
1175 | | - $j( '#container_track_' + track_id ).html( track_html ); |
1176 | | - |
1177 | | - // apply transition click action |
1178 | | - $j( '.clip_trans_box' ).click( function() { |
1179 | | - if ( $j( this ).hasClass( 'mv_selected_transition' ) ) { |
1180 | | - $j( this ).removeClass( 'mv_selected_transition' ); |
1181 | | - _this.deselectClip( $j( this ).siblings( '.mv_clip_thumb' ).get( 0 ) ); |
1182 | | - } else { |
1183 | | - // deselect others |
1184 | | - _this.deselectClip(); |
1185 | | - $j( '.clip_trans_box' ).removeClass( 'mv_selected_transition' ); |
1186 | | - $j( this ).addClass( "mv_selected_transition" ); |
1187 | | - $j( this ).siblings( '.mv_clip_thumb' ).addClass( "mv_selected_clip" ); |
1188 | | - var sClipObj = _this.getClipFromSeqID( $j( this ).parent().attr( 'id' ) ); |
1189 | | - // jump to the current clip |
1190 | | - _this.plObj.updateCurrentClip( sClipObj ); |
1191 | | - // display the transition edit tab: |
1192 | | - _this.disp( 'transition' ); |
1193 | | - } |
1194 | | - } ); |
1195 | | - |
1196 | | - // apply edit button mouse over effect: |
1197 | | - $j( '.clip_edit_button' ).hover( function() { |
1198 | | - $j( this ).removeClass( "clip_edit_base" ).addClass( "clip_edit_over" ); |
1199 | | - }, function() { |
1200 | | - $j( this ).removeClass( "clip_edit_over" ).addClass( "clip_edit_base" ); |
1201 | | - } ).click( function() { |
1202 | | - // deselect everything else: |
1203 | | - $j( '.mv_selected_clip' ).each( function( inx, selected_clip ) { |
1204 | | - _this.deselectClip( this ); |
1205 | | - } ); |
1206 | | - |
1207 | | - var sClipObj = _this.getClipFromSeqID( $j( this ).parent().attr( 'id' ) ); |
1208 | | - _this.plObj.updateCurrentClip( sClipObj ); |
1209 | | - // get the clip (siblings with mv_clip_thumb class) |
1210 | | - var cur_clip_elm = $j( this ).siblings( '.mv_clip_thumb' ); |
1211 | | - // select the clip (add mv_selected_clip if not already selected) |
1212 | | - if ( ! $j( cur_clip_elm ).hasClass( "mv_selected_clip" ) ) { |
1213 | | - $j( cur_clip_elm ).addClass( 'mv_selected_clip' ); |
1214 | | - $j( '#' + $j( cur_clip_elm ).parent().attr( "id" ) + '_adj' ).fadeIn( "fast" ); |
1215 | | - } |
1216 | | - // display the edit tab: |
1217 | | - _this.disp( 'clipedit' ); |
1218 | | - // display edit dialog: |
1219 | | - _this.doEditClip( sClipObj ); |
1220 | | - } ); |
1221 | | - |
1222 | | - // apply onClick edit controls: |
1223 | | - $j( '.mv_clip_thumb' ).click( function() { |
1224 | | - var cur_clip_click = this; |
1225 | | - // if not in multi select mode remove all existing selections |
1226 | | - // (except for the current click which is handled down below) |
1227 | | - mw.log( ' ks: ' + _this.key_shift_down + ' ctrl_down:' + _this.key_ctrl_down ); |
1228 | | - if ( ! _this.key_shift_down && ! _this.key_ctrl_down ) { |
1229 | | - $j( '.mv_selected_clip' ).each( function( inx, selected_clip ) { |
1230 | | - if ( $j( this ).parent().attr( 'id' ) != $j( cur_clip_click ).parent().attr( 'id' ) |
1231 | | - || ( $j( '.mv_selected_clip' ).length > 1 ) ) { |
1232 | | - _this.deselectClip( this ); |
1233 | | - } |
1234 | | - } ); |
1235 | | - } |
1236 | | - |
1237 | | - // jump to clip time |
1238 | | - var sClipObj = _this.getClipFromSeqID( $j( this ).parent().attr( 'id' ) ); |
1239 | | - _this.plObj.updateCurrentClip( sClipObj ); |
1240 | | - if ( $j( this ).hasClass( "mv_selected_clip" ) ) { |
1241 | | - $j( this ).removeClass( "mv_selected_clip" ); |
1242 | | - $j( '#' + $j( this ).parent().attr( "id" ) + '_adj' ).fadeOut( "fast" ); |
1243 | | - } else { |
1244 | | - $j( this ).addClass( 'mv_selected_clip' ); |
1245 | | - $j( '#' + $j( this ).parent().attr( "id" ) + '_adj' ).fadeIn( "fast" ); |
1246 | | - } |
1247 | | - // if shift select is down select the in-between clips |
1248 | | - if ( _this.key_shift_down ) { |
1249 | | - // get the min max of current selection (within the current track) |
1250 | | - var max_order = 0; |
1251 | | - var min_order = 999999999; |
1252 | | - $j( '.mv_selected_clip' ).each( function() { |
1253 | | - var cur_clip = _this.getClipFromSeqID( $j( this ).parent().attr( 'id' ) ); |
1254 | | - // get min max |
1255 | | - if ( cur_clip.order < min_order ) |
1256 | | - min_order = cur_clip.order; |
1257 | | - if ( cur_clip.order > max_order ) |
1258 | | - max_order = cur_clip.order; |
1259 | | - } ); |
1260 | | - // select all non-selected between max or min |
1261 | | - mw.log( 'sOrder: ' + sClipObj.order + ' min:' + min_order + ' max:' + max_order ); |
1262 | | - if ( sClipObj.order <= min_order ) { |
1263 | | - for ( var i = sClipObj.order; i <= max_order; i++ ) { |
1264 | | - $j( '#track_' + track_id + '_clip_' + i + ' > .mv_clip_thumb' ).addClass( 'mv_selected_clip' ); |
1265 | | - } |
1266 | | - } |
1267 | | - if ( sClipObj.order >= max_order ) { |
1268 | | - for ( var i = min_order; i <= max_order; i++ ) { |
1269 | | - $j( '#track_' + track_id + '_clip_' + i + ' > .mv_clip_thumb' ).addClass( 'mv_selected_clip' ); |
1270 | | - } |
1271 | | - } |
1272 | | - } |
1273 | | - _this.doEditSelectedClip(); |
1274 | | - } ); |
1275 | | - // add in control for time based display |
1276 | | - // debugger; |
1277 | | - if ( this.timeline_mode == 'time' ) { |
1278 | | - $j( '.ui-resizable-handle' ).mousedown( function() { |
1279 | | - mw.log( 'hid: ' + $j( this ).attr( 'class' ) ); |
1280 | | - _this.resize_mode = ( $j( this ).attr( 'class' ).indexOf( 'ui-resizable-e' ) != -1 ) ? |
1281 | | - 'resize_end':'resize_start'; |
1282 | | - } ); |
1283 | | - } |
1284 | | - var insert_key = 'na'; |
1285 | | - // drag hooks: |
1286 | | - // @@todo support multiple clips |
1287 | | - for ( var j in track.clips ) { |
1288 | | - $j( '#track_' + track_id + '_clip_' + j ).draggable( { |
1289 | | - axis:'x', |
1290 | | - containment:'#container_track_' + track_id, |
1291 | | - opacity:50, |
1292 | | - handle: ":not(.clip_control)", |
1293 | | - scroll:true, |
1294 | | - drag:function( e, ui ) { |
1295 | | - // debugger; |
1296 | | - insert_key = _this.clipDragUpdate( ui, this ); |
1297 | | - }, |
1298 | | - start:function( e, ui ) { |
1299 | | - mw.log( 'start drag:' + this.id ); |
1300 | | - // make sure we are ontop |
1301 | | - $j( this ).css( { top:'0px', zindex:10 } ); |
1302 | | - }, |
1303 | | - stop:function( e, ui ) { |
1304 | | - $j( this ).css( { top:'0px', zindex:0 } ); |
1305 | | - |
1306 | | - var id_parts = this.id.split( '_' ); |
1307 | | - var track_inx = id_parts[1]; |
1308 | | - var clip_inx = id_parts[3]; |
1309 | | - var clips = _this.plObj.tracks[track_inx].clips; |
1310 | | - var cur_drag_clip = clips[clip_inx]; |
1311 | | - |
1312 | | - if ( insert_key != 'na' && insert_key != 'end' ) { |
1313 | | - cur_drag_clip.order = insert_key - .5; |
1314 | | - } else if ( insert_key == 'end' ) { |
1315 | | - cur_drag_clip.order = clips.length; |
1316 | | - } |
1317 | | - // reorder array based on new order |
1318 | | - clips.sort( sort_func ); |
1319 | | - function sort_func( a, b ) { |
1320 | | - return a.order - b.order; |
1321 | | - } |
1322 | | - // assign keys back to order: |
1323 | | - _this.plObj.tracks[track_inx].reOrderClips(); |
1324 | | - // redraw: |
1325 | | - _this.do_refresh_timeline(); |
1326 | | - } |
1327 | | - } ); |
1328 | | - // add in resize hook if in time mode: |
1329 | | - if ( this.timeline_mode == 'time' ) { |
1330 | | - $j( '#track_' + track_id + '_clip_' + j ).resizable( { |
1331 | | - minWidth:10, |
1332 | | - maxWidth:6000, |
1333 | | - start: function( e, ui ) { |
1334 | | - // set border to red |
1335 | | - $j( this ).css( { 'border':'solid thin red' } ); |
1336 | | - // fade In Time stats (end or start based on handle) |
1337 | | - // dragging east (adjusting end time) |
1338 | | - mw.log( 'append to: ' + this.id ); |
1339 | | - $j( '#' + this.id + ' > .mv_clip_stats' ).fadeIn( "fast" ); |
1340 | | - }, |
1341 | | - stop: function( e, ui ) { |
1342 | | - mw.log( 'stop resize' ); |
1343 | | - // restore border |
1344 | | - $j( this ).css( 'border', 'solid thin white' ); |
1345 | | - // remove stats |
1346 | | - var clip_drag = this; |
1347 | | - $j( '#' + this.id + ' > .mv_clip_stats' ).fadeOut( "fast", function() { |
1348 | | - var id_parts = clip_drag.id.split( '_' ); |
1349 | | - var track_inx = id_parts[1]; |
1350 | | - var clip_inx = id_parts[3]; |
1351 | | - // update clip |
1352 | | - _this.doEdit( { |
1353 | | - type:_this.resize_mode, |
1354 | | - delta:_this.edit_delta, |
1355 | | - track_inx:track_inx, |
1356 | | - clip_inx:clip_inx } ) |
1357 | | - } ); |
1358 | | - }, |
1359 | | - resize: function( e, ui ) { |
1360 | | - // update time stats & render images: |
1361 | | - _this.update_clip_resize( this ); |
1362 | | - } |
1363 | | - } ); |
1364 | | - } |
1365 | | - } |
1366 | | - $j( '#container_track_' + track_id ).width( Math.round( this.timeline_duration / this.timeline_scale ) ); |
1367 | | - } |
1368 | | - // debugger; |
1369 | | - } |
1370 | | - }, |
1371 | | - clipDragUpdate:function( ui, clipElm ) { |
1372 | | - var _this = this; |
1373 | | - |
1374 | | - var insert_key = 'na'; |
1375 | | - // animate re-arrange by left position: |
1376 | | - // mw.log('left: '+ui.position.left); |
1377 | | - // locate clip (based on clip duration not animate) |
1378 | | - var id_parts = clipElm.id.split( '_' ); |
1379 | | - var track_inx = id_parts[1]; |
1380 | | - var clip_inx = id_parts[3]; |
1381 | | - var clips = _this.plObj.tracks[track_inx].clips; |
1382 | | - var cur_drag_clip = clips[clip_inx]; |
1383 | | - var return_org = true; |
1384 | | - $j( clipElm ).css( 'zindex', 10 ); |
1385 | | - // find out where we are inserting and set left border to solid red thick |
1386 | | - for ( var k in clips ) { |
1387 | | - if ( ui.position.left > clips[k].left_px && |
1388 | | - ui.position.left < ( clips[k].left_px + clips[k].width_px ) ) { |
1389 | | - if ( clip_inx != k ) { |
1390 | | - // also make sure we are not where we started |
1391 | | - if ( k - 1 != clip_inx ) { |
1392 | | - $j( '#track_' + track_inx + '_clip_' + k ).css( 'border-left', 'solid thick red' ); |
1393 | | - insert_key = k; |
1394 | | - } else { |
1395 | | - insert_key = 'na'; |
1396 | | - } |
1397 | | - } else { |
1398 | | - insert_key = 'na'; |
1399 | | - } |
1400 | | - } else { |
1401 | | - $j( '#track_' + track_inx + '_clip_' + k ).css( 'border-left', 'solid thin white' ); |
1402 | | - } |
1403 | | - } |
1404 | | - // if greater than the last k insert after |
1405 | | - if ( ui.position.left > ( clips[k].left_px + clips[k].width_px ) && |
1406 | | - k != clip_inx ) { |
1407 | | - $j( '#track_' + track_inx + '_clip_' + k ).css( 'border-right', 'solid thick red' ); |
1408 | | - insert_key = 'end'; |
1409 | | - } else { |
1410 | | - $j( '#track_' + track_inx + '_clip_' + k ).css( 'border-right', 'solid thin white' ); |
1411 | | - } |
1412 | | - return insert_key; |
1413 | | - }, |
1414 | | - deselectClip:function( clipElm ) { |
1415 | | - if ( !clipElm ) { |
1416 | | - $j( '.mv_selected_clip' ).removeClass( "mv_selected_clip" ); |
1417 | | - } else { |
1418 | | - $j( clipElm ).removeClass( "mv_selected_clip" ); |
1419 | | - // make sure the transition sibling is removed: |
1420 | | - $j( clipElm ).siblings( '.clip_trans_box' ).removeClass( 'mv_selected_transition' ); |
1421 | | - $j( '#' + $j( clipElm ).parent().attr( "id" ) + '_adj' ).fadeOut( "fast" ); |
1422 | | - } |
1423 | | - }, |
1424 | | - getClipFromSeqID:function( clip_seq_id ) { |
1425 | | - mw.log( 'get id from: ' + clip_seq_id ); |
1426 | | - var ct = clip_seq_id.replace( 'track_', '' ).replace( 'clip_', '' ).split( '_' ); |
1427 | | - return this.plObj.tracks[ ct[0] ].clips[ ct[1] ]; |
1428 | | - }, |
1429 | | - // renders clip frames |
1430 | | - render_clip_frames:function( clip, frame_offset_count ) { |
1431 | | - mw.log( 'f:render_clip_frames: ' + clip.id + ' foc:' + frame_offset_count ); |
1432 | | - var clip_frames_html = ''; |
1433 | | - var frame_width = Math.round( this.track_thumb_height * 1.3333333 ); |
1434 | | - |
1435 | | - var pint = ( frame_offset_count == null ) ? 0:frame_offset_count * frame_width; |
1436 | | - |
1437 | | - // mw.log("pinit: "+ pint+ ' < '+clip.width_px+' ++'+frame_width); |
1438 | | - for ( var p = pint; p < clip.width_px; p += frame_width ) { |
1439 | | - var clip_time = ( p == 0 ) ? 0:Math.round( p * this.timeline_scale ); |
1440 | | - mw.log( 'rendering clip frames: p:' + p + ' pts:' + ( p * this.timeline_scale ) + ' time:' + clip_time + ' height:' + this.track_thumb_height ); |
1441 | | - clip_frames_html += clip.embed.renderTimelineThumbnail( { |
1442 | | - 'width': frame_width, |
1443 | | - 'thumb_class':'mv_tl_thumb', |
1444 | | - 'height': this.track_thumb_height, |
1445 | | - 'size' : "icon", // set size to "icon" preset |
1446 | | - 'time': clip_time |
1447 | | - } ); |
1448 | | - } |
1449 | | - mw.log( 'render_clip_frames:' + clip_frames_html ); |
1450 | | - return clip_frames_html; |
1451 | | - }, |
1452 | | - update_clip_resize:function( clip_element ) { |
1453 | | - // mw.log('update_clip_resize'); |
1454 | | - var _this = this; |
1455 | | - var id_parts = clip_element.id.split( '_' ); |
1456 | | - track_inx = id_parts[1]; |
1457 | | - clip_inx = id_parts[3]; |
1458 | | - // set clip: |
1459 | | - var clip = this.plObj.tracks[ track_inx ].clips[ clip_inx ]; |
1460 | | - var clip_desc = ''; |
1461 | | - // would be nice if getting the width did not flicker the border |
1462 | | - // @@todo do a work around e in resize function has some screen based offset values |
1463 | | - clip.width_px = $j( clip_element ).width(); |
1464 | | - var width_dif = clip.width_px - Math.round( Math.round( clip.getDuration() ) / this.timeline_scale ); |
1465 | | - // var left_px = $j(clip_element).css('left'); |
1466 | | - |
1467 | | - var new_clip_dur = Math.round( clip.width_px * this.timeline_scale ); |
1468 | | - var clip_dif = ( new_clip_dur - clip.getDuration() ); |
1469 | | - var clip_dif_str = ( clip_dif > 0 ) ? '+' + clip_dif:clip_dif; |
1470 | | - // set the edit global delta |
1471 | | - this.edit_delta = clip_dif; |
1472 | | - |
1473 | | - // get new length: |
1474 | | - clip_desc += 'length: ' + mw.seconds2npt( new_clip_dur ) + '(' + clip_dif_str + ')'; |
1475 | | - if ( _this.resize_mode == 'resize_end' ) { |
1476 | | - // expanding right |
1477 | | - var new_end = mw.seconds2npt( mw.npt2seconds( clip.embed.end_ntp ) + clip_dif ); |
1478 | | - clip_desc += '<br>end time: ' + new_end; |
1479 | | - // also shift all the other clips (after the current) |
1480 | | - // mw.log("track_inx: " + track_inx + ' clip inx:'+clip_inx); |
1481 | | - // $j('#container_track_'+track_inx+' > .mv_clip_drag :gt('+clip_inx+')').each(function() { |
1482 | | - $j( '#container_track_' + track_inx + ' > :gt(' + clip_inx + ')' ).each( function() { |
1483 | | - var move_id_parts = this.id.split( '_' ); |
1484 | | - var move_clip = _this.plObj.tracks[move_id_parts[1]].clips[move_id_parts[3]]; |
1485 | | - // mw.log('should move:'+ this.id); |
1486 | | - $j( this ).css( 'left', move_clip.left_px + width_dif ); |
1487 | | - } ); |
1488 | | - } else { |
1489 | | - // expanding left (resize_start) |
1490 | | - var new_start = mw.seconds2npt( mw.npt2seconds( clip.embed.start_ntp ) + clip_dif ); |
1491 | | - clip_desc += '<br>start time: ' + new_start; |
1492 | | - } |
1493 | | - |
1494 | | - // update clip stats: |
1495 | | - $j( '#' + clip_element.id + ' > .mv_clip_stats' ).html( clip_desc ); |
1496 | | - var frame_width = Math.round( this.track_thumb_height * 1.3333333 ); |
1497 | | - // check if we need to append some images: |
1498 | | - var frame_count = $j( '#' + clip_element.id + ' > img' ).length; |
1499 | | - if ( clip.width_px > ( frame_count * frame_width ) ) { |
1500 | | - // if dragging left append |
1501 | | - mw.log( 'width_px:' + clip.width_px + ' framecount:' + frame_count + ' Xcw=' + ( frame_count * frame_width ) ); |
1502 | | - $j( '#' + clip_element.id ).append( this.render_clip_frames( clip, frame_count ) ); |
1503 | | - } |
1504 | | - }, |
1505 | | - // renders cnt_time |
1506 | | - render_playheadhead_seeker:function() { |
1507 | | - mw.log( 'render_playheadhead_seeker' ); |
1508 | | - // render out time stamps and time "jump" links |
1509 | | - // first get total width |
1510 | | - |
1511 | | - // remove the old one if its still there |
1512 | | - $j( '#' + this.timeline_id + '_pl_control' ).remove(); |
1513 | | - // render out a playlist clip wide and all the way to the right (only playhead and play button) (outside of timeline) |
1514 | | - $j( this.target_sequence_container ).append( '<div id="' + this.timeline_id + '_pl_control"' + |
1515 | | - ' style="position:absolute;top:' + ( this.plObj.height ) + 'px;' + |
1516 | | - 'right:1px;width:' + this.plObj.width + 'px;height:' + this.plObj.org_control_height + '" ' + |
1517 | | - 'class="' + this.plObj.controlBuilder.playerClass + '"><div class="ui-widget ui-corner-bottom ui-state-default control-bar">' + |
1518 | | - this.plObj.getControlsHTML() + |
1519 | | - '</div>' + |
1520 | | - '</div>' ); |
1521 | | - // update time and render out clip dividers .. should be used to show load progress |
1522 | | - this.plObj.updateBaseStatus(); |
1523 | | - |
1524 | | - // once the controls are in the DOM add hooks: |
1525 | | - this.plObj.controlBuilder.addControlBindings( $j( '#' + this.timeline_id + '_pl_control' ) ); |
1526 | | - |
1527 | | - // render out the "jump" div |
1528 | | - if ( this.timeline_mode == 'time' ) { // Closure reports this line as inactive -papy |
1529 | | - /*$j('#'+this.timeline_id+'_head_jump').width(pixle_length); |
1530 | | - //output times every 50pixles |
1531 | | - var out=''; |
1532 | | - //output time-desc every 50pixles and jump links every 10 pixles |
1533 | | - var n=0; |
1534 | | - for(i=0;i<pixle_length;i+=10) { |
1535 | | - out+='<div onclick="'+this.instance_name+'.jt('+i*this.timeline_scale+');"' + |
1536 | | - ' style="z-index:2;position:absolute;left:'+i+'px;width:10px;height:20px;top:0px;"></div>'; |
1537 | | - if(n==0) |
1538 | | - out+='<span style="position:absolute;left:'+i+'px;">|'+mw.seconds2npt(Math.round(i*this.timeline_scale))+'</span>'; |
1539 | | - n++; |
1540 | | - if(n==10)n=0; |
1541 | | - }*/ |
1542 | | - |
1543 | | - } |
1544 | | - }, |
1545 | | - jt:function( jh_time ) { |
1546 | | - mw.log( 'jt:' + jh_time ); |
1547 | | - var _this = this; |
1548 | | - this.playline_time = jh_time; |
1549 | | - mw.log( 'time: ' + mw.seconds2npt( jh_time ) + ' ' + Math.round( jh_time / this.timeline_scale ) ); |
1550 | | - // render playline at given time |
1551 | | - $j( '#' + this.timeline_id + '_playline' ).css( 'left', Math.round( jh_time / this.timeline_scale ) + 'px' ); |
1552 | | - cur_pl_time = 0; |
1553 | | - // update the thumb with the requested time: |
1554 | | - this.plObj.updateThumbTime( jh_time ); |
1555 | | - }, |
1556 | | - // adjusts the current scale |
1557 | | - zoom_in:function() { |
1558 | | - this.timeline_scale = this.timeline_scale * .75; |
1559 | | - this.do_refresh_timeline(); |
1560 | | - mw.log( 'zoomed in:' + this.timeline_scale ); |
1561 | | - }, |
1562 | | - zoom_out:function() { |
1563 | | - this.timeline_scale = this.timeline_scale * ( 1 + ( 1 / 3 ) ); |
1564 | | - this.do_refresh_timeline(); |
1565 | | - mw.log( 'zoom out: ' + this.timeline_scale ); |
1566 | | - }, |
1567 | | - do_refresh_timeline:function( preserve_selection ) { |
1568 | | - mw.log( 'Sequencer:do_refresh_timeline()' ); |
1569 | | - // @@todo should "lock" interface while refreshing timeline |
1570 | | - var pSelClips = []; |
1571 | | - if ( preserve_selection ) { |
1572 | | - $j( '.mv_selected_clip' ).each( function() { |
1573 | | - pSelClips.push( $j( this ).parent().attr( 'id' ) ); |
1574 | | - } ); |
1575 | | - } |
1576 | | - // regen duration |
1577 | | - this.plObj.getDuration( true ); |
1578 | | - // refresh player: |
1579 | | - this.plObj.showPlayer(); |
1580 | | - |
1581 | | - // this.render_playheadhead_seeker(); |
1582 | | - this.render_tracks(); |
1583 | | - this.jt( this.playline_time ); |
1584 | | - |
1585 | | - if ( preserve_selection ) { |
1586 | | - for ( var i = 0; i < pSelClips.length; i++ ) { |
1587 | | - $j( '#' + pSelClips[i] + ' .mv_clip_thumb' ).addClass( 'mv_selected_clip' ); |
1588 | | - } |
1589 | | - } |
1590 | | - } |
1591 | | - |
1592 | | -} |
1593 | | -/* extension to mw.PlayList to support sequencer features properties */ |
1594 | | -mw.SeqPlayList = function( element ) { |
1595 | | - return this.init( element ); |
1596 | | -} |
1597 | | -mw.SeqPlayList.prototype = { |
1598 | | - init:function( element ) { |
1599 | | - var myPlObj = new mw.PlayList( element ); |
1600 | | - |
1601 | | - // inherit mvClip |
1602 | | - for ( var method in myPlObj ) { |
1603 | | - if ( typeof this[method] != 'undefined' ) { |
1604 | | - this[ 'parent_' + method ] = myPlObj[method]; |
1605 | | - } else { |
1606 | | - this[method] = myPlObj[method]; |
1607 | | - } |
1608 | | - } |
1609 | | - |
1610 | | - this.org_control_height = this.pl_layout.control_height; |
1611 | | - // do specific mods:(controls and title are managed by the sequencer) |
1612 | | - this.pl_layout.title_bar_height = 0; |
1613 | | - this.pl_layout.control_height = 0; |
1614 | | - }, |
1615 | | - setSliderValue:function( perc ) { |
1616 | | - mw.log( 'setSliderValue::' + perc ); |
1617 | | - // get the track_clipThumb_height from parent mvSequencer |
1618 | | - var frame_width = Math.round( this.pSeq.track_clipThumb_height * 1.3333333 ); |
1619 | | - var container_width = frame_width + 60; |
1620 | | - |
1621 | | - var perc_clip = this.cur_clip.embed.currentTime / this.cur_clip.getDuration(); |
1622 | | - |
1623 | | - var left_px = parseInt( ( this.cur_clip.order * container_width ) + ( frame_width * perc_clip ) ) + 'px'; |
1624 | | - mw.log( "set " + perc + ' of cur_clip: ' + this.cur_clip.order + ' lp:' + left_px ); |
1625 | | - |
1626 | | - |
1627 | | - // update the timeline playhead and |
1628 | | - $j( '#' + this.seqObj.timeline_id + '_playline' ).css( 'left', left_px ); |
1629 | | - |
1630 | | - // pass update request to parent: |
1631 | | - this.parent_setSliderValue( perc ); |
1632 | | - }, |
1633 | | - getControlsHTML:function() { |
1634 | | - // get controls from current clip add some playlist specific controls: |
1635 | | - this.cur_clip.embed.supports['prev_next'] = true; |
1636 | | - this.cur_clip.embed.supports['options'] = false; |
1637 | | - return controlBuilder.getControls( this.cur_clip.embed ); |
1638 | | - }, |
1639 | | - // override renderDisplay |
1640 | | - renderDisplay:function() { |
1641 | | - mw.log( 'mvSequence:renderDisplay' ); |
1642 | | - // Clear out the render: |
1643 | | - $j( this ).html( '' ); |
1644 | | - |
1645 | | - this.setupClipDisplay(); |
1646 | | - } |
1647 | | -}; |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/mw.PlayList.js |
— | — | @@ -1,2267 +0,0 @@ |
2 | | -/* |
3 | | - * the mvPlayList object code |
4 | | - * only included if playlist object found |
5 | | - * |
6 | | - * part of mwEmbed media projects see: |
7 | | - * http://www.mediawiki.org/wiki/Media_Projects_Overview |
8 | | - * |
9 | | - * @author: Michael Dale mdale@wikimedia.org |
10 | | - * @license GPL2 |
11 | | - |
12 | | - ( deprecated in favor of mw.SequencePlayer.js ) |
13 | | - */ |
14 | | -var mw_default_playlist_attributes = { |
15 | | - // playlist attributes : |
16 | | - "id":null, |
17 | | - "title":null, |
18 | | - "width":400, |
19 | | - "height":300, |
20 | | - "desc":'', |
21 | | - "controls":true, |
22 | | - // playlist user controlled features |
23 | | - "linkback":null, |
24 | | - "src":null, |
25 | | - |
26 | | - // enable sequencer? (only display top frame no navigation or accompanying text |
27 | | - "sequencer":false |
28 | | -} |
29 | | -// The call back rate for animations and internal timers in ms: 33 is about 30 frames a second: |
30 | | -var MV_ANIMATION_CB_RATE = 33; |
31 | | - |
32 | | -// globals: |
33 | | -// 10 possible colors for clips: (can be in hexadecimal) |
34 | | -var mv_clip_colors = new Array( 'aqua', 'blue', 'fuchsia', 'green', 'lime', 'maroon', 'navy', 'olive', 'purple', 'red' ); |
35 | | - |
36 | | -// The base url for requesting stream metadata |
37 | | -if ( typeof wgServer == 'undefined' ) { |
38 | | - var defaultMetaDataProvider = 'http://metavid.org/overlay/archive_browser/export_cmml?stream_name='; |
39 | | -} else { |
40 | | - var defaultMetaDataProvider = wgServer + wgScript + '?title=Special:MvExportStream&feed_format=roe&stream_name='; |
41 | | -} |
42 | | - |
43 | | -mw.PlayList = function( element ) { |
44 | | - return this.init( element ); |
45 | | -}; |
46 | | -// set up the mvPlaylist object |
47 | | -mw.PlayList.prototype = { |
48 | | - // Instance Name |
49 | | - instanceOf:'mvPlayList', |
50 | | - |
51 | | - pl_duration: null, |
52 | | - update_tl_hook:null, |
53 | | - clip_ready_count:0, |
54 | | - cur_clip:null, |
55 | | - start_clip:null, |
56 | | - start_clip_src:null, |
57 | | - disp_play_head:null, |
58 | | - userSlide:false, |
59 | | - loading:true, |
60 | | - loading_external_data:true, // if we are loading external data (set to loading by default) |
61 | | - //set initial state to "paused" |
62 | | - paused:true, |
63 | | - |
64 | | - activeClipList:null, |
65 | | - playlist_buffer_time: 20, // how many seconds of future clips we should buffer |
66 | | - |
67 | | - interface_url:null, // the interface url |
68 | | - tracks: { }, |
69 | | - default_track:null, // the default track to add clips to. |
70 | | - // the layout for the playlist object |
71 | | - layout : { |
72 | | - seq_title:.1, |
73 | | - clip_desc:.63, // displays the clip description |
74 | | - clip_aspect:1.33, // 4/3 video aspect ratio |
75 | | - seq:.25, // display clip thumbnails |
76 | | - seq_thumb:.25, // size for thumbnails (same as seq by default) |
77 | | - seq_nav:0, // for a nav bar at the base (currently disabled) |
78 | | - // some layout info: |
79 | | - title_bar_height:17, |
80 | | - control_height:29 |
81 | | - }, |
82 | | - // embed object type support system; |
83 | | - supports: { |
84 | | - 'playHead':true, |
85 | | - 'pause':true, |
86 | | - 'fullscreen':false, |
87 | | - 'timeDisplay':true, |
88 | | - 'volumeControl':true, |
89 | | - |
90 | | - 'overlays':true, |
91 | | - 'playlist_swap_loader':true // if the object supports playlist functions |
92 | | - }, |
93 | | - init: function( element ) { |
94 | | - mw.log( 'mvPlayList:init:' ); |
95 | | - this.tracks = { }; |
96 | | - this.default_track = null; |
97 | | - |
98 | | - this.activeClipList = new activeClipList(); |
99 | | - // add default track & default track pointer: |
100 | | - this.tracks[0] = new trackObj( { 'inx':0 } ); |
101 | | - this.default_track = this.tracks[0]; |
102 | | - |
103 | | - // get all the attributes: |
104 | | - for ( var attr in mw_default_playlist_attributes ) { |
105 | | - if ( element.getAttribute( attr ) ) { |
106 | | - this[attr] = element.getAttribute( attr ); |
107 | | - // mw.log('attr:' + attr + ' val: ' + video_attributes[attr] +" "+'elm_val:' + element.getAttribute(attr) + "\n (set by elm)"); |
108 | | - } else { |
109 | | - this[attr] = mw_default_playlist_attributes[attr]; |
110 | | - // mw.log('attr:' + attr + ' val: ' + video_attributes[attr] +" "+ 'elm_val:' + element.getAttribute(attr) + "\n (set by attr)"); |
111 | | - } |
112 | | - // Boolean -> string |
113 | | - if( this[attr] == 'false' ) this[attr] = false; |
114 | | - if( this[attr] == 'true' ) this[attr] = true; |
115 | | - } |
116 | | - // make sure height and width are int: |
117 | | - this.width = parseInt( this.width ); |
118 | | - this.height = parseInt( this.height ); |
119 | | - |
120 | | - // if style is set override width and height |
121 | | - if ( element.style.width )this.width = parseInt( element.style.width.replace( 'px', '' ) ); |
122 | | - if ( element.style.height )this.height = parseInt( element.style.height.replace( 'px', '' ) ); |
123 | | - |
124 | | - |
125 | | - // if controls=false hide the title and the controls: |
126 | | - if ( this.controls === false ) { |
127 | | - this.layout.control_height = 0; |
128 | | - this.layout.title_bar_height = 0; |
129 | | - } |
130 | | - // setup the controlBuilder object: |
131 | | - this.controlBuilder = new mw.PlayerControlBuilder( this ); |
132 | | - }, |
133 | | - // run inheritEmbedPlayer on every clip (we have changed the playback method) |
134 | | - inheritEmbedPlayer:function() { |
135 | | - $j.each( this.tracks, function( i, track ) { |
136 | | - track.inheritEmbedPlayer(); |
137 | | - } ); |
138 | | - }, |
139 | | - doOptionsHTML:function() { |
140 | | - // grab "options" use current clip: |
141 | | - this.cur_clip.embed.doOptionsHTML(); |
142 | | - }, |
143 | | - // pulls up the video editor inline |
144 | | - doEditor:function() { |
145 | | - // black out the page: |
146 | | - // $j('body').append('<div id="ui-widget-overlay"/> <div id="modalbox" class="ui-widget ui-widget-content ui-corner-all modal_editor">' ); |
147 | | - $j( 'body' ).append( '<div class="ui-widget-overlay" style="width: 100%; height: 100%px; z-index: 10;"></div>' ); |
148 | | - $j( 'body' ).append( '<div id="sequencer_target" style="z-index:11;position:fixed;top:10px;left:10px;right:10px;bottom:10px;" ' + |
149 | | - 'class="ui-widget ui-widget-content ui-corner-all"></div>' ); |
150 | | - |
151 | | - // @@todo clone the playlist (for faster startup) |
152 | | - /* |
153 | | - * var this_plObj_Clone = $j('#'+this.id).get(0).cloneNode(true); |
154 | | - * this_plObj_Clone.sequencer=true; |
155 | | - * this_plObj_Clone.id= 'seq_plobj'; |
156 | | - * debugger; |
157 | | - */ |
158 | | - |
159 | | - // load sequencer: |
160 | | - $j( "#sequencer_target" ).sequencer( { |
161 | | - "smilSource" : this.src |
162 | | - } ); |
163 | | - |
164 | | - }, |
165 | | - showPlayerSelect:function() { |
166 | | - this.cur_clip.embed.showPlayerselect(); |
167 | | - }, |
168 | | - closeDisplayedHTML:function() { |
169 | | - this.cur_clip.embed.closeDisplayedHTML(); |
170 | | - }, |
171 | | - showDownload:function() { |
172 | | - this.cur_clip.embed.showDownload(); |
173 | | - }, |
174 | | - showShare:function() { |
175 | | - var embed_code = '<script type="text/javascript" ' + |
176 | | - 'src="' + mw.getMwEmbedPath() + 'mwEmbed.js"></script> ' + "\n" + |
177 | | - '<playlist id="' + this.id + '" '; |
178 | | - if ( this.src ) { |
179 | | - embed_code += 'src="' + this.src + '" />'; |
180 | | - } else { |
181 | | - embed_code += '>' + "\n"; |
182 | | - embed_code += escape( this.data ); |
183 | | - embed_code += '<playlist/>'; |
184 | | - } |
185 | | - this.cur_clip.embed.showShare( embed_code ); |
186 | | - }, |
187 | | - isTimedTextSupported: function() { |
188 | | - return false; |
189 | | - }, |
190 | | - checkForTextSource: function() { |
191 | | - return false; |
192 | | - }, |
193 | | - |
194 | | - getPlaylist:function() { |
195 | | - mw.log( "f:getPlaylist: " + this.srcType ); |
196 | | - |
197 | | - // Playlist: |
198 | | - eval( 'var plObj = ' + this.srcType + 'Playlist;' ); |
199 | | - // import methods from the plObj to this |
200 | | - for ( var method in plObj ) { |
201 | | - // js parent preservation for local overwritten methods |
202 | | - if ( this[method] && !this[ 'parent_' + method ] ) { |
203 | | - this[ 'parent_' + method ] = this[ method ]; |
204 | | - } |
205 | | - this[method] = plObj[method]; |
206 | | - } |
207 | | - |
208 | | - if ( typeof this.doParse != 'function' ) { |
209 | | - mw.log( 'error: method doParse not found in plObj' + this.srcType ); |
210 | | - return false; |
211 | | - } |
212 | | - |
213 | | - if ( typeof this.doParse == 'function' ) { |
214 | | - if ( this.doParse() ) { |
215 | | - this.doWhenParseDone(); |
216 | | - } else { |
217 | | - mw.log( "error: failed to parse playlist" ); |
218 | | - return false; |
219 | | - // error or parse needs to do ajax requests |
220 | | - } |
221 | | - } |
222 | | - }, |
223 | | - |
224 | | - doNativeWarningCheck:function() { |
225 | | - var clip = this.default_track.clips[0]; |
226 | | - if ( clip ) { |
227 | | - return clip.embed.doNativeWarningCheck(); |
228 | | - } |
229 | | - }, |
230 | | - |
231 | | - doWhenParseDone: function() { |
232 | | - mw.log( 'f:doWhenParseDone' ); |
233 | | - // do additional init for clips: |
234 | | - var _this = this; |
235 | | - var error = false; |
236 | | - _this.clip_ready_count = 0; |
237 | | - for ( var i in this.default_track.clips ) { |
238 | | - var clip = this.default_track.clips[i]; |
239 | | - if ( clip.embed.load_error ) { |
240 | | - var error = clip.embed.load_error; |
241 | | - // break on any clip we can't playback: |
242 | | - break; |
243 | | - } |
244 | | - if ( clip.embed.ready_to_play ) { |
245 | | - _this.clip_ready_count++; |
246 | | - continue; |
247 | | - } |
248 | | - // mw.log('clip sources count: '+ clip.embed.mediaElement.sources.length); |
249 | | - clip.embed.checkPlayerSources(); |
250 | | - if ( clip.embed.loading_external_data == false && |
251 | | - clip.embed.init_with_sources_loadedDone == false ) { |
252 | | - clip.embed.init_with_sources_loaded(); |
253 | | - } |
254 | | - } |
255 | | - |
256 | | - // @@todo for some plugins we have to conform types of clips |
257 | | - // ie vlc can play flash _followed_by_ ogg _followed_by_ whatever |
258 | | - // but |
259 | | - // native ff 3.1a2 can only play ogg |
260 | | - if ( error ) { |
261 | | - this.load_error = error; |
262 | | - this.is_ready = false; |
263 | | - } else if ( _this.clip_ready_count == _this.getClipCount() ) { |
264 | | - mw.log( "done init all clips: " + _this.clip_ready_count + ' = ' + _this.getClipCount() ); |
265 | | - this.doWhenClipLoadDone(); |
266 | | - } else { |
267 | | - mw.log( "only " + _this.clip_ready_count + " clips done, scheduling callback:" ); |
268 | | - setTimeout( function() { |
269 | | - _this.doWhenParseDone() |
270 | | - }, 100 ); |
271 | | - } |
272 | | - }, |
273 | | - doWhenClipLoadDone:function() { |
274 | | - mw.log( 'mvPlaylist:doWhenClipLoadDone' ); |
275 | | - this.ready_to_play = true; |
276 | | - this.loading = false; |
277 | | - this.showPlayer(); |
278 | | - }, |
279 | | - getDuration:function( regen ) { |
280 | | - // mw.log("GET PL DURRATION for : "+ this.tracks[this.default_track_id].clips.length + 'clips'); |
281 | | - if ( !regen && this.pl_duration ) |
282 | | - return this.pl_duration; |
283 | | - |
284 | | - var durSum = 0; |
285 | | - $j.each( this.default_track.clips, function( i, clip ) { |
286 | | - if ( clip.embed ) { |
287 | | - clip.dur_offset = durSum; |
288 | | - // only calculate the solo Duration if a smil clip that could contain a transition: |
289 | | - if ( clip.instanceOf == 'mvSMILClip' ) { |
290 | | - // don't include transition time (for playlist_swap_loader compatible clips) |
291 | | - durSum += clip.getSoloDuration(); |
292 | | - } else { |
293 | | - durSum += clip.getDuration(); |
294 | | - } |
295 | | - } else { |
296 | | - mw.log( "ERROR: clip " + clip.id + " not ready" ); |
297 | | - } |
298 | | - } ); |
299 | | - this.pl_duration = durSum; |
300 | | - // mw.log("return dur: " + this.pl_duration); |
301 | | - return this.pl_duration; |
302 | | - }, |
303 | | - getTimeRange: function() { |
304 | | - // playlist does not really support time request atm |
305 | | - return '0:0:0/' + mw.seconds2npt( this.getDuration() ); |
306 | | - }, |
307 | | - getDataSource: function() { |
308 | | - mw.log( "f:getDataSource " + this.src ); |
309 | | - // determine the type / first is it m3u or xml? |
310 | | - var _this = this; |
311 | | - this.src = mw.absoluteUrl( this.src ); |
312 | | - if ( mw.isLocalDomain( this.src ) ) { |
313 | | - $j.get( this.src, function( data ) { |
314 | | - _this.data = data; |
315 | | - _this.getSourceType(); |
316 | | - }); |
317 | | - } else { |
318 | | - roe_url = mw.replaceUrlParams( this.src, { |
319 | | - 'feed_format':'json_roe', |
320 | | - 'cb':'?', |
321 | | - 'cb_inx': '1' |
322 | | - }) |
323 | | - $j.getJSON( roe_url, function( data ) { |
324 | | - _this.data = data; |
325 | | - _this.getSourceType(); |
326 | | - }); |
327 | | - } |
328 | | - }, |
329 | | - getSrc: function() { |
330 | | - return this.src; |
331 | | - }, |
332 | | - getSourceType:function() { |
333 | | - mw.log( 'data type of: ' + this.src + ' = ' + typeof ( this.data ) + "\n" + this.data ); |
334 | | - this.srcType = null; |
335 | | - // if not external use different detection matrix |
336 | | - if ( this.loading_external_data ) { |
337 | | - //var domParser = new DOMParser(); |
338 | | - //this.data = domParser.parseFromString(this.data); |
339 | | - if ( typeof this.data == 'object' ) { |
340 | | - mw.log( 'object' ); |
341 | | - // object assume xml (either xspf or rss) |
342 | | - plElm = this.data.getElementsByTagName( 'playlist' )[0]; |
343 | | - if ( plElm ) { |
344 | | - if ( plElm.getAttribute( 'xmlns' ) == 'http://xspf.org/ns/0/' ) { |
345 | | - this.srcType = 'xspf'; |
346 | | - } |
347 | | - } |
348 | | - // check itunes style rss "items" |
349 | | - rssElm = this.data.getElementsByTagName( 'rss' )[0]; |
350 | | - if ( rssElm ) { |
351 | | - if ( rssElm.getAttribute( 'xmlns:itunes' ) == 'http://www.itunes.com/dtds/podcast-1.0.dtd' ) { |
352 | | - this.srcType = 'itunes'; |
353 | | - } |
354 | | - } |
355 | | - // check for smil tag: |
356 | | - smilElm = this.data.getElementsByTagName( 'smil' )[0]; |
357 | | - if ( smilElm ) { |
358 | | - // don't check dtd yet.. (have not defined the smil subset) |
359 | | - this.srcType = 'smil'; |
360 | | - } |
361 | | - } else if ( typeof this.data == 'string' ) { |
362 | | - mw.log( 'String' ); |
363 | | - // look at the first line: |
364 | | - var first_line = this.data.substring( 0, this.data.indexOf( "\n" ) ); |
365 | | - mw.log( 'first line: ' + first_line ); |
366 | | - // string |
367 | | - if ( first_line.indexOf( '#EXTM3U' ) != -1 ) { |
368 | | - this.srcType = 'm3u'; |
369 | | - } else if ( first_line.indexOf( '<smil' ) != -1 ) { |
370 | | - // @@todo parse string |
371 | | - this.srcType = 'smil'; |
372 | | - } |
373 | | - } |
374 | | - } |
375 | | - if ( this.srcType ) { |
376 | | - mw.log( 'is of type:' + this.srcType ); |
377 | | - this.getPlaylist(); |
378 | | - } else { |
379 | | - // unknown playlist type |
380 | | - mw.log( 'unknown playlist type?' ); |
381 | | - if ( this.src ) { |
382 | | - this.innerHTML = 'error: unknown playlist type at url:<br> ' + this.src; |
383 | | - } else { |
384 | | - this.innerHTML = 'error: unset src or unknown inline playlist data<br>'; |
385 | | - } |
386 | | - } |
387 | | - }, |
388 | | - |
389 | | - // set up minimal media_element emulation: |
390 | | - media_element: { |
391 | | - selected_source: { |
392 | | - supports_url_time_encoding:true |
393 | | - } |
394 | | - }, |
395 | | - // @@todo needs to update for multi-track clip counts |
396 | | - getClipCount:function() { |
397 | | - return this.default_track.clips.length; |
398 | | - }, |
399 | | - |
400 | | - /** |
401 | | - * Checks the playlist player sources and calls "showPlayer" once ready |
402 | | - */ |
403 | | - checkPlayerSources: function( callback ) { |
404 | | - var _this = this; |
405 | | - mw.log( 'pl:checkPlayerSources:: loading:' + this.loading ); |
406 | | - if ( this.loading ) { |
407 | | - $j( '#' + this.id ) |
408 | | - .html( 'loading playlist...' ) |
409 | | - .css({ |
410 | | - 'color':'#000' |
411 | | - }); |
412 | | - if ( this.loading_external_data ) { |
413 | | - // load the data source chain of functions (to update the innerHTML) |
414 | | - this.getDataSource(); |
415 | | - } else { |
416 | | - // detect datatype and parse directly: |
417 | | - this.getSourceType(); |
418 | | - } |
419 | | - } else { |
420 | | - // check for empty playlist otherwise showPlayer: |
421 | | - if ( this.default_track.getClipCount() == 0 ) { |
422 | | - $j( this ).html( 'empty playlist' ); |
423 | | - return ; |
424 | | - } else { |
425 | | - callback(); |
426 | | - } |
427 | | - } |
428 | | - }, |
429 | | - |
430 | | - /** |
431 | | - * Shows the playlist player |
432 | | - */ |
433 | | - showPlayer:function() { |
434 | | - mw.log( 'pl:showPlayer:: track length: ' + this.default_track.getClipCount() ); |
435 | | - var _this = this; |
436 | | - |
437 | | - //Check for playlist player sources: |
438 | | - this.checkPlayerSources(function() { |
439 | | - _this.buildPlayerUI(); |
440 | | - }); |
441 | | - }, |
442 | | - |
443 | | - /** |
444 | | - * Build out the player interface ( assumes checkPlayerSources has been run ) |
445 | | - */ |
446 | | - buildPlayerUI: function() { |
447 | | - var _this = this; |
448 | | - mw.log('pl:buildPlayer'); |
449 | | - // Make sure we have interface_wrap |
450 | | - if( $j( this ).parent('.interface_wrap').length == 0 ) { |
451 | | - // Select "player" |
452 | | - $j( this ) |
453 | | - // Add interface control class: |
454 | | - .css({ |
455 | | - 'position': 'relative' |
456 | | - }) |
457 | | - .wrap( |
458 | | - $j('<div>') |
459 | | - .addClass( 'interface_wrap ' + this.controlBuilder.playerClass ) |
460 | | - .css({ |
461 | | - 'width': parseInt( this.width ), |
462 | | - 'height': parseInt( this.height ) |
463 | | - }) |
464 | | - ) |
465 | | - } |
466 | | - |
467 | | - // Update the target player: |
468 | | - this.$interface = $j( this ).parent( '.interface_wrap' ); |
469 | | - |
470 | | - // Empty out the old interface: |
471 | | - this.controlBuilder.embedPlayer = this; |
472 | | - |
473 | | - if ( this.controls == true && $j('#ptitle_' + this.id).length == 0 ) { |
474 | | - // prepend the title (ontop) if not there |
475 | | - this.$interface.prepend( |
476 | | - $j('<div>') |
477 | | - .css({ |
478 | | - 'font-size':'13px', |
479 | | - 'border' : 'solid thin', |
480 | | - 'width' : this.width, |
481 | | - 'height': this.layout.title_bar_height |
482 | | - |
483 | | - }) |
484 | | - .attr('id', 'ptitle_' + this.id) |
485 | | - ); |
486 | | - // add the controls: |
487 | | - this.controlBuilder.addControls( ); |
488 | | - } |
489 | | - |
490 | | - this.setupClipDisplay(); |
491 | | - // update the title and status bar |
492 | | - this.updateBaseStatus(); |
493 | | - this.doSmilActions(); |
494 | | - }, |
495 | | - setupClipDisplay:function() { |
496 | | - mw.log( 'mvPlaylist:setupClipDisplay:: clip len:' + this.default_track.clips.length ); |
497 | | - var _this = this; |
498 | | - $j( _this ).html( '' ); |
499 | | - $j.each( this.default_track.clips, function( i, clip ) { |
500 | | - var cout = '<div class="clip_container" id="clipDesc_' + clip.id + '" ' + |
501 | | - 'style="display:none;position:absolute;text-align: center;width:' + _this.width + 'px;' + |
502 | | - 'height:' + ( _this.height ) + 'px;'; |
503 | | - if ( _this.controls ) { |
504 | | - cout += 'border:solid thin black;'; |
505 | | - } |
506 | | - cout += '"></div>'; |
507 | | - $j( _this ).append( cout ); |
508 | | - // update the embed html: |
509 | | - clip.embed.height = _this.height; |
510 | | - clip.embed.width = _this.width; |
511 | | - clip.embed.play_button = false; |
512 | | - clip.embed.controls = false; |
513 | | - |
514 | | - clip.embed.showPlayer();// get the thubnails for everything |
515 | | - |
516 | | - $j( clip.embed ).css( { |
517 | | - 'top':"0px", |
518 | | - 'left':"0px" |
519 | | - } ); |
520 | | - |
521 | | - if ( $j( '#clipDesc_' + clip.id ).length != 0 ) { |
522 | | - mw.log( "should set: #clipDesc_" + clip.id + ' to: ' + $j( clip.embed ).html() ) |
523 | | - $j( '#clipDesc_' + clip.id ).append( clip.embed ); |
524 | | - } else { |
525 | | - mw.log( 'cound not find: clipDesc_' + clip.id ); |
526 | | - } |
527 | | - |
528 | | - } ); |
529 | | - if ( this.cur_clip ) |
530 | | - $j( '#clipDesc_' + this.cur_clip.id ).css( { display:'inline' } ); |
531 | | - }, |
532 | | - updateThumbPerc:function( perc ) { |
533 | | - // get float seconds: |
534 | | - var float_sec = ( this.getDuration() * perc ); |
535 | | - this.updateThumbTime( float_sec ); |
536 | | - }, |
537 | | - updateThumbTime:function( float_sec ) { |
538 | | - // update display & cur_clip: |
539 | | - var pl_sum_time = 0; |
540 | | - var clip_float_sec = 0; |
541 | | - // mw.log('seeking clip: '); |
542 | | - for ( var i in this.default_track.clips ) { |
543 | | - var clip = this.default_track.clips[i]; |
544 | | - if ( ( clip.getDuration() + pl_sum_time ) >= float_sec ) { |
545 | | - if ( this.cur_clip.id != clip.id ) { |
546 | | - $j( '#clipDesc_' + this.cur_clip.id ).hide(); |
547 | | - this.cur_clip = clip; |
548 | | - $j( '#clipDesc_' + this.cur_clip.id ).show(); |
549 | | - } |
550 | | - break; |
551 | | - } |
552 | | - pl_sum_time += clip.getDuration(); |
553 | | - } |
554 | | - |
555 | | - // issue thumbnail update request: (if plugin supports it will render out frame |
556 | | - // if not then we do a call to the server to get a new jpeg thumbnail |
557 | | - this.cur_clip.embed.updateThumbTime( float_sec - pl_sum_time ); |
558 | | - |
559 | | - this.cur_clip.embed.currentTime = ( float_sec - pl_sum_time ) + this.cur_clip.embed.startOffset ; |
560 | | - this.cur_clip.embed.seek_time_sec = ( float_sec - pl_sum_time ); |
561 | | - |
562 | | - // render effects ontop: (handled by doSmilActions) |
563 | | - this.doSmilActions(); |
564 | | - }, |
565 | | - updateBaseStatus:function() { |
566 | | - var _this = this; |
567 | | - mw.log( 'Playlist:updateBaseStatus' ); |
568 | | - |
569 | | - $j( '#ptitle_' + this.id ).html( '' + |
570 | | - '<b>' + this.title + '</b> ' + |
571 | | - this.getClipCount() + ' clips, <i>' + |
572 | | - mw.seconds2npt( this.getDuration() ) + '</i>' ); |
573 | | - |
574 | | - // should probably be based on if we have a provider api url |
575 | | - if ( typeof wgEnableWriteAPI != 'undefined' && !this.sequencer ) { |
576 | | - $j( $j.btnHtml( 'edit', 'editBtn_' + this.id, 'pencil', |
577 | | - { 'style':'position:absolute;right:0;;font-size:x-small;height:10px;margin-bottom:0;padding-bottom:7px;padding-top:0;' } ) |
578 | | - ).click( function() { |
579 | | - _this.stop(); |
580 | | - _this.doEditor(); |
581 | | - return false; |
582 | | - } ).appendTo( '#ptitle_' + this.id ); |
583 | | - $j( '.editBtn_' + this.id ).buttonHover(); |
584 | | - } |
585 | | - // render out the dividers on the timeline: |
586 | | - this.colorPlayHead(); |
587 | | - // update status: |
588 | | - this.setStatus( '0:0:00/' + mw.seconds2npt( this.getDuration() ) ); |
589 | | - }, |
590 | | - /*setStatus override (could call the jquery directly) */ |
591 | | - setStatus:function( value ) { |
592 | | - this.$interface.find( '.time-disp' ).text( value ); |
593 | | - }, |
594 | | - updatePlayHead:function( value ) { |
595 | | - // slider is on 1000 scale: |
596 | | - var val = parseInt( value * 1000 ); |
597 | | - //mw.log( 'update slider: #' + this.id + ' .play_head to ' + val ); |
598 | | - this.$interface.find( '.play_head' ).slider( 'value', val ); |
599 | | - }, |
600 | | - getPlayHeadPos: function( prec_done ) { |
601 | | - var _this = this; |
602 | | - if ( $j( '#mv_seeker_' + this.id ).length == 0 ) { |
603 | | - mw.log( 'no playhead so we can\'t get playhead pos' ); |
604 | | - return 0; |
605 | | - } |
606 | | - var track_len = $j( '#mv_seeker_' + this.id ).css( 'width' ).replace( /px/ , '' ); |
607 | | - // assume the duration is static and present at .duration during playback |
608 | | - var clip_perc = this.cur_clip.embed.duration / this.getDuration(); |
609 | | - var perc_offset = time_offset = 0; |
610 | | - for ( var i in this.default_track.clips ) { |
611 | | - var clip = this.default_track.clips[i]; |
612 | | - if ( this.cur_clip.id == clip.id )break; |
613 | | - perc_offset += ( clip.embed.duration / _this.getDuration() ); |
614 | | - time_offset += clip.embed.duration; |
615 | | - } |
616 | | - // run any update time line hooks: |
617 | | - if ( this.update_tl_hook ) { |
618 | | - var cur_time_ms = time_offset + Math.round( this.cur_clip.embed.duration * prec_done ); |
619 | | - if ( typeof update_tl_hook == 'function' ) { |
620 | | - this.update_tl_hook( cur_time_ms ); |
621 | | - } else { |
622 | | - // string type passed use eval: |
623 | | - eval( this.update_tl_hook + '(' + cur_time_ms + ');' ); |
624 | | - } |
625 | | - } |
626 | | - |
627 | | - // handle offset hack @@todo fix so this is not needed: |
628 | | - if ( perc_offset > .66 ) |
629 | | - perc_offset += ( 8 / track_len ); |
630 | | - // mw.log('perc:'+ perc_offset +' c:'+ clip_perc + '*' + prec_done + ' v:'+(clip_perc*prec_done)); |
631 | | - return perc_offset + ( clip_perc * prec_done ); |
632 | | - }, |
633 | | - // attempts to load the embed object with the playlist |
634 | | - loadEmbedPlaylist: function() { |
635 | | - // mw.log('load playlist'); |
636 | | - }, |
637 | | - /** mannages the loading of future clips |
638 | | - * called regurally while we are playing clips |
639 | | - * |
640 | | - * load works like so: |
641 | | - * if the current clip is full loaded |
642 | | - * load clips untill buffredEndTime < playlist_buffer_time load next |
643 | | - * |
644 | | - * this won't work so well with time range loading for smil (need to work on that) |
645 | | - */ |
646 | | - loadFutureClips:function() { |
647 | | - /*if( this.cur_clip.embed.bufferedPercent == 1) { |
648 | | - //set the buffer to the currentTime - duration |
649 | | - var curBuffredTime = this.cur_clip.getDuration() - this.cur_clip.embed.currentTime; |
650 | | - |
651 | | - if(curBuffredTime < 0) |
652 | | - curBuffredTime = 0; |
653 | | - |
654 | | - mw.log( "curBuffredTime:: " + curBuffredTime ); |
655 | | - if( curBuffredTime < this.playlist_buffer_time ) { |
656 | | - mw.log(" we only have " + curBuffredTime + ' buffed but we need: ' + this.playlist_buffer_time); |
657 | | - |
658 | | - for(var inx = this.cur_clip.order + 1; inx < this.default_track.clips.length; inx++ ) { |
659 | | - var cClip = this.default_track.getClip( inx ); |
660 | | - |
661 | | - //check if the clip is already loaded (add its duration) |
662 | | - if( cClip.embed.bufferedPercent == 1) { |
663 | | - curBuffredTime += cClip.embed.getDuration(); |
664 | | - } |
665 | | - //check if we still have to load a resource: |
666 | | - if( curBuffredTime < this.playlist_buffer_time ) { |
667 | | - //issue the load request |
668 | | - if( cClip.embed.networkState==0 ) { |
669 | | - cClip.embed.load(); |
670 | | - } |
671 | | - break; //check back next time |
672 | | - } |
673 | | - } |
674 | | - } |
675 | | - }*/ |
676 | | - }, |
677 | | - // called to play the next clip if done call onClipDone |
678 | | - playNext: function() { |
679 | | - // Advance the playhead to the next clip |
680 | | - var next_clip = this.getNextClip(); |
681 | | - |
682 | | - if ( !next_clip ) { |
683 | | - mw.log( 'no next clip... must be done:' ); |
684 | | - this.onClipDone(); |
685 | | - this.stop(); |
686 | | - return ; |
687 | | - } |
688 | | - |
689 | | - // @@todo where the plugin supports pre_loading future clips and manage that in javascript |
690 | | - // stop current clip |
691 | | - this.cur_clip.embed.stop(); |
692 | | - |
693 | | - this.updateCurrentClip( next_clip ); |
694 | | - //if part of a transition should continue playing where it left off |
695 | | - this.cur_clip.embed.play(); |
696 | | - }, |
697 | | - onClipDone:function() { |
698 | | - mw.log( "pl onClipDone" ); |
699 | | - this.cur_clip.embed.stop(); |
700 | | - }, |
701 | | - updateCurrentClip : function( new_clip , into_perc) { |
702 | | - //mw.log( 'f:updateCurrentClip:' + new_clip.id ); |
703 | | - |
704 | | - // keep the active play clip in sync (stop the other clip) |
705 | | - if ( this.cur_clip ) { |
706 | | - // make sure we are not switching to the current |
707 | | - if ( this.cur_clip.id == new_clip.id ) { |
708 | | - mw.log( 'trying to updateCurrentClip to same clip' ); |
709 | | - return false; |
710 | | - } |
711 | | - |
712 | | - if ( !this.cur_clip.embed.isStopped() ) |
713 | | - this.cur_clip.embed.stop(); |
714 | | - this.activeClipList.remove( this.cur_clip ) |
715 | | - |
716 | | - //hide the current clip |
717 | | - $j( '#clipDesc_' + this.cur_clip.id ).hide(); |
718 | | - } |
719 | | - this.activeClipList.add( new_clip ); |
720 | | - |
721 | | - // Do swap: |
722 | | - this.cur_clip = new_clip; |
723 | | - $j( '#clipDesc_' + this.cur_clip.id ).show(); |
724 | | - // Update the playhead: |
725 | | - if( this.controls ) { |
726 | | - // Check if we have into_perc |
727 | | - if( into_perc ) { |
728 | | - var clip_time = this.cur_clip.dur_offset + ( into_perc * this.cur_clip.getDuration() ); |
729 | | - }else{ |
730 | | - var clip_time = this.cur_clip.dur_offset; |
731 | | - } |
732 | | - this.updatePlayHead( clip_time / this.getDuration() ); |
733 | | - } |
734 | | - }, |
735 | | - playPrev: function() { |
736 | | - // advance the playhead to the previous clip |
737 | | - var prev_clip = this.getPrevClip(); |
738 | | - if ( !prev_clip ) { |
739 | | - mw.log( "tried to play PrevClip with no prev Clip.. setting prev_clip to start clip" ); |
740 | | - prev_clip = this.start_clip; |
741 | | - } |
742 | | - // @@todo we could do something fancy like use playlist for sets of clips where supported. |
743 | | - // or in cases where the player natively supports the playlist format we can just pass it in ( ie m3u or xspf ) |
744 | | - if ( this.cur_clip.embed.supports['playlist_swap_loader'] ) { |
745 | | - // where the plugin supports pre_loading future clips and manage that in javascript |
746 | | - // pause current clip |
747 | | - this.cur_clip.embed.pause(); |
748 | | - // do swap: |
749 | | - this.updateCurrentClip( prev_clip ); |
750 | | - this.cur_clip.embed.play(); |
751 | | - } else { |
752 | | - mw.log( 'do prev hard embed swap' ); |
753 | | - this.switchPlayingClip( prev_clip ); |
754 | | - } |
755 | | - }, |
756 | | - switchPlayingClip:function( new_clip ) { |
757 | | - // swap out the existing embed code for next clip embed code |
758 | | - $j( '#mv_ebct_' + this.id ).empty(); |
759 | | - new_clip.embed.width = this.width; |
760 | | - new_clip.embed.height = this.height; |
761 | | - // mw.log('set embed to: '+ new_clip.embed.getEmbedObj()); |
762 | | - $j( '#mv_ebct_' + this.id ).html( new_clip.embed.getEmbedObj() ); |
763 | | - this.cur_clip = new_clip; |
764 | | - // run js code: |
765 | | - this.cur_clip.embed.pe_postEmbedJS(); |
766 | | - }, |
767 | | - // playlist play |
768 | | - play: function() { |
769 | | - var _this = this; |
770 | | - mw.log( 'pl play' ); |
771 | | - // hide the playlist play button: |
772 | | - this.$interface.find( '.play-btn-large' ).hide(); |
773 | | - |
774 | | - // un-pause if paused: |
775 | | - if ( this.paused ) |
776 | | - this.paused = false; |
777 | | - |
778 | | - if ( this.cur_clip.embed.supports['playlist_swap_loader'] ) { |
779 | | - // set the cur_clip to active |
780 | | - this.activeClipList.add( this.cur_clip ); |
781 | | - |
782 | | - // native support: |
783 | | - // * pre-loads clips |
784 | | - // * mv_playlist smil extension, manages transitions animations overlays etc. |
785 | | - // mw.log('clip obj supports playlist swap_loader (ie playlist controlled playback)'); |
786 | | - // @@todo pre-load each clip: |
787 | | - // play all active clips (playlist_swap_loader can have more than one clip active) |
788 | | - $j.each( this.activeClipList.getClipList(), function( inx, clip ) { |
789 | | - clip.embed.play(); |
790 | | - } ); |
791 | | - } else if ( this.cur_clip.embed.supports['playlist_driver'] ) { |
792 | | - // mw.log('playlist_driver'); |
793 | | - // embedObject is feed the playlist info directly and manages next/prev |
794 | | - this.cur_clip.embed.playMovieAt( this.cur_clip.order ); |
795 | | - } else { |
796 | | - // not much playlist support just play the first clip: |
797 | | - // mw.log('basic play'); |
798 | | - // play cur_clip |
799 | | - this.cur_clip.embed.play(); |
800 | | - } |
801 | | - |
802 | | - // Update interface: |
803 | | - this.$interface.find('.play-btn span') |
804 | | - .removeClass( 'ui-icon-play' ) |
805 | | - .addClass( 'ui-icon-pause' ); |
806 | | - |
807 | | - this.$interface.find('.play-btn' ) |
808 | | - .unbind() |
809 | | - .buttonHover() |
810 | | - .click( function() { |
811 | | - _this.pause(); |
812 | | - } ) |
813 | | - .attr( 'title', gM( 'mwe-pause_clip' ) ); |
814 | | - |
815 | | - // start up the playlist monitor |
816 | | - this.monitor(); |
817 | | - }, |
818 | | - |
819 | | - /** |
820 | | - * the load function loads all the clips in order |
821 | | - */ |
822 | | - load:function( callback ) { |
823 | | - // do nothing right now) |
824 | | - //alert('load pl'); |
825 | | - callback(); |
826 | | - }, |
827 | | - toggleMute:function() { |
828 | | - this.cur_clip.embed.toggleMute(); |
829 | | - }, |
830 | | - pause:function() { |
831 | | - var _this = this; |
832 | | - // mw.log('f:pause: playlist'); |
833 | | - var ct = new Date(); |
834 | | - this.pauseTime = this.currentTime; |
835 | | - this.paused = true; |
836 | | - // mw.log('pause time: '+ this.pauseTime + ' call embed pause:'); |
837 | | - |
838 | | - // pause all the active clips: |
839 | | - $j.each( this.activeClipList.getClipList(), function( inx, clip ) { |
840 | | - clip.embed.pause(); |
841 | | - } ); |
842 | | - |
843 | | - this.updateUIPauseState(); |
844 | | - }, |
845 | | - updateUIPauseState:function() { |
846 | | - var _this = this; |
847 | | - // Copied from embedPlayer.pause ( in the refactor this is not needed ) |
848 | | - // update the ctrl "paused state" |
849 | | - this.$interface.find('.play-btn span' ) |
850 | | - .removeClass( 'ui-icon-pause' ) |
851 | | - .addClass( 'ui-icon-play' ); |
852 | | - |
853 | | - this.$interface.find('.play-btn' ) |
854 | | - .unbind() |
855 | | - .buttonHover() |
856 | | - .click( function() { |
857 | | - _this.play(); |
858 | | - } ) |
859 | | - .attr( 'title', gM( 'mwe-play_clip' ) ); |
860 | | - }, |
861 | | - // @@todo mute across all child clips: |
862 | | - toggleMute:function() { |
863 | | - var this_id = ( this.pc != null ) ? this.pc.pp.id:this.id; |
864 | | - if ( this.muted ) { |
865 | | - this.muted = false; |
866 | | - $j( '#volume_control_' + this_id + ' span' ).removeClass( 'ui-icon-volume-off' ).addClass( 'ui-icon-volume-on' ); |
867 | | - $j( '#volume_bar_' + this_id ).slider( 'value', 100 ); |
868 | | - this.updateVolumen( 1 ); |
869 | | - } else { |
870 | | - this.muted = true; |
871 | | - $j( '#volume_control_' + this_id + ' span' ).removeClass( 'ui-icon-volume-on' ).addClass( 'ui-icon-volume-off' ); |
872 | | - $j( '#volume_bar_' + this_id ).slider( 'value', 0 ); |
873 | | - this.updateVolumen( 0 ); |
874 | | - } |
875 | | - mw.log( 'f:toggleMute::' + this.muted ); |
876 | | - }, |
877 | | - updateVolumen:function( perc ) { |
878 | | - mw.log( 'update volume not supported with current playback type' ); |
879 | | - }, |
880 | | - fullscreen:function() { |
881 | | - this.cur_clip.embed.fullscreen(); |
882 | | - }, |
883 | | - // playlist stops playback for the current clip (and resets state for start clips) |
884 | | - stop:function() { |
885 | | - var _this = this; |
886 | | - //mw.log("mw.PlayList stop:"+ this.start_clip.id + ' c:'+this.cur_clip.id); |
887 | | - this.updatePlayHead(0); |
888 | | - this.setupClipDisplay(); |
889 | | - }, |
890 | | - doSeek:function( v ) { |
891 | | - mw.log( 'pl:doSeek:' + v + ' sts:' + this.seek_time_sec ); |
892 | | - var _this = this; |
893 | | - |
894 | | - var time = v * this.getDuration() |
895 | | - _this.currentTime = time; |
896 | | - var relative_perc = _this.updateClipByTime(); |
897 | | - |
898 | | - // Update the clip relative seek_time_sec |
899 | | - _this.cur_clip.embed.doSeek( relative_perc ); |
900 | | - _this.monitor(); |
901 | | - |
902 | | - return ''; |
903 | | - }, |
904 | | - setCurrentTime: function( time, callback ) { |
905 | | - //mw.log( 'pl:setCurrentTime:' + time ); |
906 | | - var _this = this; |
907 | | - _this.currentTime = time; |
908 | | - |
909 | | - var pl_perc = time / this.getDuration(); |
910 | | - var relative_perc = _this.updateClipByTime(); |
911 | | - var clip_time = relative_perc * _this.cur_clip.embed.getDuration(); |
912 | | - _this.cur_clip.embed.setCurrentTime( clip_time, function() { |
913 | | - //update the smil actions now that the seek is done |
914 | | - _this.doSmilActions(); |
915 | | - //say we are "ready" |
916 | | - if ( callback ) |
917 | | - callback(); |
918 | | - } ); |
919 | | - }, |
920 | | - /* |
921 | | - * updateClipByTime:: |
922 | | - * |
923 | | - * @returns the relative offsets of the current clip (given the playlist time) |
924 | | - */ |
925 | | - updateClipByTime: function() { |
926 | | - var _this = this; |
927 | | - var prevClip = null; |
928 | | - //set the current percent done: |
929 | | - var pt = this.currentTime / _this.getDuration(); |
930 | | - // jump to the clip in the current percent. |
931 | | - var perc_offset = 0; |
932 | | - var next_perc_offset = 0; |
933 | | - for ( var i in _this.default_track.clips ) { |
934 | | - var clip = _this.default_track.clips[i]; |
935 | | - next_perc_offset += ( clip.getDuration() / _this.getDuration() ) ; |
936 | | - // mw.log('on ' + clip.getDuration() +' next_perc_offset:'+ next_perc_offset); |
937 | | - if ( next_perc_offset > pt ) { |
938 | | - // mw.log('seek:'+ pt +' - '+perc_offset + ') / (' + next_perc_offset +' - '+ perc_offset); |
939 | | - var relative_perc = ( pt - perc_offset ) / ( next_perc_offset - perc_offset ); |
940 | | - // update the current clip: |
941 | | - _this.updateCurrentClip( clip, relative_perc ); |
942 | | - return relative_perc; |
943 | | - } |
944 | | - perc_offset = next_perc_offset; |
945 | | - } |
946 | | - return 0; |
947 | | - }, |
948 | | - |
949 | | - /** |
950 | | - * Gets playlist controls large control height for sporting |
951 | | - * next prev button and more status display |
952 | | - */ |
953 | | - getControlsHTML:function() { |
954 | | - // get controls from current clip (add some playlist specific controls: |
955 | | - return this.controlBuilder.getControls( this ); |
956 | | - }, |
957 | | - |
958 | | - /** |
959 | | - * Update the buffer status |
960 | | - */ |
961 | | - updateBufferStatus: function() { |
962 | | - // Update the buffer status for all current clip |
963 | | - /*mw.log(' update: '+ this.cur_clip.embed.id + ' to ' + (this.cur_clip.embed.bufferedPercent * 100) ); |
964 | | - if( this.cur_clip.embed && this.cur_clip.embed.bufferedPercent ) { |
965 | | - $j('#cl_status_' + this.cur_clip.embed.id ).find('.mw_buffer').css({ |
966 | | - 'width': ( this.cur_clip.embed.bufferedPercent * 100) + '%' |
967 | | - }) |
968 | | - }*/ |
969 | | - }, |
970 | | - // Add colors dividers between tracks |
971 | | - colorPlayHead: function() { |
972 | | - var _this = this; |
973 | | - |
974 | | - |
975 | | - if ( !_this.track_len ) |
976 | | - _this.track_len = this.$interface.find( '.play_head' ).width(); |
977 | | - |
978 | | - // total duration: |
979 | | - var pl_duration = _this.getDuration(); |
980 | | - |
981 | | - var cur_pixle = 0; |
982 | | - // set up _this |
983 | | - //remove any old cl_status |
984 | | - _this.$interface.find( '.play_head' ).find( '.cl_status' ).remove(); |
985 | | - // mw.log("do play head total dur: "+pl_duration ); |
986 | | - $j.each( this.default_track.clips, function( i, clip ) { |
987 | | - // (use getSoloDuration to not include transitions and such) |
988 | | - var perc = ( clip.getSoloDuration() / pl_duration ); |
989 | | - var pwidth = Math.round( perc * _this.track_len ); |
990 | | - // mw.log('pstatus:c:'+ clip.getDuration() + ' of '+ pl_duration+' %:' + perc + ' width: '+ pwidth + ' of total: ' + _this.track_len); |
991 | | - |
992 | | - // add the buffer child indicator: |
993 | | - var barHtml = '<div id="cl_status_' + clip.embed.id + '" class="cl_status" style="' + |
994 | | - 'left:' + cur_pixle + 'px;' + |
995 | | - 'width:' + pwidth + 'px;'; |
996 | | - // set left or right border based on track pos |
997 | | - barHtml += ( i == _this.default_track.getClipCount() - 1 ) ? |
998 | | - 'border-left:solid thin black;': |
999 | | - 'border-right:solid thin black;'; |
1000 | | - barHtml += 'filter:alpha(opacity=40);' + |
1001 | | - '-moz-opacity:.40;">'; |
1002 | | - |
1003 | | - barHtml += '<div class="ui-slider-range ui-slider-range-min ui-widget-header ' + |
1004 | | - 'ui-state-highlight ui-corner-all mw_buffer" />'; |
1005 | | - |
1006 | | - barHtml += '</div>'; |
1007 | | - |
1008 | | - // background:#DDD +clip.getColor(); |
1009 | | - _this.$interface.find( '.play_head' ).append( barHtml ); |
1010 | | - |
1011 | | - // mw.log('offset:' + cur_pixle +' width:'+pwidth+' add clip'+ clip.id + ' is '+clip.embed.getDuration() +' = ' + perc +' of ' + _this.track_len); |
1012 | | - cur_pixle += pwidth; |
1013 | | - } ); |
1014 | | - }, |
1015 | | - // @@todo we need to move a lot of this track logic like "cur_clip" to the track Obj |
1016 | | - // and have the playlist just drive the tracks. |
1017 | | - getNextClip:function( track ) { |
1018 | | - if ( !track ) |
1019 | | - track = this.default_track; |
1020 | | - var tc = parseInt( this.cur_clip.order ) + 1; |
1021 | | - var cat = track; |
1022 | | - if ( tc > track.getClipCount() - 1 ) |
1023 | | - return false; // out of range |
1024 | | - |
1025 | | - return track.getClip( tc ); |
1026 | | - }, |
1027 | | - getPrevClip:function( track ) { |
1028 | | - if ( !track ) |
1029 | | - track = this.default_track; |
1030 | | - var tc = parseInt( this.cur_clip.order ) - 1; |
1031 | | - if ( tc < 0 ) |
1032 | | - return false; |
1033 | | - return track.getClip( tc ); |
1034 | | - }, |
1035 | | - /** |
1036 | | - * Generic add Clip to ~default~ track |
1037 | | - */ |
1038 | | - addCliptoTrack: function( clipObj, pos ) { |
1039 | | - if ( typeof clipObj['track_id'] == 'undefined' ) { |
1040 | | - var track = this.default_track; |
1041 | | - } else { |
1042 | | - var track = this.tracks[ clipObj.track_id ] |
1043 | | - } |
1044 | | - mw.log( 'add clip:' + clipObj.id + ' to track: at:' + pos ); |
1045 | | - // set the first clip to current (maybe deprecated ) |
1046 | | - if ( clipObj.order == 0 ) { |
1047 | | - if ( !this.cur_clip )this.cur_clip = clipObj; |
1048 | | - } |
1049 | | - track.addClip( clipObj, pos ); |
1050 | | - }, |
1051 | | - run_transition: function( clip_inx, trans_type ) { |
1052 | | - if ( typeof this.default_track.clips[ clip_inx ][ trans_type ] == 'undefined' ) |
1053 | | - clearInterval( this.default_track.clips[ clip_inx ].timerId ); |
1054 | | - else |
1055 | | - this.default_track.clips[ clip_inx ][ trans_type ].run_transition(); |
1056 | | - }, |
1057 | | - getPlayerWidth: function() { |
1058 | | - var player = $j( this ).get( 0 ); |
1059 | | - if ( typeof player != 'undefined' && player['offsetWidth'] ) |
1060 | | - return player.offsetWidth; |
1061 | | - else |
1062 | | - return parseInt( this.width ); |
1063 | | - }, |
1064 | | - getPlayerHeight: function() { |
1065 | | - var player = $j( this ).get( 0 ); |
1066 | | - if ( typeof player != 'undefined' && player['offsetHeight'] ) |
1067 | | - return player.offsetHeight; |
1068 | | - else |
1069 | | - return parseInt( this.height ); |
1070 | | - } |
1071 | | -} |
1072 | | - |
1073 | | -/* Object Stubs: |
1074 | | - * |
1075 | | - * @videoTrack ... stores clips and layer info |
1076 | | - * |
1077 | | - * @clip... each clip segment is a clip object. |
1078 | | - * */ |
1079 | | -var mvClip = function( o ) { |
1080 | | - if ( o ) |
1081 | | - this.init( o ); |
1082 | | - return this; |
1083 | | -}; |
1084 | | -// set up the mvPlaylist object |
1085 | | -mvClip.prototype = { |
1086 | | - id:null, // clip id |
1087 | | - pp:null, // parent playlist |
1088 | | - order:null, // the order/array key for the current clip |
1089 | | - src:null, |
1090 | | - info:null, |
1091 | | - title:null, |
1092 | | - mvclip:null, |
1093 | | - type:null, |
1094 | | - img:null, |
1095 | | - duration:null, |
1096 | | - loading:false, |
1097 | | - isAnimating:false, |
1098 | | - init:function( o ) { |
1099 | | - // init object including pointer to parent |
1100 | | - for ( var i in o ) { |
1101 | | - this[i] = o[i]; |
1102 | | - }; |
1103 | | - mw.log( 'id is: ' + this.id ); |
1104 | | - }, |
1105 | | - // setup the embed object: |
1106 | | - setUpEmbedObj:function() { |
1107 | | - mw.log( 'mvClip:setUpEmbedObj()' ); |
1108 | | - |
1109 | | - this.embed = null; |
1110 | | - // mw.log('setup embed for clip '+ this.id + ':id is a function?'); |
1111 | | - // set up the pl_mwEmbed object: |
1112 | | - var init_pl_embed = { |
1113 | | - id: 'e_' + this.id, |
1114 | | - pc: this, // parent clip |
1115 | | - src: this.src, |
1116 | | - controls: false |
1117 | | - }; |
1118 | | - |
1119 | | - this.setBaseEmbedDim( init_pl_embed ); |
1120 | | - |
1121 | | - |
1122 | | - // if in sequence mode hide controls / embed links |
1123 | | - // init_pl_embed.play_button=false; |
1124 | | - // init_pl_embed.controls=true; |
1125 | | - // if(this.pp.sequencer=='true') { |
1126 | | - init_pl_embed.linkback = null; |
1127 | | - |
1128 | | - if( this.durationHint ) |
1129 | | - init_pl_embed.durationHint = this.durationHint; |
1130 | | - |
1131 | | - if ( this.poster )init_pl_embed['thumbnail'] = this.poster; |
1132 | | - |
1133 | | - if ( this.type )init_pl_embed['type'] = this.type; |
1134 | | - |
1135 | | - this.embed = new PlMvEmbed( init_pl_embed ); |
1136 | | - |
1137 | | - // mw.log('media Duration:' + this.embed.getDuration() ); |
1138 | | - // mw.log('media element:'+ this.embed.mediaElementlength); |
1139 | | - // mw.log('type of embed:' + typeof(this.embed) + ' seq:' + this.pp.sequencer+' pb:'+ this.embed.play_button); |
1140 | | - }, |
1141 | | - doAdjust:function( side, delta ) { |
1142 | | - mw.log( "f:doAdjust: " + side + ' , ' + delta ); |
1143 | | - if ( this.embed ) { |
1144 | | - if ( side == 'start' ) { |
1145 | | - var startOffset = parseInt( this.embed.startOffset ) + parseInt( delta * -1 ); |
1146 | | - this.embed.updateVideoTime( mw.seconds2npt( startOffset ), mw.seconds2npt ( this.embed.startOffset + this.embed.getDuration() ) ); |
1147 | | - } else if ( side == 'end' ) { |
1148 | | - var end_offset = parseInt( this.embed.startOffset ) + parseInt( this.embed.getDuration() ) + parseInt( delta ); |
1149 | | - this.embed.updateVideoTime( mw.seconds2npt( this.embed.startOffset ), mw.seconds2npt( end_offset ) ); |
1150 | | - } |
1151 | | - // update everything: |
1152 | | - this.pp.refresh(); |
1153 | | - /*var base_src = this.src.substr(0,this.src.indexOf('?')); |
1154 | | - mw.log("delta:"+ delta); |
1155 | | - if(side=='start') { |
1156 | | - //since we adjust start invert the delta: |
1157 | | - var startOffset =parseInt(this.embed.startOffset/1000)+parseInt(delta*-1); |
1158 | | - this.src = base_src +'?t='+ mw.seconds2npt(startOffset) +'/'+ this.embed.end_ntp; |
1159 | | - }else if(side=='end') { |
1160 | | - //put back into seconds for adjustment: |
1161 | | - var end_offset = parseInt(this.embed.startOffset/1000) + parseInt(this.embed.duration/1000) + parseInt(delta); |
1162 | | - this.src = base_src +'?t='+ this.embed.start_ntp +'/'+ mw.seconds2npt(end_offset); |
1163 | | - } |
1164 | | - this.embed.updateVideoTime( this.src ); |
1165 | | - //update values |
1166 | | - this.duration = this.embed.getDuration(); |
1167 | | - this.pp.pl_duration=null; |
1168 | | - //update playlist stuff: |
1169 | | - this.pp.updateTitle();*/ |
1170 | | - } |
1171 | | - }, |
1172 | | - getDuration:function() { |
1173 | | - if ( !this.embed )this.setUpEmbedObj(); |
1174 | | - return this.embed.getDuration(); |
1175 | | - }, |
1176 | | - setBaseEmbedDim:function( o ) { |
1177 | | - if ( !o )o = this; |
1178 | | - // o.height=Math.round(layout.clip_desc*this.pp.height)-2;//give it some padding: |
1179 | | - // o.width=Math.round(o.height*layout.clip_aspect)-2; |
1180 | | - o.height = this.pp.height; |
1181 | | - o.width = this.pp.width; |
1182 | | - }, |
1183 | | - // output the detail view: |
1184 | | - // @@todo |
1185 | | - /*getDetail:function() { |
1186 | | - //mw.log('get detail:' + this.pp.title); |
1187 | | - var th=Math.round( this.layout.clip_desc * this.pp.height ); |
1188 | | - var tw=Math.round( th * this.layout.clip_aspect ); |
1189 | | - |
1190 | | - var twDesc = (this.pp.width-tw)-2; |
1191 | | - |
1192 | | - if(this.title==null) |
1193 | | - this.title='clip ' + this.order + ' ' +this.pp.title; |
1194 | | - if(this.desc==null) |
1195 | | - this.desc=this.pp.desc; |
1196 | | - //update the embed html: |
1197 | | - this.embed.showPlayer(); |
1198 | | - |
1199 | | - $j(this.embed).css({ 'position':"absolute",'top':"0px", 'left':"0px"}); |
1200 | | - |
1201 | | - //mw.log('append child to:#clipDesc_'+this.id); |
1202 | | - if($j('#clipDesc_'+this.id).get(0)) { |
1203 | | - $j('#clipDesc_'+this.id).get(0).appendChild(this.embed); |
1204 | | - |
1205 | | - $j('#clipDesc_'+this.id).append(''+ |
1206 | | - '<div id="pl_desc_txt_'+this.id+'" class="pl_desc" style="position:absolute;left:'+(tw+2)+'px;width:'+twDesc+'px;height:'+th+'px;overflow:auto;">'+ |
1207 | | - '<b>'+this.title+'</b><br>'+ |
1208 | | - this.desc + '<br>' + |
1209 | | - '<b>clip length:</b> '+ mw.seconds2npt( this.embed.getDuration() ); |
1210 | | - '</div>'); |
1211 | | - } |
1212 | | - },*/ |
1213 | | - getTitle:function() { |
1214 | | - if ( typeof this.title == 'string' ) |
1215 | | - return this.title |
1216 | | - |
1217 | | - return 'untitled clip ' + this.order; |
1218 | | - }, |
1219 | | - getClipImg:function( startOffset, size ) { |
1220 | | - mw.log( 'f:getClipImg ' + startOffset + ' s:' + size ); |
1221 | | - if ( !this.img ) { |
1222 | | - return mv_default_thumb_url; |
1223 | | - } else { |
1224 | | - if ( !size && !startOffset ) { |
1225 | | - return this.img; |
1226 | | - } else { |
1227 | | - // if a metavid image (has request parameters) use size and time args |
1228 | | - if ( this.img.indexOf( '?' ) != -1 ) { |
1229 | | - mw.log( 'get with offset: ' + startOffset ); |
1230 | | - var time = mw.seconds2npt( startOffset + ( this.embed.startOffset / 1000 ) ); |
1231 | | - mw.log( "time is: " + time ); |
1232 | | - this.img = this.img.replace( /t\=[^&]*/gi, "t=" + time ); |
1233 | | - if ( this.img.indexOf( '&size=' ) != -1 ) { |
1234 | | - this.img = this.img.replace( /size=[^&]*/gi, "size=" + size ); |
1235 | | - } else { |
1236 | | - this.img += '&size=' + size; |
1237 | | - } |
1238 | | - } |
1239 | | - return this.img; |
1240 | | - } |
1241 | | - } |
1242 | | - }, |
1243 | | - getColor: function() { |
1244 | | - // mw.log('get color:'+ num +' : '+ num.toString().substr(num.length-1, 1) + ' : '+colors[ num.toString().substr(num.length-1, 1)] ); |
1245 | | - var num = this.id.substr( this.id.length - 1, 1 ); |
1246 | | - if ( !isNaN( num ) ) { |
1247 | | - num = num.charCodeAt( 0 ); |
1248 | | - } |
1249 | | - if ( num >= 10 )num = num % 10; |
1250 | | - return mv_clip_colors[num]; |
1251 | | - } |
1252 | | -} |
1253 | | -/* mwEmbed extensions for playlists */ |
1254 | | -var PlMvEmbed = function( vid_init ) { |
1255 | | - // mw.log('PlMvEmbed: '+ vid_init.id); |
1256 | | - // create the div container |
1257 | | - var ve = document.createElement( 'div' ); |
1258 | | - // extend ve with all this |
1259 | | - this.init( vid_init ); |
1260 | | - for ( method in this ) { |
1261 | | - if ( method != 'readyState' ) { |
1262 | | - ve[method] = this[method]; |
1263 | | - } |
1264 | | - } |
1265 | | - mw.log( 've src len:' + ve.mediaElement.sources.length ); |
1266 | | - return ve; |
1267 | | -} |
1268 | | -// all the overwritten and new methods for playlist extension of baseEmbed |
1269 | | -PlMvEmbed.prototype = { |
1270 | | - init:function( vid_init ) { |
1271 | | - // send embed_video a created video element: |
1272 | | - ve = document.createElement( 'div' ); |
1273 | | - for ( var i in vid_init ) { |
1274 | | - // set the parent clip pointer: |
1275 | | - if ( i == 'pc' ) { |
1276 | | - this['pc'] = vid_init['pc']; |
1277 | | - } else { |
1278 | | - ve.setAttribute( i, vid_init[i] ); |
1279 | | - } |
1280 | | - } |
1281 | | - var videoInterface = new mw.EmbedPlayer( ve ); |
1282 | | - // inherit the videoInterface |
1283 | | - for ( method in videoInterface ) { |
1284 | | - if ( method != 'style' ) { |
1285 | | - if ( this[ method ] ) { |
1286 | | - // parent embed method preservation: |
1287 | | - this['pe_' + method] = videoInterface[method]; |
1288 | | - } else { |
1289 | | - this[method] = videoInterface[method]; |
1290 | | - } |
1291 | | - } |
1292 | | - // string -> boolean: |
1293 | | - if ( this[method] == "false" )this[method] = false; |
1294 | | - if ( this[method] == "true" )this[method] = true; |
1295 | | - } |
1296 | | - }, |
1297 | | - onClipDone:function() { |
1298 | | - mw.log( 'pl onClipDone (should go to next)' ); |
1299 | | - // go to next in playlist: |
1300 | | - this.pc.pp.playNext(); |
1301 | | - }, |
1302 | | - stop: function() { |
1303 | | - mw.log( 'PlMvEmbed::do stop' ); |
1304 | | - // set up convenience pointer to parent playlist |
1305 | | - var _this = this.pc.pp; |
1306 | | - |
1307 | | - var th = Math.round( _this.layout.clip_desc * _this.height ); |
1308 | | - var tw = Math.round( th * _this.layout.clip_aspect ); |
1309 | | - |
1310 | | - // run the parent stop: |
1311 | | - this.pe_stop(); |
1312 | | - var pl_height = ( _this.sequencer == 'true' ) ? _this.height + 27:_this.height; |
1313 | | - |
1314 | | - this.showPlayer(); |
1315 | | - }, |
1316 | | - play:function() { |
1317 | | - // mw.log('pl eb play'); |
1318 | | - var _this = this.pc.pp; |
1319 | | - // check if we are already playing |
1320 | | - if ( !this.thumbnail_disp ) { |
1321 | | - this.pe_play(); |
1322 | | - return ''; |
1323 | | - } |
1324 | | - mv_lock_vid_updates = true; |
1325 | | - this.pe_play(); |
1326 | | - }, |
1327 | | - // do post interface operations |
1328 | | - postEmbedJS:function() { |
1329 | | - // add playlist clips (if plugin supports it) |
1330 | | - if ( this.pc.pp.cur_clip.embed.playlistSupport() ) |
1331 | | - this.pc.pp.loadEmbedPlaylist(); |
1332 | | - // setup hover images (for playhead and next/prev buttons) |
1333 | | - this.pc.pp.setUpHover(); |
1334 | | - // call the parent postEmbedJS |
1335 | | - this.pe_postEmbedJS(); |
1336 | | - mv_lock_vid_updates = false; |
1337 | | - }, |
1338 | | - getPlayButton:function() { |
1339 | | - return this.pe_getPlayButton( this.pc.pp.id ); |
1340 | | - }, |
1341 | | - setStatus:function( value ) { |
1342 | | - // status updates handled by playlist obj |
1343 | | - }, |
1344 | | - updatePlayHead:function( value ) { |
1345 | | - // updatePlayHead handled by playlist obj |
1346 | | - } |
1347 | | -} |
1348 | | - |
1349 | | -/* |
1350 | | - * m3u parse |
1351 | | - */ |
1352 | | -var m3uPlaylist = { |
1353 | | - doParse:function() { |
1354 | | - // for each line not # add as clip |
1355 | | - var inx = 0; |
1356 | | - var this_pl = this; |
1357 | | - // mw.log('data:'+ this.data.toString()); |
1358 | | - $j.each( this.data.split( "\n" ), function( i, n ) { |
1359 | | - // mw.log('on line '+i+' val:'+n+' len:'+n.length); |
1360 | | - if ( n.charAt( 0 ) != '#' ) { |
1361 | | - if ( n.length > 3 ) { |
1362 | | - // @@todo make sure its a valid url |
1363 | | - // mw.log('add url: '+i + ' '+ n); |
1364 | | - var cur_clip = new mvClip( { type:'srcClip', id:'p_' + this_pl.id + '_c_' + inx, pp:this_pl, src:n, order:inx } ); |
1365 | | - // setup the embed object |
1366 | | - cur_clip.setUpEmbedObj(); |
1367 | | - mw.log( 'm3uPlaylist len:' + thisClip.embed.mediaElement.sources.length ); |
1368 | | - this_pl.addCliptoTrack( cur_clip ); |
1369 | | - inx++; |
1370 | | - } |
1371 | | - } |
1372 | | - } ); |
1373 | | - return true; |
1374 | | - } |
1375 | | -} |
1376 | | - |
1377 | | -var itunesPlaylist = { |
1378 | | - doParse:function() { |
1379 | | - var properties = { title:'title', linkback:'link', |
1380 | | - author:'itunes:author', desc:'description', |
1381 | | - date:'pubDate' }; |
1382 | | - var tmpElm = null; |
1383 | | - for ( i in properties ) { |
1384 | | - tmpElm = this.data.getElementsByTagName( properties[i] )[0]; |
1385 | | - if ( tmpElm ) { |
1386 | | - this[i] = tmpElm.childNodes[0].nodeValue; |
1387 | | - // mw.log('set '+i+' to '+this[i]); |
1388 | | - } |
1389 | | - } |
1390 | | - // image src is nested in itunes rss: |
1391 | | - tmpElm = this.data.getElementsByTagName( 'image' )[0]; |
1392 | | - if ( tmpElm ) { |
1393 | | - imgElm = tmpElm.getElementsByTagName( 'url' )[0]; |
1394 | | - if ( imgElm ) { |
1395 | | - this.img = imgElm.childNodes[0].nodeValue; |
1396 | | - } |
1397 | | - } |
1398 | | - // get the clips: |
1399 | | - var clips = this.data.getElementsByTagName( "item" ); |
1400 | | - properties.src = 'guid'; |
1401 | | - for ( var i = 0; i < clips.length; i++ ) { |
1402 | | - var cur_clip = new mvClip( { type:'srcClip', id:'p_' + this.id + '_c_' + i, pp:this, order:i } ); |
1403 | | - for ( var j in properties ) { |
1404 | | - tmpElm = clips[i].getElementsByTagName( properties[j] )[0]; |
1405 | | - if ( tmpElm != null ) { |
1406 | | - cur_clip[j] = tmpElm.childNodes[0].nodeValue; |
1407 | | - // mw.log('set clip property: ' + j+' to '+cur_clip[j]); |
1408 | | - } |
1409 | | - } |
1410 | | - // image is nested |
1411 | | - tmpElm = clips[i].getElementsByTagName( 'image' )[0]; |
1412 | | - if ( tmpElm ) { |
1413 | | - imgElm = tmpElm.getElementsByTagName( 'url' )[0]; |
1414 | | - if ( imgElm ) { |
1415 | | - cur_clip.img = imgElm.childNodes[0].nodeValue; |
1416 | | - } |
1417 | | - } |
1418 | | - // set up the embed object now that all the values have been set |
1419 | | - cur_clip.setUpEmbedObj(); |
1420 | | - |
1421 | | - // add the current clip to the clip list |
1422 | | - this.addCliptoTrack( cur_clip ); |
1423 | | - } |
1424 | | - return true; |
1425 | | - } |
1426 | | -} |
1427 | | - |
1428 | | -/* |
1429 | | - * parse xsfp: |
1430 | | - * http://www.xspf.org/xspf-v1.html |
1431 | | - */ |
1432 | | -var xspfPlaylist = { |
1433 | | - doParse:function() { |
1434 | | - // mw.log('do xsfp parse: '+ this.data.innerHTML); |
1435 | | - var properties = { title:'title', linkback:'info', |
1436 | | - author:'creator', desc:'annotation', |
1437 | | - poster:'image', date:'date' }; |
1438 | | - var tmpElm = null; |
1439 | | - // get the first instance of any of the meta tags (ok that may be the meta on the first clip) |
1440 | | - // mw.log('do loop on properties:' + properties); |
1441 | | - for ( i in properties ) { |
1442 | | - mw.log( 'on property: ' + i ); |
1443 | | - tmpElm = this.data.getElementsByTagName( properties[i] )[0]; |
1444 | | - if ( tmpElm ) { |
1445 | | - if ( tmpElm.childNodes[0] ) { |
1446 | | - this[i] = tmpElm.childNodes[0].nodeValue; |
1447 | | - mw.log( 'set pl property: ' + i + ' to ' + this[i] ); |
1448 | | - } |
1449 | | - } |
1450 | | - } |
1451 | | - var clips = this.data.getElementsByTagName( "track" ); |
1452 | | - mw.log( 'found clips:' + clips.length ); |
1453 | | - // add any clip specific properties |
1454 | | - properties.src = 'location'; |
1455 | | - for ( var i = 0; i < clips.length; i++ ) { |
1456 | | - var cur_clip = new mvClip( { id:'p_' + this.id + '_c_' + i, pp:this, order:i } ); |
1457 | | - // mw.log('cur clip:'+ cur_clip.id); |
1458 | | - for ( var j in properties ) { |
1459 | | - tmpElm = clips[i].getElementsByTagName( properties[j] )[0]; |
1460 | | - if ( tmpElm != null ) { |
1461 | | - if ( tmpElm.childNodes.length != 0 ) { |
1462 | | - cur_clip[j] = tmpElm.childNodes[0].nodeValue; |
1463 | | - mw.log( 'set clip property: ' + j + ' to ' + cur_clip[j] ); |
1464 | | - } |
1465 | | - } |
1466 | | - } |
1467 | | - // add mvClip ref from info link: |
1468 | | - if ( cur_clip.linkback ) { |
1469 | | - // if mv linkback |
1470 | | - mvInx = 'Stream:'; |
1471 | | - mvclippos = cur_clip.linkback.indexOf( mvInx ); |
1472 | | - if ( mvclippos !== false ) { |
1473 | | - cur_clip.mvclip = cur_clip.linkback.substr( mvclippos + mvInx.length ); |
1474 | | - } |
1475 | | - } |
1476 | | - // set up the embed object now that all the values have been set |
1477 | | - cur_clip.setUpEmbedObj(); |
1478 | | - // add the current clip to the clip list |
1479 | | - this.addCliptoTrack( cur_clip ); |
1480 | | - } |
1481 | | - // mw.log('done with parse'); |
1482 | | - return true; |
1483 | | - } |
1484 | | -} |
1485 | | -/***************************** |
1486 | | - * SMIL CODE (could be put into another js file / lazy_loaded for improved basic playlist performance / modularity) |
1487 | | - *****************************/ |
1488 | | -/*playlist driver extensions to the playlist object*/ |
1489 | | -mw.PlayList.prototype.monitor = function() { |
1490 | | - var _this = this; |
1491 | | - // if paused stop updates |
1492 | | - if ( this.paused ) { |
1493 | | - return ; |
1494 | | - } |
1495 | | - |
1496 | | - // Update the playlist current time: |
1497 | | - var clipCurrentTime = ( this.cur_clip.embed.currentTime )? this.cur_clip.embed.currentTime: 0; |
1498 | | - this.currentTime = this.cur_clip.dur_offset + clipCurrentTime; |
1499 | | - |
1500 | | - // mw.log("pl check: " + this.currentTime + ' > '+this.getDuration()); |
1501 | | - // check if we should be done: |
1502 | | - if ( this.currentTime > this.getDuration() ) |
1503 | | - this.stop(); |
1504 | | - |
1505 | | - |
1506 | | - // Update slider: |
1507 | | - if ( !this.userSlide ) { |
1508 | | - this.setStatus( mw.seconds2npt( this.currentTime ) + '/' + mw.seconds2npt( this.getDuration() ) ); |
1509 | | - this.updatePlayHead( this.currentTime / this.getDuration() ); |
1510 | | - } |
1511 | | - |
1512 | | - //Update buffer info |
1513 | | - this.updateBufferStatus(); |
1514 | | - |
1515 | | - // pre-load any future clips: |
1516 | | - this.loadFutureClips(); |
1517 | | - |
1518 | | - // status updates are handled by children clips ... playlist mostly manages smil actions |
1519 | | - this.doSmilActions(); |
1520 | | - |
1521 | | - setTimeout( function() { |
1522 | | - _this.monitor(); |
1523 | | - }, 250); |
1524 | | -} |
1525 | | - |
1526 | | -// handles the rendering of overlays load of future clips (if necessary) |
1527 | | -// @@todo could be lazy loaded if necessary |
1528 | | -mw.PlayList.prototype.doSmilActions = function( callback ) { |
1529 | | - var _this = this; |
1530 | | - // mw.log('f:doSmilActions: ' + this.cur_clip.id + ' tid: ' + this.cur_clip.transOut ); |
1531 | | - var offSetTime = 0; // offset time should let us start a transition later on if we have to. |
1532 | | - var _clip = this.cur_clip; // setup a local pointer to cur_clip |
1533 | | - |
1534 | | - |
1535 | | - // do any smil time actions that may change the current clip |
1536 | | - if ( this.userSlide ) { |
1537 | | - // current clip set is updated mannually outside the scope of smil Actions |
1538 | | - } else { |
1539 | | - // Assume playing and go to next: |
1540 | | - if ( _clip.dur <= _clip.embed.currentTime |
1541 | | - && _clip.order != _clip.pp.getClipCount() - 1 ) { |
1542 | | - // force next clip |
1543 | | - mw.log( 'order:' + _clip.order + ' != count:' + ( _clip.pp.getClipCount() - 1 ) + |
1544 | | - ' smil dur: ' + _clip.dur + ' <= curTime: ' + _clip.embed.currentTime + ' go to next clip..' ); |
1545 | | - // do a _play next: |
1546 | | - _clip.pp.playNext(); |
1547 | | - } |
1548 | | - } |
1549 | | - // update/setup all transitions (will render current transition state) |
1550 | | - |
1551 | | - // process actions per transition types: |
1552 | | - _this.procTranType( 'transIn', callback); |
1553 | | - _this.procTranType( 'transOut', callback); |
1554 | | -} |
1555 | | - |
1556 | | -/* |
1557 | | -* procTranType |
1558 | | -* @param {string} tid the transition type [transIn|transOut] |
1559 | | -* @param {function} callback the callback function passed onto doUPdate |
1560 | | -*/ |
1561 | | -mw.PlayList.prototype.procTranType = function( tid, callback) { |
1562 | | - // Setup local clip pointer: |
1563 | | - var _clip = this.cur_clip; |
1564 | | - |
1565 | | - eval( 'var tObj = _clip.' + tid ); |
1566 | | - if ( !tObj ) |
1567 | | - return; |
1568 | | - // mw.log('f:doSmilActions: ' + _clip.id + ' tid:'+tObj.id + ' tclip_id:'+ tObj.pClip.id); |
1569 | | - // Check if we are in range: |
1570 | | - if ( tid == 'transIn' ) |
1571 | | - in_range = ( _clip.embed.currentTime <= tObj.dur ) ? true : false; |
1572 | | - |
1573 | | - if ( tid == 'transOut' ) |
1574 | | - in_range = ( _clip.embed.currentTime >= ( _clip.dur - tObj.dur ) ) ? true : false; |
1575 | | - |
1576 | | - if ( in_range ) { |
1577 | | - tObj.animation_state = 0; |
1578 | | - tObj.run_transition(); |
1579 | | - /*if ( this.userSlide || this.paused ) { |
1580 | | - if ( tid == 'transIn' ) { |
1581 | | - mvTransLib.doUpdate( tObj, |
1582 | | - ( _clip.embed.currentTime / tObj.dur ), |
1583 | | - callback ); |
1584 | | - } |
1585 | | - if ( tid == 'transOut' ) { |
1586 | | - mvTransLib.doUpdate( tObj, |
1587 | | - ( ( _clip.embed.currentTime - ( _clip.dur - tObj.dur ) ) / tObj.dur ), |
1588 | | - callback ); |
1589 | | - } |
1590 | | - } else if ( tObj.animation_state == 0 ) { |
1591 | | - mw.log( 'init/run_transition ' ); |
1592 | | - tObj.run_transition(); |
1593 | | - }*/ |
1594 | | - } else { |
1595 | | - // Close up transition if done & still onDispaly |
1596 | | - if ( tObj.overlay_selector_id ) { |
1597 | | - mw.log( 'close up transition :' + tObj.overlay_selector_id ); |
1598 | | - mvTransLib.doCloseTransition( tObj ); |
1599 | | - } |
1600 | | - } |
1601 | | - |
1602 | | - // Run the callback:: |
1603 | | - if( callback ) |
1604 | | - callback(); |
1605 | | -} |
1606 | | - |
1607 | | -/* |
1608 | | - * mvTransLib library of transitions |
1609 | | - * a single object called to initiate transition effects can easily be extended in separate js file |
1610 | | - * /mvTransLib is a all static object no instances of mvTransLib/ |
1611 | | - * (that way a limited feature set "sequence" need not include a _lot_ of js unless necessary ) |
1612 | | - * |
1613 | | - * Smil Transition Effects see: |
1614 | | - * http://www.w3.org/TR/SMIL3/smil-transitions.html#TransitionEffects-TransitionAttribute |
1615 | | - */ |
1616 | | -var mvTransLib = { |
1617 | | - /* |
1618 | | - * function doTransition lookups up the transition in the mvTransLib obj |
1619 | | - * and init the transition if its available |
1620 | | - * @param tObj transition attribute object |
1621 | | - * @param offSetTime default value 0 if we need to start rendering from a given time |
1622 | | - */ |
1623 | | - doInitTransition:function( tObj ) { |
1624 | | - //mw.log( 'mvTransLib:f:doInitTransition' ); |
1625 | | - if ( !tObj.type ) { |
1626 | | - mw.log( 'transition is missing type attribute' ); |
1627 | | - return false; |
1628 | | - } |
1629 | | - |
1630 | | - if ( !tObj.subtype ) { |
1631 | | - mw.log( 'transition is missing subtype attribute' ); |
1632 | | - return false; |
1633 | | - } |
1634 | | - |
1635 | | - if ( !this['type'][tObj.type] ) { |
1636 | | - mw.log( 'mvTransLib does not support type: ' + tObj.type ); |
1637 | | - return false; |
1638 | | - } |
1639 | | - |
1640 | | - if ( !this['type'][tObj.type][tObj.subtype] ) { |
1641 | | - mw.log( 'mvTransLib does not support subType: ' + tObj.subtype ); |
1642 | | - return false; |
1643 | | - } |
1644 | | - |
1645 | | - // setup overlay_selector_id |
1646 | | - if ( tObj.subtype == 'crossfade' ) { |
1647 | | - if ( tObj.transAttrType == 'transIn' ) |
1648 | | - var other_pClip = tObj.pClip.pp.getPrevClip(); |
1649 | | - if ( tObj.transAttrType == 'transOut' ) |
1650 | | - var other_pClip = tObj.pClip.pp.getNextClip(); |
1651 | | - |
1652 | | - if ( typeof( other_pClip ) == 'undefined' || other_pClip === false || other_pClip.id == tObj.pClip.pp.cur_clip.id ) |
1653 | | - mw.log( 'Error: crossfade without target media asset' ); |
1654 | | - // if not sliding start playback: |
1655 | | - if ( !tObj.pClip.pp.userSlide && !tObj.pClip.pp.paused) { |
1656 | | - other_pClip.embed.play(); |
1657 | | - }else{ |
1658 | | - //issue a load request: |
1659 | | - other_pClip.embed.load(); |
1660 | | - } |
1661 | | - // Manually ad the extra layer to the activeClipList |
1662 | | - tObj.pClip.pp.activeClipList.add( other_pClip ); |
1663 | | - tObj.overlay_selector_id = 'clipDesc_' + other_pClip.id; |
1664 | | - } else { |
1665 | | - tObj.overlay_selector_id = this.getOverlaySelector( tObj ); |
1666 | | - } |
1667 | | - |
1668 | | - // all good call function with tObj param |
1669 | | - //mw.log( 'should call: ' + tObj.type + ' ' + tObj.subtype ); |
1670 | | - this['type'][tObj.type][tObj.subtype].init( tObj ); |
1671 | | - }, |
1672 | | - doCloseTransition:function( tObj ) { |
1673 | | - if ( tObj.subtype == 'crossfade' ) { |
1674 | | - // close up crossfade |
1675 | | - mw.log( "close up crossfade" ); |
1676 | | - } else { |
1677 | | - $j( '#' + tObj.overlay_selector_id ).remove(); |
1678 | | - } |
1679 | | - // null selector: |
1680 | | - tObj.overlay_selector_id = null; |
1681 | | - }, |
1682 | | - getOverlaySelector:function( tObj ) { |
1683 | | - var overlay_selector_id = tObj.transAttrType + tObj.pClip.id; |
1684 | | - //mw.log( 'f:getOverlaySelector: ' + overlay_selector_id + ' append to: ' + '#videoPlayer_' + tObj.pClip.embed.id ); |
1685 | | - // make sure overlay_selector_id not already here: |
1686 | | - if ( $j( '#' + overlay_selector_id ).length == 0 ) { |
1687 | | - $j( '#' + tObj.pClip.embed.id ).prepend( '' + |
1688 | | - '<div id="' + overlay_selector_id + '" ' + |
1689 | | - 'style="position:absolute;top:0px;left:0px;' + |
1690 | | - 'height:' + parseInt( tObj.pClip.pp.height ) + 'px;' + |
1691 | | - 'width:' + parseInt( tObj.pClip.pp.width ) + 'px;' + |
1692 | | - 'z-index:2">' + |
1693 | | - '</div>' ); |
1694 | | - } |
1695 | | - return overlay_selector_id; |
1696 | | - }, |
1697 | | - |
1698 | | - doUpdate: function( tObj, percent, callback ) { |
1699 | | - // init the transition if necessary: |
1700 | | - if ( !tObj.overlay_selector_id ) |
1701 | | - this.doInitTransition( tObj ); |
1702 | | - |
1703 | | - // @@todo we should ensure viability outside of doUpate loop |
1704 | | - if ( !$j( '#' + tObj.overlay_selector_id ).is( ':visible' ) ) |
1705 | | - $j( '#' + tObj.overlay_selector_id ).show(); |
1706 | | - |
1707 | | - // do update: |
1708 | | - /* mw.log('doing update for: '+ tObj.pClip.id + |
1709 | | - ' type:' + tObj.transAttrType + |
1710 | | - ' t_type:'+ tObj.type + |
1711 | | - ' subypte:'+ tObj.subtype + |
1712 | | - ' percent:' + percent);*/ |
1713 | | - |
1714 | | - this[ 'type' ][ tObj.type ][ tObj.subtype ].u( tObj, percent, callback); |
1715 | | - }, |
1716 | | - // NOTE: transition images should be css based: |
1717 | | - getTransitionIcon:function( type, subtype ) { |
1718 | | - return mw.getMwEmbedPath() + '/modules/Sequencer/css/transition_images/' + type + '_' + subtype + '.png'; |
1719 | | - }, |
1720 | | - |
1721 | | - /** |
1722 | | - * mvTransLib: functional library mapping: |
1723 | | - */ |
1724 | | - type: { |
1725 | | - // Types: |
1726 | | - fade: { |
1727 | | - fadeFromColor: { |
1728 | | - 'attr' : ['fadeColor'], |
1729 | | - 'init' : function( tObj ) { |
1730 | | - //mw.log('f:fadeFromColor: '+tObj.overlay_selector_id +' to color: '+ tObj.fadeColor); |
1731 | | - if ( !tObj.fadeColor ) |
1732 | | - mw.log( 'missing fadeColor' ); |
1733 | | - if ( $j( '#' + tObj.overlay_selector_id ).length == 0 ) { |
1734 | | - mw.log( "ERROR can't find: " + tObj.overlay_selector_id ); |
1735 | | - } |
1736 | | - // set the initial state |
1737 | | - $j( '#' + tObj.overlay_selector_id ).css( { |
1738 | | - 'background-color':tObj.fadeColor, |
1739 | | - 'opacity':"1" |
1740 | | - } ); |
1741 | | - }, |
1742 | | - 'u' : function( tObj, percent ) { |
1743 | | - // mw.log(':fadeFromColor:update: '+ percent); |
1744 | | - // fade from color (invert the percent) |
1745 | | - var percent = 1 - percent; |
1746 | | - $j( '#' + tObj.overlay_selector_id ).css( { |
1747 | | - "opacity" : percent |
1748 | | - } ); |
1749 | | - } |
1750 | | - }, |
1751 | | - // corssFade |
1752 | | - crossfade: { |
1753 | | - "attr" : [], |
1754 | | - "init" : function( tObj ) { |
1755 | | - //mw.log( 'f:crossfade: ' + tObj.overlay_selector_id ); |
1756 | | - if ( $j( '#' + tObj.overlay_selector_id ).length == 0 ) |
1757 | | - mw.log( "ERROR overlay selector not found: " + tObj.overlay_selector_id ); |
1758 | | - |
1759 | | - // set the initial state show the zero opacity animation |
1760 | | - $j( '#' + tObj.overlay_selector_id ).css( { 'opacity':0 } ).show(); |
1761 | | - }, |
1762 | | - 'u':function( tObj, percent ) { |
1763 | | - // Do the relative seek: |
1764 | | - $j( '#' + tObj.overlay_selector_id ).css( { |
1765 | | - "opacity" : percent |
1766 | | - } ); |
1767 | | - } |
1768 | | - } |
1769 | | - } |
1770 | | - } |
1771 | | -} |
1772 | | - |
1773 | | -/** |
1774 | | - * Object to manage embedding html with smil timings |
1775 | | - * grabs settings from parent clip |
1776 | | - */ |
1777 | | -var transitionObj = function( element ) { |
1778 | | - this.init( element ); |
1779 | | -}; |
1780 | | -transitionObj.prototype = { |
1781 | | - supported_attributes : new Array( |
1782 | | - 'id', |
1783 | | - 'type', |
1784 | | - 'subtype', |
1785 | | - 'fadeColor', |
1786 | | - 'dur' |
1787 | | - ), |
1788 | | - transAttrType:null, // transIn or transOut |
1789 | | - overlay_selector_id:null, |
1790 | | - pClip:null, |
1791 | | - timerId:null, |
1792 | | - animation_state:0, // can be 0=unset, 1=running, 2=done |
1793 | | - // inter-intervalCount for animating between time updates |
1794 | | - interValCount:0, |
1795 | | - dur:2, // default duration of 2 |
1796 | | - init:function( element ) { |
1797 | | - // load supported attributes: |
1798 | | - var _this = this; |
1799 | | - $j.each( this.supported_attributes, function( i, attr ) { |
1800 | | - if ( element.getAttribute( attr ) ) |
1801 | | - _this[attr] = element.getAttribute( attr ); |
1802 | | - } ); |
1803 | | - // @@todo process duration (for now just strip s) per: |
1804 | | - // http://www.w3.org/TR/SMIL3/smil-timing.html#Timing-ClockValueSyntax |
1805 | | - if ( _this.dur ) |
1806 | | - _this.dur = smilParseTime( _this.dur ); |
1807 | | - }, |
1808 | | - /* |
1809 | | - * returns a visual representation of the transition |
1810 | | - */ |
1811 | | - getIconSrc:function( opt ) { |
1812 | | - // @@todo support some arguments |
1813 | | - return mvTransLib.getTransitionIcon( this.type, this.subtype ); |
1814 | | - }, |
1815 | | - getDuration:function() { |
1816 | | - return this.dur; |
1817 | | - }, |
1818 | | - // returns the values of supported_attributes: |
1819 | | - getAttributeObj:function() { |
1820 | | - var elmObj = { }; |
1821 | | - for ( var i in this.supported_attributes ) { |
1822 | | - var attr = this.supported_attributes[i]; |
1823 | | - if ( this[ attr ] ) |
1824 | | - elmObj[ attr ] = this[ attr ]; |
1825 | | - } |
1826 | | - return elmObj; |
1827 | | - }, |
1828 | | - |
1829 | | - /** |
1830 | | - * Main animation loop called every MV_ANIMATION_CB_RATE or 34ms ~around 30frames per second~ |
1831 | | - */ |
1832 | | - run_transition: function() { |
1833 | | - _this = this; |
1834 | | - // If we have the playerElement update the time per run_transition call |
1835 | | - if ( this.pClip.embed.playerElement && this.pClip.embed.playerElement.currentTime ) { |
1836 | | - this.pClip.embed.currentTime = this.pClip.embed.playerElement.currentTime; |
1837 | | - } |
1838 | | - |
1839 | | - // }else{ |
1840 | | - // relay on currentTime update grabs (every 250ms or so) (ie for images) |
1841 | | - // if(this.prev_curtime!=this.pClip.embed.currentTime) { |
1842 | | - // this.prev_curtime = this.pClip.embed.currentTime; |
1843 | | - // this.interValCount=0; |
1844 | | - // } |
1845 | | - // } |
1846 | | - |
1847 | | - // start_time =assigned by doSmilActions |
1848 | | - // base_cur_time = pClip.embed.currentTime; |
1849 | | - // dur = assigned by attribute |
1850 | | - if ( this.animation_state == 0 ) { |
1851 | | - mvTransLib.doInitTransition( this ); |
1852 | | - this.animation_state = 1; |
1853 | | - } |
1854 | | - |
1855 | | - if( this.transAttrType=='transIn' ) { |
1856 | | - var percentage = ( this.pClip.embed.currentTime / this.dur ) ; |
1857 | | - } |
1858 | | - |
1859 | | - if( this.transAttrType=='transOut' ) { |
1860 | | - var percentage = ( this.pClip.embed.currentTime - |
1861 | | - (this.pClip.dur - this.dur) |
1862 | | - ) |
1863 | | - / this.dur ; |
1864 | | - } |
1865 | | - // mw.log('cur percentage of transition: '+percentage); |
1866 | | - // update state based on current time + cur_time_offset (for now just use pClip.embed.currentTime) |
1867 | | - mvTransLib.doUpdate( this, percentage ); |
1868 | | - |
1869 | | - if ( percentage >= 1 ) { |
1870 | | - //mw.log( "transition done update with percentage " + percentage ); |
1871 | | - this.animation_state = 2; |
1872 | | - mvTransLib.doCloseTransition( this ) |
1873 | | - return true; |
1874 | | - } |
1875 | | - |
1876 | | - // run the animation ( animation_state == 1 && not "paused") |
1877 | | - if( !this.pClip.pp.paused ) { |
1878 | | - setTimeout( function() { |
1879 | | - _this.run_transition(); |
1880 | | - }, MV_ANIMATION_CB_RATE); |
1881 | | - } |
1882 | | - return true; |
1883 | | - }, |
1884 | | - clone :function() { |
1885 | | - var cObj = new this.constructor(); |
1886 | | - for ( var i in this ) |
1887 | | - cObj[i] = this[i]; |
1888 | | - return cObj; |
1889 | | - } |
1890 | | -} |
1891 | | - |
1892 | | -// very limited smile feature set more details soon: |
1893 | | -// region="video_region" transIn="fromGreen" begin="2s" |
1894 | | -// http://www.w3.org/TR/2007/WD-SMIL3-20070713/smil-extended-media-object.html#edef-ref |
1895 | | -var smilPlaylist = { |
1896 | | - transitions: { }, |
1897 | | - doParse:function() { |
1898 | | - var _this = this; |
1899 | | - mw.log( 'f:doParse smilPlaylist' ); |
1900 | | - // @@todo get/parse meta that we are interested in: |
1901 | | - var meta_tags = this.data.getElementsByTagName( 'meta' ); |
1902 | | - var metaNames = { |
1903 | | - 'title':'', |
1904 | | - 'interface_url':"", |
1905 | | - 'linkback':"", |
1906 | | - 'mTitle':"", |
1907 | | - 'mTalk':"", |
1908 | | - 'mTouchedTime':"" |
1909 | | - }; |
1910 | | - $j.each( meta_tags, function( i, meta_elm ) { |
1911 | | - // mw.log( "on META tag: "+ $j(meta_elm).attr('name') ); |
1912 | | - if ( $j( meta_elm ).attr( 'name' ) in metaNames ) { |
1913 | | - _this[ $j( meta_elm ).attr( 'name' ) ] = $j( meta_elm ).attr( 'content' ); |
1914 | | - } |
1915 | | - // Special check for wikiDesc |
1916 | | - if ( $j( meta_elm ).attr( 'name' ) == 'wikiDesc' ) { |
1917 | | - if ( meta_elm.firstChild ) |
1918 | | - _this.wikiDesc = meta_elm.firstChild.nodeValue; |
1919 | | - } |
1920 | | - } ); |
1921 | | - // Add transition objects: |
1922 | | - var transition_tags = this.data.getElementsByTagName( 'transition' ); |
1923 | | - $j.each( transition_tags, function( i, trans_elm ) { |
1924 | | - if ( $j( trans_elm ).attr( "id" ) ) { |
1925 | | - _this.transitions[ $j( trans_elm ).attr( "id" )] = new transitionObj( trans_elm ); |
1926 | | - } else { |
1927 | | - mw.log( 'skipping transition: (missing id) ' + trans_elm ); |
1928 | | - } |
1929 | | - } ); |
1930 | | - mw.log( 'loaded transitions:' + _this.transitions ); |
1931 | | - |
1932 | | - // Add seq (latter we will have support more than one seq tag) / more than one "track" |
1933 | | - var seq_tags = this.data.getElementsByTagName( 'seq' ); |
1934 | | - $j.each( seq_tags, function( i, seq_elm ) { |
1935 | | - var inx = 0; |
1936 | | - // get all the clips for the given seq: |
1937 | | - $j.each( seq_elm.childNodes, function( i, mediaElement ) { |
1938 | | - // ~complex~ @@todo to handle a lot like "switch" "region" etc |
1939 | | - // mw.log('process: ' + mediaElemnt.tagName); |
1940 | | - if ( typeof mediaElement.tagName != 'undefined' ) { |
1941 | | - if ( _this.tryAddMedia( mediaElement, inx ) ) { |
1942 | | - inx++; |
1943 | | - } |
1944 | | - } |
1945 | | - } ); |
1946 | | - } ); |
1947 | | - mw.log( "done proc seq tags" ); |
1948 | | - return true; |
1949 | | - }, |
1950 | | - tryAddMediaObj:function( mConfig, order, track_id ) { |
1951 | | - mw.log( 'tryAddMediaObj::' ); |
1952 | | - var mediaElement = document.createElement( 'div' ); |
1953 | | - for ( var i = 0; i < mv_smil_ref_supported_attributes.length; i++ ) { |
1954 | | - var attr = mv_smil_ref_supported_attributes[i]; |
1955 | | - if ( mConfig[attr] ) |
1956 | | - $j( mediaElement ).attr( attr, mConfig[attr] ); |
1957 | | - } |
1958 | | - this.tryAddMedia( mediaElement, order, track_id ); |
1959 | | - }, |
1960 | | - tryAddMedia:function( mediaElement, order, track_id ) { |
1961 | | - mw.log( 'SMIL:tryAddMedia:' + mediaElement ); |
1962 | | - |
1963 | | - var _this = this; |
1964 | | - // Set up basic mvSMILClip send it the mediaElemnt & mvClip init: |
1965 | | - var clipObj = { }; |
1966 | | - var cConfig = { |
1967 | | - "id" : 'p_' + _this.id + '_c_' + order, |
1968 | | - "pp" : this, // set the parent playlist object pointer |
1969 | | - "order" : order |
1970 | | - }; |
1971 | | - var clipObj = new mvSMILClip( mediaElement, cConfig ); |
1972 | | - |
1973 | | - // set optional params track |
1974 | | - if ( typeof track_id != 'undefined' ) |
1975 | | - clipObj["track_id"] = track_id; |
1976 | | - |
1977 | | - |
1978 | | - if ( clipObj ) { |
1979 | | - // set up embed: |
1980 | | - clipObj.setUpEmbedObj(); |
1981 | | - // Check for player sources: |
1982 | | - clipObj.embed.checkPlayerSources(); |
1983 | | - // add clip to track: |
1984 | | - this.addCliptoTrack( clipObj , order ); |
1985 | | - |
1986 | | - return true; |
1987 | | - } |
1988 | | - return false; |
1989 | | - } |
1990 | | -} |
1991 | | -// http://www.w3.org/TR/2007/WD-SMIL3-20070713/smil-extended-media-object.html#smilMediaNS-BasicMedia |
1992 | | -// and added resource description elements |
1993 | | -// @@ supporting the "ID" attribute turns out to be kind of tricky since we use it internally |
1994 | | -// (for now don't include) |
1995 | | -var mv_smil_ref_supported_attributes = new Array( |
1996 | | - 'src', |
1997 | | - 'type', |
1998 | | - 'region', |
1999 | | - 'transIn', |
2000 | | - 'transOut', |
2001 | | - 'fill', |
2002 | | - 'dur', |
2003 | | - 'title', |
2004 | | - // some custom attributes: |
2005 | | - 'uri', |
2006 | | - 'durationHint', |
2007 | | - 'poster' |
2008 | | -); |
2009 | | -/* extension to mvClip to support smil properties */ |
2010 | | -var mvSMILClip = function( sClipElm, mvClipInit ) { |
2011 | | - return this.init( sClipElm, mvClipInit ); |
2012 | | -} |
2013 | | -// all the overwritten and new methods for SMIL extension of mwEmbed |
2014 | | -mvSMILClip.prototype = { |
2015 | | - instanceOf:'mvSMILClip', |
2016 | | - params : { }, // support param as child of ref clips per SMIL spec |
2017 | | - init:function( sClipElm, mvClipInit ) { |
2018 | | - _this = this; |
2019 | | - this.params = { }; |
2020 | | - // make new mvCLip with ClipInit vals |
2021 | | - var myMvClip = new mvClip( mvClipInit ); |
2022 | | - // inherit mvClip |
2023 | | - for ( var method in myMvClip ) { |
2024 | | - if ( typeof this[method] != 'undefined' ) { |
2025 | | - this['parent_' + method] = myMvClip[method]; |
2026 | | - } else { |
2027 | | - this[method] = myMvClip[method]; |
2028 | | - } |
2029 | | - } |
2030 | | - |
2031 | | - // get supported media attr init non-set |
2032 | | - for ( var i = 0; i < mv_smil_ref_supported_attributes.length; i++ ) { |
2033 | | - var attr = mv_smil_ref_supported_attributes[i]; |
2034 | | - if ( $j( sClipElm ).attr( attr ) ) { |
2035 | | - _this[attr] = $j( sClipElm ).attr( attr ); |
2036 | | - } |
2037 | | - } |
2038 | | - this['tagName'] = sClipElm.tagName; |
2039 | | - |
2040 | | - // Fix url paths (if needed) |
2041 | | - if( _this['src'] && _this.src.indexOf('/') != 0 && _this.src.indexOf('://') === -1) |
2042 | | - _this['src'] = mw.absoluteUrl( _this['src'], mvClipInit.pp.getSrc() ); |
2043 | | - |
2044 | | - if ( sClipElm.firstChild ) { |
2045 | | - this['wholeText'] = sClipElm.firstChild.nodeValue; |
2046 | | - mw.log( "SET wholeText for: " + this['tagName'] + ' ' + this['wholeText'] ); |
2047 | | - } |
2048 | | - // debugger; |
2049 | | - // mwEmbed specific property: |
2050 | | - if ( $j( sClipElm ).attr( 'poster' ) ) |
2051 | | - this['img'] = $j( sClipElm ).attr( 'poster' ); |
2052 | | - |
2053 | | - // lookup and assign copies of transitions |
2054 | | - // (since transition needs to hold some per-instance state info) |
2055 | | - if ( this.transIn && this.pp.transitions[ this.transIn ] ) { |
2056 | | - this.transIn = this.pp.transitions[ this.transIn ]. clone (); |
2057 | | - this.transIn.pClip = _this; |
2058 | | - this.transIn.transAttrType = 'transIn'; |
2059 | | - } |
2060 | | - |
2061 | | - if ( this.transOut && this.pp.transitions[ this.transOut ] ) { |
2062 | | - this.transOut = this.pp.transitions[ this.transOut ]. clone (); |
2063 | | - this.transOut.pClip = _this; |
2064 | | - this.transOut.transAttrType = 'transOut'; |
2065 | | - } |
2066 | | - // parse duration / begin times: |
2067 | | - if ( this.dur ) |
2068 | | - this.dur = smilParseTime( this.dur ); |
2069 | | - |
2070 | | - // parse the media duration hint ( the source media length) |
2071 | | - if ( this.durationHint ) |
2072 | | - this.durationHint = smilParseTime( this.durationHint ); |
2073 | | - |
2074 | | - // conform type to vido/ogg: |
2075 | | - if ( this.type == 'application/ogg' ) |
2076 | | - this.type = 'video/ogg'; // conform to 'video/ogg' type |
2077 | | - |
2078 | | - // if unset type and we have innerHTML assume text/html type |
2079 | | - if ( !this.type && this.wholeText ) { |
2080 | | - this.type = 'text/html'; |
2081 | | - } |
2082 | | - // Also grab any child param elements if present: |
2083 | | - if ( sClipElm.getElementsByTagName( 'param' )[0] ) { |
2084 | | - for ( var i = 0; i < sClipElm.getElementsByTagName( 'param' ).length; i++ ) { |
2085 | | - this.params[ sClipElm.getElementsByTagName( 'param' )[i].getAttribute( "name" ) ] = |
2086 | | - sClipElm.getElementsByTagName( 'param' )[i].firstChild.nodeValue; |
2087 | | - } |
2088 | | - } |
2089 | | - return this; |
2090 | | - }, |
2091 | | - /** |
2092 | | - * Returns the values of supported_attributes: |
2093 | | - */ |
2094 | | - getAttributeObj:function() { |
2095 | | - var elmObj = { }; |
2096 | | - for ( var i = 0; i < mv_smil_ref_supported_attributes.length; i++ ) { |
2097 | | - var attr = mv_smil_ref_supported_attributes[i]; |
2098 | | - if ( this[attr] ) |
2099 | | - elmObj[ attr ] = this[attr]; |
2100 | | - } |
2101 | | - return elmObj; |
2102 | | - }, |
2103 | | - /* |
2104 | | - * getDuration |
2105 | | - * @returns duration in int |
2106 | | - */ |
2107 | | - getDuration:function() { |
2108 | | - // check for smil dur: |
2109 | | - if ( this.dur ) |
2110 | | - return this.dur; |
2111 | | - return this.embed.getDuration(); |
2112 | | - }, |
2113 | | - // Get the duration of the clip subracting transitions |
2114 | | - getSoloDuration:function() { |
2115 | | - var fulldur = this.getDuration(); |
2116 | | - // see if we need to subtract from time eating transitions (transOut) |
2117 | | - if ( this.transOut ) |
2118 | | - fulldur -= this.transOut.getDuration(); |
2119 | | - |
2120 | | - // mw.log("getSoloDuration:: td: " + this.getDuration() + ' sd:' + fulldur); |
2121 | | - return fulldur; |
2122 | | - }, |
2123 | | - // Get the duration of the original media asset (usefull for bounding setting of in-out-points) |
2124 | | - getSourceDuration:function() { |
2125 | | - if ( this.durationHint ) |
2126 | | - return this.durationHint; |
2127 | | - // if we have no source duration just return the media dur: |
2128 | | - return this.getDuration(); |
2129 | | - } |
2130 | | -} |
2131 | | -/* |
2132 | | - * takes an input |
2133 | | - * @time_str input time string |
2134 | | - * returns time in seconds |
2135 | | - * |
2136 | | - * @@todo process duration (for now just srip s) per: |
2137 | | - * http://www.w3.org/TR/SMIL3/smil-timing.html#Timing-ClockValueSyntax |
2138 | | - * (probably have to use a Time object to fully support the smil spec |
2139 | | - */ |
2140 | | -function smilParseTime( time_str ) { |
2141 | | - time_str = time_str + ''; |
2142 | | - // first check for hh:mm:ss time: |
2143 | | - if ( time_str.split( ':' ).length == 3 ) { |
2144 | | - return mw.npt2seconds( time_str ); |
2145 | | - } else { |
2146 | | - // assume 34s secconds representation |
2147 | | - return parseInt( time_str.replace( 's', '' ) ); |
2148 | | - } |
2149 | | -} |
2150 | | -// stores a list pointers to active clips (maybe this should just be a property of clips (but results in lots of seeks) |
2151 | | -var activeClipList = function() { |
2152 | | - return this.init(); |
2153 | | -} |
2154 | | -activeClipList.prototype = { |
2155 | | - init:function() { |
2156 | | - this.clipList = new Array(); |
2157 | | - }, |
2158 | | - add:function( clip ) { |
2159 | | - // make sure the clip is not already active: |
2160 | | - for ( var i = 0; i < this.clipList.lenght; i++ ) { |
2161 | | - var active_clip = this.clipList[i]; |
2162 | | - if ( clip.id == active_clip.id ) // clip already active: |
2163 | | - return false; |
2164 | | - } |
2165 | | - this.clipList.push( clip ); |
2166 | | - return true; |
2167 | | - }, |
2168 | | - remove:function( clip ) { |
2169 | | - for ( var i = 0; i < this.clipList.length; i++ ) { |
2170 | | - var active_clip = this.clipList[i]; |
2171 | | - if ( clip.id == active_clip.id ) { |
2172 | | - this.clipList.splice( i, 1 ); |
2173 | | - return true; |
2174 | | - } |
2175 | | - } |
2176 | | - return false; |
2177 | | - }, |
2178 | | - getClipList:function() { |
2179 | | - return this.clipList; |
2180 | | - } |
2181 | | -} |
2182 | | -var trackObj = function( iObj ) { |
2183 | | - return this.init( iObj ); |
2184 | | -} |
2185 | | - var supported_track_attr = |
2186 | | -trackObj.prototype = { |
2187 | | - // should be something like "seq" per SMIL spec |
2188 | | - // http://www.w3.org/TR/SMIL3/smil-timing.html#edef-seq |
2189 | | - // but we don't really support anywhere near the full concept of seq containers yet either |
2190 | | - supported_attributes: new Array( |
2191 | | - 'title', |
2192 | | - 'desc', |
2193 | | - 'inx' |
2194 | | - ), |
2195 | | - disp_mode:'timeline_thumb', |
2196 | | - init : function( iObj ) { |
2197 | | - if ( !iObj ) |
2198 | | - iObj = { }; |
2199 | | - // make sure clips is new: |
2200 | | - this.clips = new Array(); |
2201 | | - |
2202 | | - var _this = this; |
2203 | | - $j.each( this.supported_attributes, function( i, attr ) { |
2204 | | - if ( iObj[attr] ) |
2205 | | - _this[attr] = iObj[attr]; |
2206 | | - } ); |
2207 | | - }, |
2208 | | - // returns the values of supported_attributes: |
2209 | | - getAttributeObj:function() { |
2210 | | - var elmObj = { }; |
2211 | | - for ( var i in this.supported_attributes ) { |
2212 | | - var attr = this.supported_attributes[i]; |
2213 | | - if ( this[attr] ) |
2214 | | - elmObj[ attr ] = this[attr]; |
2215 | | - } |
2216 | | - return elmObj; |
2217 | | - }, |
2218 | | - addClip:function( clipObj, pos ) { |
2219 | | - mw.log( 'pl_Track: AddClip at:' + pos + ' clen: ' + this.clips.length ); |
2220 | | - if ( typeof pos == 'undefined' ) |
2221 | | - pos = this.clips.length; |
2222 | | - // get everything after pos |
2223 | | - this.clips.splice( pos, 0, clipObj ); |
2224 | | - // keep the clip order values accurate: |
2225 | | - this.reOrderClips(); |
2226 | | - mw.log( "did add now cLen: " + this.clips.length ); |
2227 | | - }, |
2228 | | - getClip:function( inx ) { |
2229 | | - if ( !this.clips[inx] ) |
2230 | | - return false; |
2231 | | - return this.clips[inx]; |
2232 | | - }, |
2233 | | - reOrderClips:function() { |
2234 | | - for ( var k in this.clips ) { |
2235 | | - this.clips[k].order = k; |
2236 | | - } |
2237 | | - }, |
2238 | | - getClipCount:function() { |
2239 | | - return this.clips.length; |
2240 | | - }, |
2241 | | - inheritEmbedPlayer: function() { |
2242 | | - $j.each( this.clips, function( i, clip ) { |
2243 | | - clip.embed.inheritEmbedPlayer(); |
2244 | | - } ); |
2245 | | - } |
2246 | | -}; |
2247 | | - |
2248 | | -/* utility functions |
2249 | | - * (could be combined with other stuff) |
2250 | | -*/ |
2251 | | -function getAbsolutePos( objectId ) { |
2252 | | - // Get an object left position from the upper left viewport corner |
2253 | | - o = document.getElementById( objectId ); |
2254 | | - oLeft = o.offsetLeft; // Get left position from the parent object |
2255 | | - while ( o.offsetParent != null ) { // Parse the parent hierarchy up to the document element |
2256 | | - oParent = o.offsetParent // Get parent object reference |
2257 | | - oLeft += oParent.offsetLeft // Add parent left position |
2258 | | - o = oParent |
2259 | | - } |
2260 | | - o = document.getElementById( objectId ); |
2261 | | - oTop = o.offsetTop; |
2262 | | - while ( o.offsetParent != null ) { // Parse the parent hierarchy up to the document element |
2263 | | - oParent = o.offsetParent // Get parent object reference |
2264 | | - oTop += oParent.offsetTop // Add parent top position |
2265 | | - o = oParent |
2266 | | - } |
2267 | | - return { x:oLeft, y:oTop }; |
2268 | | -} |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/tests/Sequence_Editor.html |
— | — | @@ -1,42 +0,0 @@ |
2 | | -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
3 | | -"http://www.w3.org/TR/html4/loose.dtd"> |
4 | | -<html> |
5 | | -<head> |
6 | | - <title>SMIL Sequence Editor example</title> |
7 | | - <script type="text/javascript" src="../../../mwEmbed.js?debug=true"></script> |
8 | | - <script type="text/javascript"> |
9 | | - mw.ready(function(){ |
10 | | - mw.load( 'Sequencer', function(){ |
11 | | - $j('#seqcontainer').sequencer({ |
12 | | - 'smilSource':'SampleEditorSequenceSmil.xml', |
13 | | - //set the add media wizard to only include commons: |
14 | | - 'amw_conf':{ |
15 | | - 'enabled_providers':[ 'wiki_commons', 'kaltura', 'archive_org', 'flickr', 'metavid' ], |
16 | | - 'import_url_mode' : 'remote_link', |
17 | | - 'default_query' : 'fish' |
18 | | - } |
19 | | - }); |
20 | | - }); |
21 | | - }); |
22 | | - </script> |
23 | | -<style> |
24 | | - body { |
25 | | - font: x-small sans-serif; |
26 | | - color: black; |
27 | | - margin: 0; |
28 | | - padding: 0; |
29 | | - } |
30 | | - img { |
31 | | - border:medium none; |
32 | | - } |
33 | | -</style> |
34 | | - |
35 | | -</head> |
36 | | -<body> |
37 | | - <div id="seqcontainer" style="position:absolute;top:5px;bottom:10px;left:10px;right:10px;"> |
38 | | - Loading sequence editor ... |
39 | | - </div> |
40 | | - |
41 | | - </body> |
42 | | -</html> |
43 | | - |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/tests/VideoRender.xml |
— | — | @@ -1,89 +0,0 @@ |
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/SequenceOld/tests/VideoRender.html |
— | — | @@ -1,72 +0,0 @@ |
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> |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/css/mw.style.SequenceEdit.css |
— | — | @@ -1,206 +0,0 @@ |
2 | | -/* the css file for sequence styles */ |
3 | | -.mv_head_jump{ |
4 | | - font-family:"verdana","helvetica","arial",sans-serif; |
5 | | - font-size:11px; |
6 | | - background:#CCCCCC; |
7 | | - z-index:1; |
8 | | -} |
9 | | -.mv_playline{ |
10 | | - position:absolute; |
11 | | - background:gray; |
12 | | - top:20px; |
13 | | - left:0px; |
14 | | - width:2px; |
15 | | - bottom:0px; |
16 | | - z-index:10; |
17 | | - overflow:visible; |
18 | | -} |
19 | | -.mv_playline_top{ |
20 | | - position:absolute; |
21 | | - top:-5px; |
22 | | - left:-7px; |
23 | | - width:16px; |
24 | | - height:16px; |
25 | | - background:url("images/opened.png"); |
26 | | -} |
27 | | -.mv_story_playline{ |
28 | | - position:absolute; |
29 | | - background:blue; |
30 | | - top:0px; |
31 | | - left:0px; |
32 | | - width:2px; |
33 | | - height:100%; |
34 | | - bottom:0px; |
35 | | - z-index:10; |
36 | | - overflow:visible; |
37 | | -} |
38 | | -.mv_seq_tracks{ |
39 | | - position:absolute;left:90px;top:0px;right:12px;bottom:0px;overflow:auto; |
40 | | -} |
41 | | -.mv_tl_left_cnt{ |
42 | | - position:absolute; |
43 | | - top:0px; |
44 | | - left:0px; |
45 | | - bottom:0px; |
46 | | - width:85px; |
47 | | -} |
48 | | -.track_name{ |
49 | | - font-family:"verdana","helvetica","arial",sans-serif; |
50 | | - font-size:12px; |
51 | | - width:85px; |
52 | | - position:absolute; |
53 | | - background:#CCCCCC; |
54 | | -} |
55 | | -.container_track{ |
56 | | - position:absolute; |
57 | | - border:solid thin gray; |
58 | | - |
59 | | -} |
60 | | -/**************************/ |
61 | | -.clip_img{ |
62 | | - } |
63 | | -.clip_edit_button{ |
64 | | - width:16px; |
65 | | - height:16px; |
66 | | - position:absolute; |
67 | | - top:0px; |
68 | | - right:50px; |
69 | | - cursor:pointer; |
70 | | -} |
71 | | -.clip_trans_box{ |
72 | | - border:solid thin black; |
73 | | - width:32px; |
74 | | - height:32px; |
75 | | - position:absolute; |
76 | | - top:27px; |
77 | | - right:15px; |
78 | | -} |
79 | | - |
80 | | -.clip_edit_base{ |
81 | | - background: url("images/uni_edit_bw.png"); |
82 | | -} |
83 | | -.clip_edit_over{ |
84 | | - background: url('images/uni_edit_color.png'); |
85 | | -} |
86 | | -.mv_time_clip_text{ |
87 | | - font-family:"verdana","helvetica","arial",sans-serif; |
88 | | - font-size:12px; |
89 | | -} |
90 | | -.mv_clip_cnt{ |
91 | | - position:absolute; |
92 | | - width:16px; |
93 | | - height:16px; |
94 | | -} |
95 | | - |
96 | | -.ui-drag-e{ cursor: e-resize;} |
97 | | -.ui-drag-w{ cursor: w-resize;} |
98 | | - |
99 | | -.mv_clip_stats{ |
100 | | - font-family:"verdana","helvetica","arial",sans-serif; |
101 | | - font-size:11px; |
102 | | - position:absolute; |
103 | | - background:#CCCCCC; |
104 | | - bottom:0px; |
105 | | - right:0px; |
106 | | -} |
107 | | -.mv_droppable{ |
108 | | - position:absolute; |
109 | | - top:0px; |
110 | | - z-index:-1; |
111 | | -} |
112 | | -.mv_storyboard_container{ |
113 | | - position:absolute; |
114 | | - z-index:0; |
115 | | - overflow:hidden; |
116 | | -} |
117 | | -.mv_clip_thumb{ |
118 | | - position:absolute; |
119 | | - top:7px; |
120 | | - border:solid #CCC; |
121 | | - display:block; |
122 | | - overflow:hidden; |
123 | | -} |
124 | | -.mv_tl_clip{ |
125 | | - position:absolute; |
126 | | - z-index:0; |
127 | | - overflow:hidden; |
128 | | - border:solid thin white; |
129 | | - white-space: nowrap; |
130 | | -} |
131 | | -.mv_tl_thumb{ |
132 | | - display:inline; |
133 | | -} |
134 | | -.mv_selected_clip{ |
135 | | - border:solid #9F9; |
136 | | -} |
137 | | -.mv_selected_transition{ |
138 | | - border:solid #9F9; |
139 | | -} |
140 | | -.mv_adj_text{ |
141 | | - font-weight: strong; |
142 | | - font-size:small; |
143 | | - color:#6F6; |
144 | | - display:none; /* hide by default */ |
145 | | - position:absolute; |
146 | | - left:20px; |
147 | | -} |
148 | | -.mv_adjust_click{ |
149 | | - cursor:pointer; |
150 | | -} |
151 | | -/* |
152 | | -#seq_menu{ |
153 | | - list-style-type:none; |
154 | | - list-style-position:outside; |
155 | | - display:block; |
156 | | - padding-left:10px; |
157 | | -} |
158 | | -#seq_menu li{ |
159 | | - display:inline; |
160 | | - padding:5px; |
161 | | - margin:0px; |
162 | | - border: solid thin gray; |
163 | | - cursor:pointer; |
164 | | -} |
165 | | -#seq_menu li a{ |
166 | | - color:#fff; |
167 | | -} |
168 | | -*/ |
169 | | -.seq_control_container{ |
170 | | - position:absolute; |
171 | | - top:40px; |
172 | | - overflow:auto; |
173 | | - bottom:0px; |
174 | | - left:10px; |
175 | | - right:0px; |
176 | | -} |
177 | | -.submenu_container{ |
178 | | -/* top:25px; |
179 | | - left:10px; |
180 | | - right:0px; |
181 | | - overflow:auto; |
182 | | - position:absolute; |
183 | | - broder: solid thin gray; |
184 | | -*/ |
185 | | -} |
186 | | -.mv_submenu{ |
187 | | - /*position:absolute;*/ |
188 | | - /*left:0px; |
189 | | - top:0px; |
190 | | - margin:2px; |
191 | | - list-style-type:none; |
192 | | - bottom:0px; |
193 | | - border:none; |
194 | | - padding:0px;*/ |
195 | | -} |
196 | | -.mv_submenu li{ |
197 | | - border:solid thin gray; |
198 | | - cursor:pointer; |
199 | | - display:inline; |
200 | | - padding:5px; |
201 | | -} |
202 | | -.mv_submenu .mv_sub_selected{ |
203 | | - border-bottom: none; |
204 | | -} |
205 | | -#seq_menu .mv_selected_item{ |
206 | | - border-bottom:none; |
207 | | -} |
\ No newline at end of file |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/css/images/transition_wipe.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/css/images/fade_fadeFromColor.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/css/images/fade_crossfade.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: branches/MwEmbedStandAlone/modules/SequenceOld/remotes/RemoteMwSequencer.js |
— | — | @@ -1,82 +0,0 @@ |
2 | | -/** |
3 | | -* Stop-gap for php sequencer support does some transformations |
4 | | -* to normal page views to support sequences edits |
5 | | -* |
6 | | -* Supports basic "sequencer" functionality as a javascript rewrite system. |
7 | | -*/ |
8 | | - |
9 | | -mw.addMessages( { |
10 | | - "mwe-no-sequence-create" : "No sequence exists named $1, You can [$2 start a sequence]", |
11 | | - "mwe-sequence-create-one" : "start a sequence" |
12 | | -}); |
13 | | - |
14 | | -RemoteMwSequencer = function( options ) { |
15 | | - return this.init( options ); |
16 | | -}; |
17 | | -RemoteMwSequencer.prototype = { |
18 | | - /** |
19 | | - * @constructor |
20 | | - * @param {Object} options RemoteMwSequencer options |
21 | | - */ |
22 | | - init: function( options ) { |
23 | | - this.action = ( options.action )? options.action : this.action; |
24 | | - this.title = ( options.title )? options.title : this.title; |
25 | | - this.target = ( options.target )? options.target : this.target; |
26 | | - }, |
27 | | - |
28 | | - updateUI: function() { |
29 | | - // Check page type |
30 | | - if( this.action == 'view' ) { |
31 | | - this.showViewUI(); |
32 | | - } |
33 | | - }, |
34 | | - /* |
35 | | - * Check page for sequence |
36 | | - * if not present give link to "create" one. |
37 | | - */ |
38 | | - showViewUI: function() { |
39 | | - if( wgArticleId == 0 ) { |
40 | | - $startLink = $j('<div>').append( |
41 | | - $j('<a>') |
42 | | - .text( gM('mwe-sequence-create-one') ) |
43 | | - .attr('id', 'mwe-sequence-create') |
44 | | - ); |
45 | | - $j( this.target ).html( |
46 | | - gM("mwe-no-sequence-create", [this.title, $startLink.html() ]) |
47 | | - ); |
48 | | - $j('#mwe-sequence-create').click(function() { |
49 | | - $j('body').append( '<div id="seqcontainer" style="position:absolute;top:5px;bottom:10px;left:10px;right:10px;" />' ); |
50 | | - mw.load( 'Sequencer', function() { |
51 | | - $j('#seqcontainer').sequencer({ |
52 | | - 'amw_conf':{ |
53 | | - 'enabled_providers':['wiki_commons'] |
54 | | - } |
55 | | - }) |
56 | | - }); |
57 | | - |
58 | | - }); |
59 | | - }else{ |
60 | | - $j( this.target ).html( |
61 | | - '<playlist id="playlist" src="' +wgArticlePath.replace('$1', this.title) + '?action=raw&.xml" wikiTitleKey="' + this.title + '" ></playlist>' |
62 | | - ); |
63 | | - $j('#playlist').embedPlayer(); |
64 | | - |
65 | | - } |
66 | | - } |
67 | | - |
68 | | - // Check page type |
69 | | - |
70 | | - // "view" page |
71 | | - |
72 | | - // set page content to "loading" |
73 | | - // get wikitext of page via api |
74 | | - // grab xml |
75 | | - // update page with sequence and |
76 | | - |
77 | | - |
78 | | - //"edit" page |
79 | | - // grab textbox text, |
80 | | - // set page to loading |
81 | | - // display sequence editor in "body" with -> full-screen link |
82 | | -}; //Setup the remote configuration |
83 | | - |
\ No newline at end of file |