</div>
<div style="width:450px;float:left">
-<video skin_name="kskin" src="http://upload.wikimedia.org/wikipedia/commons/2/29/Charles_Lindbergh_flight_to_Brussels.ogg"
+<video class="kskin" src="http://upload.wikimedia.org/wikipedia/commons/2/29/Charles_Lindbergh_flight_to_Brussels.ogg"
poster="http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Charles_Lindbergh_flight_to_Brussels.ogg/mid-Charles_Lindbergh_flight_to_Brussels.ogg.jpg" durationHint="15"></video>
-<video skin_name="kskin" style="width:208px;height:160px;float:left;" src="http://upload.wikimedia.org/wikipedia/commons/2/29/Charles_Lindbergh_flight_to_Brussels.ogg"
+<video class="kskin" style="width:208px;height:160px;float:left;" src="http://upload.wikimedia.org/wikipedia/commons/2/29/Charles_Lindbergh_flight_to_Brussels.ogg"
poster="http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Charles_Lindbergh_flight_to_Brussels.ogg/mid-Charles_Lindbergh_flight_to_Brussels.ogg.jpg" durationHint="15"></video>
<b>(ksin) Source Code used:</b><br>
-<textarea cols="50" rows="7"><video style="width:400px;height:288px" poster="http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Charles_Lindbergh_flight_to_Brussels.ogg/mid-Charles_Lindbergh_flight_to_Brussels.ogg.jpg"
+<textarea cols="50" rows="7"><video class="kskin" style="width:400px;height:288px" poster="http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Charles_Lindbergh_flight_to_Brussels.ogg/mid-Charles_Lindbergh_flight_to_Brussels.ogg.jpg"
src="http://upload.wikimedia.org/wikipedia/commons/2/29/Charles_Lindbergh_flight_to_Brussels.ogg"></video></textarea>
</div>
"embed_link":true,
"download_link":true,
"type":null, //the content type of the media
-
- "skin_name":null //if you want to select a custom skin per video tag.
};
/*
* the base source attribute checks
}
}
- //set the skin name from the config (if not set locally)
- if( !this.skin_name )
- this.skin_name = $mw.conf['skin_name'];
+ //set the skin name from the class
+ var sn = element.getAttribute('class');
+ if( sn && sn != ''){
+ for(var n=0;n< $mw.valid_skins.length;n++){
+ if( sn.indexOf($mw.valid_skins[n]) !== -1){
+ this.skin_name = $mw.valid_skins[n];
+ }
+ }
+ }
+ //set the default if unset:
+ if(!this.skin_name)
+ this.skin_name = $mw.conf.skin_name;
//make sure startOffset is cast as an int
if( this.startOffset && this.startOffset.split(':').length >= 2)
'jui_skin' : 'redmond',
'video_size' : '400x300'
}
+ //list valid skins here:
+ $.valid_skins = ['mvpcf', 'kskin'];
// the version of mwEmbed
$.version = '1.0r21';
for(var j in e){
for(var k in e[j]){
if(e[j][k] && typeof( e[j][k]) == 'object'){
- var sn = e[j][k].getAttribute('skin_name')
+ var sn = e[j][k].getAttribute('class');
if( sn && sn != ''){
- $mw.skin_list.push( sn );
+ for(var n=0;n< $mw.valid_skins.length;n++){
+ if( sn.indexOf($mw.valid_skins[n]) !== -1){
+ $mw.skin_list.push( $mw.valid_skins[n] );
+ }
+ }
}
}
}