Index: branches/MwEmbedStandAlone/loader.js |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | 'Sequencer', |
54 | 54 | 'TimedText', |
55 | 55 | 'SmilPlayer', |
56 | | - 'MediaRss', |
| 56 | + 'MediaRss', |
57 | 57 | 'SwarmTransport' |
58 | 58 | ]; |
59 | 59 | |
Index: branches/MwEmbedStandAlone/ResourceLoader.php |
— | — | @@ -378,7 +378,7 @@ |
379 | 379 | if( $fileContents ){ |
380 | 380 | // Add the file name if debug is enabled |
381 | 381 | if ( $this->debug ){ |
382 | | - $output .= "\n/**\n* File: " . xml::escapeJsString( $filePath ) . "\n*/\n"; |
| 382 | + $output .= "\n\n/**\n* File: " . xml::escapeJsString( $filePath ) . "\n*/\n"; |
383 | 383 | } |
384 | 384 | // Transform the css output if the file is css |
385 | 385 | $output.= ( $ext == 'css' ) ? |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js |
— | — | @@ -126,11 +126,11 @@ |
127 | 127 | if( nodeType == 'par'|| nodeType == 'seq' ) { |
128 | 128 | if( $node.children().length ) { |
129 | 129 | $node.children().each( function( inx, childNode ){ |
130 | | - mw.log(" recurse:: startOffset:" + nodeType + ' start offset:' + startOffset ); |
| 130 | + //mw.log(" recurse:: startOffset:" + nodeType + ' start offset:' + startOffset ); |
131 | 131 | var childDur = _this.getElementsForTimeRecurse( $j( childNode ), time, startOffset); |
132 | 132 | // If element parent is a 'seq' increment startOffset: |
133 | 133 | if( nodeType == 'seq' ) { |
134 | | - mw.log(" Parent Seq:: add child dur: " + childDur ); |
| 134 | + //mw.log(" Parent Seq:: add child dur: " + childDur ); |
135 | 135 | startOffset += childDur; |
136 | 136 | } |
137 | 137 | }); |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js |
— | — | @@ -91,12 +91,12 @@ |
92 | 92 | $j( smilImgElement ).find( 'animate' ).each( function( inx, animateElement ){ |
93 | 93 | var begin = _this.smil.parseTime( $j( animateElement ).attr( 'begin') ); |
94 | 94 | var duration = _this.smil.parseTime( $j( animateElement ).attr( 'dur') ); |
95 | | - mw.log( "b:" + begin +" < " + animateTime + " && b+d: " + ( begin + duration ) + " > " + animateTime ); |
| 95 | + //mw.log( "b:" + begin +" < " + animateTime + " && b+d: " + ( begin + duration ) + " > " + animateTime ); |
96 | 96 | |
97 | 97 | // Check if the animate element is in range |
98 | 98 | var cssTransform = {}; |
99 | 99 | if( begin <= animateTime && ( begin + duration ) >= animateTime ) { |
100 | | - // Get the transform type: |
| 100 | + // Get the transform type: |
101 | 101 | switch( $j( animateElement ).attr('attributeName') ){ |
102 | 102 | case 'panZoom': |
103 | 103 | // Get the pan zoom css for "this" time |
— | — | @@ -107,7 +107,7 @@ |
108 | 108 | $j( animateElement ).attr('attributeName') ); |
109 | 109 | |
110 | 110 | } |
111 | | - mw.log("b:transformImageForTime: " + $j( animateElement ).attr( 'values' ) ); |
| 111 | + //mw.log("b:transformImageForTime: " + $j( animateElement ).attr( 'values' ) ); |
112 | 112 | //$j( smilImgElement ).css( cssTransform ); |
113 | 113 | } |
114 | 114 | |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | |
171 | 171 | |
172 | 172 | /** |
173 | | - * Get the duration form the |
| 173 | + * Get the duration form the smil body |
174 | 174 | */ |
175 | 175 | getDuration: function(){ |
176 | 176 | // return 0 while we don't have the $dom loaded |
— | — | @@ -182,9 +182,10 @@ |
183 | 183 | } |
184 | 184 | return this.duration; |
185 | 185 | }, |
| 186 | + |
186 | 187 | /** |
187 | 188 | * maps a smil element id to a html safe id |
188 | | - * as a decendent subname of the embedPlayer parent |
| 189 | + * as a decedent subname of the embedPlayer parent |
189 | 190 | * |
190 | 191 | * @param {Object} smilElement Element to get id for |
191 | 192 | */ |
— | — | @@ -195,6 +196,7 @@ |
196 | 197 | } |
197 | 198 | return this.embedPlayer.id + '_' + $j( smilElement ).attr('id'); |
198 | 199 | }, |
| 200 | + |
199 | 201 | /** |
200 | 202 | * Get an absolute path to asset based on the smil URL |
201 | 203 | * @param {string} assetPath Path to asset to be transformed into url |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js |
— | — | @@ -14,14 +14,19 @@ |
15 | 15 | // The jQuery target location to render smil html |
16 | 16 | $renderTarget: null, |
17 | 17 | |
| 18 | + // Store the actual play time |
| 19 | + smilPlayTime: 0, |
| 20 | + |
| 21 | + // Store the pause time |
| 22 | + smilPauseTime: 0, |
| 23 | + |
18 | 24 | // Player supported feature set |
19 | 25 | supports: { |
20 | 26 | 'playHead' : true, |
21 | 27 | 'pause' : true, |
22 | 28 | 'fullscreen' : true, |
23 | 29 | 'timeDisplay' : true, |
24 | | - 'volumeControl' : true, |
25 | | - |
| 30 | + 'volumeControl' : true, |
26 | 31 | 'overlays' : true |
27 | 32 | }, |
28 | 33 | |
— | — | @@ -84,12 +89,13 @@ |
85 | 90 | |
86 | 91 | play: function(){ |
87 | 92 | mw.log(" EmbedPlayerSmil::play " ); |
88 | | - // call the parent |
| 93 | + // update the interface |
89 | 94 | this.parent_play(); |
90 | | - |
91 | | - this.clockStartTime = new Date().getTime(); |
92 | | - |
93 | 95 | |
| 96 | + // Set start clock time: |
| 97 | + this.clockStartTime = new Date().getTime(); |
| 98 | + |
| 99 | + |
94 | 100 | this.getSmil( function( smil ){ |
95 | 101 | this.smil = smil; |
96 | 102 | }) |
— | — | @@ -97,33 +103,37 @@ |
98 | 104 | this.monitor(); |
99 | 105 | }, |
100 | 106 | |
| 107 | + stop: function(){ |
| 108 | + this.smilPlayTime = 0; |
| 109 | + this.smilPauseTime = 0; |
| 110 | + this.parent_stop(); |
| 111 | + }, |
| 112 | + |
101 | 113 | /** |
102 | 114 | * Preserves the pause time across for timed playback |
103 | 115 | */ |
104 | | - pause:function() { |
105 | | - mw.log( 'EmbedPlayerSmil::pause at time' + this.currentTime); |
106 | | - var ct = new Date(); |
107 | | - this.pauseTime = this.currentTime; |
108 | | - mw.log( 'pause time: ' + this.pauseTime ); |
| 116 | + pause: function() { |
| 117 | + mw.log( 'EmbedPlayerSmil::pause at time' + this.smilPlayTime ); |
| 118 | + this.smilPauseTime = this.smilPlayTime; |
| 119 | + // Update the interface |
| 120 | + this.parent_pause(); |
109 | 121 | }, |
110 | 122 | |
111 | 123 | /** |
112 | 124 | * Get the embed player time |
113 | 125 | */ |
114 | 126 | getPlayerElementTime: function() { |
115 | | - mw.log('html:monitor: '+ this.currentTime + ' ct:' + new Date().getTime() + ' - ' + this.clockStartTime); |
116 | | - this.currentTime = ( ( new Date().getTime() - this.clockStartTime ) / 1000 ) + this.pauseTime; |
117 | | - return this.currentTime; |
| 127 | + return this.smilPlayTime; |
118 | 128 | }, |
119 | 129 | |
120 | 130 | /** |
121 | 131 | * Monitor function render a given time |
122 | 132 | */ |
123 | 133 | monitor: function(){ |
124 | | - mw.log("time::" + this.getPlayerElementTime()); |
125 | | - /*this.smil.renderTime( , function(){ |
126 | | - |
127 | | - });*/ |
| 134 | + // Update the smilPlayTime |
| 135 | + if( !this.isPaused() ){ |
| 136 | + this.smilPlayTime = this.smilPauseTime + ( ( new Date().getTime() - this.clockStartTime ) / 1000 ); |
| 137 | + } |
128 | 138 | this.parent_monitor(); |
129 | 139 | }, |
130 | 140 | |
— | — | @@ -148,12 +158,15 @@ |
149 | 159 | /** |
150 | 160 | * Get the duration of smil document. |
151 | 161 | */ |
152 | | - getDuration: function(){ |
153 | | - if( this.smil ){ |
154 | | - return this.smil.getDuration(); |
155 | | - } else { |
156 | | - return this.parent_getDuration(); |
| 162 | + getDuration: function(){ |
| 163 | + if( !this.duration ){ |
| 164 | + if( this.smil ){ |
| 165 | + this.duration = this.smil.getDuration(); |
| 166 | + } else { |
| 167 | + this.duration = this.parent_getDuration(); |
| 168 | + } |
157 | 169 | } |
| 170 | + return this.duration; |
158 | 171 | }, |
159 | 172 | |
160 | 173 | /** |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -1750,8 +1750,10 @@ |
1751 | 1751 | selectPlayer: function( player ) { |
1752 | 1752 | var _this = this; |
1753 | 1753 | if ( this.selectedPlayer.id != player.id ) { |
1754 | | - this.selectedPlayer = player; |
| 1754 | + this.selectedPlayer = player; |
1755 | 1755 | this.inheritEmbedPlayer( function(){ |
| 1756 | + // Hide / remove track container |
| 1757 | + _this.$interface.find( '.track' ).remove(); |
1756 | 1758 | // We have to re-bind hoverIntent ( has to happen in this scope ) |
1757 | 1759 | if( _this.controls && _this.controlBuilder.checkOverlayControls() ){ |
1758 | 1760 | _this.controlBuilder.showControlBar(); |
— | — | @@ -2879,8 +2881,10 @@ |
2880 | 2882 | if( _this.volume != _this.previousVolume ) { |
2881 | 2883 | _this.setInterfaceVolume( _this.volume ); |
2882 | 2884 | } |
| 2885 | + |
2883 | 2886 | // Update the previus volume |
2884 | | - _this.previousVolume = _this.volume; |
| 2887 | + _this.previousVolume = _this.volume; |
| 2888 | + |
2885 | 2889 | // Update the volume from the player element |
2886 | 2890 | _this.volume = this.getPlayerElementVolume(); |
2887 | 2891 | |
— | — | @@ -2888,9 +2892,9 @@ |
2889 | 2893 | if( _this.muted != _this.getPlayerElementMuted() ){ |
2890 | 2894 | mw.log("monitor:: muted does not mach embed player" ); |
2891 | 2895 | this.toggleMute(); |
2892 | | - } |
2893 | | - |
2894 | | - //mw.log(' ct: ' + this.currentTime + ' dur: ' + ( parseInt( this.duration ) + 1 ) + ' is seek: ' + this.seeking ); |
| 2896 | + } |
| 2897 | + |
| 2898 | + //mw.log( 'Monitor:: ' + this.currentTime + ' duration: ' + ( parseInt( this.getDuration() ) + 1 ) + ' is seek: ' + this.seeking ); |
2895 | 2899 | if ( this.currentTime && this.currentTime > 0 && this.duration ) { |
2896 | 2900 | if ( !this.userSlide && !this.seeking ) { |
2897 | 2901 | if ( parseInt( this.startOffset ) != 0 ) { |
— | — | @@ -2936,12 +2940,17 @@ |
2937 | 2941 | $j( this ).trigger( 'progress', this.progressEventData ); |
2938 | 2942 | } |
2939 | 2943 | |
2940 | | - // Call monitor at 250ms interval. |
| 2944 | + // Call monitor at 250ms interval. ( use setInterval to avoid stacking monitor requests ) |
2941 | 2945 | if( ! this.isStoped() ) { |
2942 | | - setTimeout( function(){ |
2943 | | - _this.monitor(); |
2944 | | - }, 250 ) |
2945 | | - } |
| 2946 | + if( !this.monitorInterval ){ |
| 2947 | + this.monitorInterval = setInterval( function(){ |
| 2948 | + _this.monitor(); |
| 2949 | + }, 250 ) |
| 2950 | + } |
| 2951 | + } else { |
| 2952 | + // If stoped "stop" monitor: |
| 2953 | + clearInterval( this.monitorInterval ); |
| 2954 | + } |
2946 | 2955 | |
2947 | 2956 | //mw.log('trigger:monitor:: ' + this.currentTime ); |
2948 | 2957 | $j( this ).trigger( 'monitorEvent' ); |
Index: branches/MwEmbedStandAlone/modules/ClipEdit/ClipEdit.i18n.php |
— | — | @@ -437,7 +437,9 @@ |
438 | 438 | 'mwe-clipedit-layout_left' => 'Disposición da imaxe do lado esquerdo', |
439 | 439 | ); |
440 | 440 | |
441 | | -/** Swiss German (Alemannisch) */ |
| 441 | +/** Swiss German (Alemannisch) |
| 442 | + * @author Als-Holder |
| 443 | + */ |
442 | 444 | $messages['gsw'] = array( |
443 | 445 | 'mwe-clipedit-crop' => 'Bild zueschnyde', |
444 | 446 | 'mwe-clipedit-apply_crop' => 'Bild zueschnyde', |
— | — | @@ -446,6 +448,7 @@ |
447 | 449 | 'mwe-clipedit-insert_into_sequence' => 'In dr Abschnitt yyfiege', |
448 | 450 | 'mwe-clipedit-preview_insert' => 'Vorschau vu dr Yyfiegig', |
449 | 451 | 'mwe-clipedit-cancel_image_insert' => 'S Yyfiege ruckgängig mache', |
| 452 | + 'mwe-clipedit-sc_attributes' => 'Videoclip-Detail bearbeite', |
450 | 453 | 'mwe-clipedit-sc_inoutpoints' => 'Aa-Uus-Pinkt setze', |
451 | 454 | 'mwe-clipedit-sc_overlays' => 'Overlays', |
452 | 455 | 'mwe-clipedit-sc_audio' => 'Audioyystellige', |
— | — | @@ -463,6 +466,9 @@ |
464 | 467 | 'mwe-clipedit-inline-description' => 'Bschryybig', |
465 | 468 | 'mwe-clipedit-edit-video-tools' => 'Video-Bearbeitigswärchzyyg:', |
466 | 469 | 'mwe-clipedit-duration' => 'Duur:', |
| 470 | + 'mwe-clipedit-layout' => 'Uusrichtig', |
| 471 | + 'mwe-clipedit-layout_right' => 'Bild uf dr rächte Syte', |
| 472 | + 'mwe-clipedit-layout_left' => 'Bild uf dr linke Syte', |
467 | 473 | ); |
468 | 474 | |
469 | 475 | /** Hebrew (עברית) */ |
— | — | @@ -720,16 +726,20 @@ |
721 | 727 | 'mwe-clipedit-insert_into_sequence' => "An d'Sequenz drasetzen", |
722 | 728 | 'mwe-clipedit-preview_insert' => 'Drasetze kucken ouni ze späicheren', |
723 | 729 | 'mwe-clipedit-cancel_image_insert' => 'Drasetzen ofbriechen', |
| 730 | + 'mwe-clipedit-sc_attributes' => 'Detailer vum Videclip änneren', |
| 731 | + 'mwe-clipedit-sc_inoutpoints' => 'Eran-Eraus Punkte festleeën', |
724 | 732 | 'mwe-clipedit-sc_audio' => 'Audiosteierung', |
725 | 733 | 'mwe-clipedit-sc_duration' => 'Dauer', |
726 | 734 | 'mwe-clipedit-template_properties' => 'Eegeschafte vun der Schabloun', |
727 | 735 | 'mwe-clipedit-custom_title' => 'Personaliséierten Titel', |
728 | 736 | 'mwe-clipedit-edit_properties' => 'Eegeschaften änneren', |
729 | 737 | 'mwe-clipedit-other_properties' => 'Aner Eegeschaften', |
| 738 | + 'mwe-clipedit-set_in_out_points' => 'Eran-Eraus Punkte festleeën', |
730 | 739 | 'mwe-clipedit-start_time' => 'Ufankszäit', |
731 | 740 | 'mwe-clipedit-end_time' => 'Schlusszäit', |
732 | 741 | 'mwe-clipedit-edit-tools' => "Handwierksgeschir fir z'änneren", |
733 | 742 | 'mwe-clipedit-inline-description' => 'Beschreiwung', |
| 743 | + 'mwe-clipedit-edit-video-tools' => 'Video-Tools änneren:', |
734 | 744 | 'mwe-clipedit-duration' => 'Dauer:', |
735 | 745 | 'mwe-clipedit-layout' => 'Layout', |
736 | 746 | ); |
— | — | @@ -900,6 +910,16 @@ |
901 | 911 | 'mwe-clipedit-duration' => 'Czas trwania', |
902 | 912 | ); |
903 | 913 | |
| 914 | +/** Pashto (پښتو) |
| 915 | + * @author Ahmed-Najib-Biabani-Ibrahimkhel |
| 916 | + */ |
| 917 | +$messages['ps'] = array( |
| 918 | + 'mwe-clipedit-sc_duration' => 'موده', |
| 919 | + 'mwe-clipedit-start_time' => 'د پيل وخت', |
| 920 | + 'mwe-clipedit-end_time' => 'د پای وخت', |
| 921 | + 'mwe-clipedit-duration' => 'موده:', |
| 922 | +); |
| 923 | + |
904 | 924 | /** Portuguese (Português) |
905 | 925 | * @author Hamilton Abreu |
906 | 926 | */ |
— | — | @@ -934,8 +954,12 @@ |
935 | 955 | 'mwe-clipedit-layout_left' => 'Imagem posicionada à esquerda', |
936 | 956 | ); |
937 | 957 | |
938 | | -/** Brazilian Portuguese (Português do Brasil) */ |
| 958 | +/** Brazilian Portuguese (Português do Brasil) |
| 959 | + * @author Giro720 |
| 960 | + */ |
939 | 961 | $messages['pt-br'] = array( |
| 962 | + 'mwe-clipedit-crop' => 'Recortar imagem', |
| 963 | + 'mwe-clipedit-apply_crop' => 'Aplicar corte à imagem', |
940 | 964 | 'mwe-clipedit-reset_crop' => 'Reiniciar corte', |
941 | 965 | 'mwe-clipedit-insert_image_page' => 'Inserir na página', |
942 | 966 | 'mwe-clipedit-insert_into_sequence' => 'Inserir na sequência', |
— | — | @@ -1056,6 +1080,38 @@ |
1057 | 1081 | 'mwe-clipedit-layout_left' => 'Изглед с леве стране слике', |
1058 | 1082 | ); |
1059 | 1083 | |
| 1084 | +/** Serbian Latin ekavian (Srpski (latinica)) */ |
| 1085 | +$messages['sr-el'] = array( |
| 1086 | + 'mwe-clipedit-crop' => 'Iseci sliku', |
| 1087 | + 'mwe-clipedit-apply_crop' => 'Primeni isecanje slike', |
| 1088 | + 'mwe-clipedit-reset_crop' => 'Poništi isecanje', |
| 1089 | + 'mwe-clipedit-insert_image_page' => 'Ubaci u stranicu', |
| 1090 | + 'mwe-clipedit-insert_into_sequence' => 'Ubaci u niz', |
| 1091 | + 'mwe-clipedit-preview_insert' => 'Pretpregled umetka', |
| 1092 | + 'mwe-clipedit-cancel_image_insert' => 'Poništi umetak', |
| 1093 | + 'mwe-clipedit-sc_attributes' => 'Uredi podatke snimka', |
| 1094 | + 'mwe-clipedit-sc_inoutpoints' => 'Postavi u-van tačke', |
| 1095 | + 'mwe-clipedit-sc_overlays' => 'Preklapanja', |
| 1096 | + 'mwe-clipedit-sc_audio' => 'Audio kontrola', |
| 1097 | + 'mwe-clipedit-sc_duration' => 'Trajanje', |
| 1098 | + 'mwe-clipedit-template_properties' => 'Svojstva šablona', |
| 1099 | + 'mwe-clipedit-custom_title' => 'Prilagođeni naslov', |
| 1100 | + 'mwe-clipedit-edit_properties' => 'Izmeni svojstva', |
| 1101 | + 'mwe-clipedit-other_properties' => 'Ostala svojstva', |
| 1102 | + 'mwe-clipedit-resource_page' => 'Izvorna stranica:', |
| 1103 | + 'mwe-clipedit-set_in_out_points' => 'Postavi u-van tačke', |
| 1104 | + 'mwe-clipedit-start_time' => 'Početno vreme', |
| 1105 | + 'mwe-clipedit-end_time' => 'Završno vreme', |
| 1106 | + 'mwe-clipedit-preview_inout' => 'Pregledaj u-van tačke', |
| 1107 | + 'mwe-clipedit-edit-tools' => 'Uredi alatke', |
| 1108 | + 'mwe-clipedit-inline-description' => 'Naslov', |
| 1109 | + 'mwe-clipedit-edit-video-tools' => 'Uredi video alatke:', |
| 1110 | + 'mwe-clipedit-duration' => 'Trajanje:', |
| 1111 | + 'mwe-clipedit-layout' => 'Izgled', |
| 1112 | + 'mwe-clipedit-layout_right' => 'Izgled s desne strane slike', |
| 1113 | + 'mwe-clipedit-layout_left' => 'Izgled s leve strane slike', |
| 1114 | +); |
| 1115 | + |
1060 | 1116 | /** Swedish (Svenska) |
1061 | 1117 | * @author Dafer45 |
1062 | 1118 | */ |