]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/media/editor_plugin_src.js
Wordpress 3.6
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / media / editor_plugin_src.js
index 2ca33ac0ed28ba340db084097c1f0bba173f64c5..517ef48604aed9b3f8bf32c826c014c6e63160b3 100644 (file)
                        }
 
                        // Add HTML5 video element
-                       if (typeItem.name === 'Video' && data.video.sources[0]) {
+                       if (typeItem.name === 'Video' && data.video.sources && data.video.sources[0]) {
                                // Create new object element
                                video = new Node('video', 1).attr(tinymce.extend({
                                        id : node.attr('id'),
                        }
 
                        // Add HTML5 audio element
-                       if (typeItem.name === 'Audio' && data.video.sources[0]) {
+                       if (typeItem.name === 'Audio' && data.video.sources && data.video.sources[0]) {
                                // Create new object element
                                audio = new Node('audio', 1).attr(tinymce.extend({
                                        id : node.attr('id'),
                                                type: typeItem.mimes[0]
                                        });
                                } else {
-                                       object.attr({
-                                               classid: "clsid:" + typeItem.clsids[0],
-                                               codebase: typeItem.codebase
-                                       });
+                                       if ( typeItem.clsids )
+                                               object.attr('clsid', typeItem.clsids[0]);
+                                       object.attr('codebase', typeItem.codebase);
 
                                        embed = new Node('embed', 1);
                                        embed.shortEnded = true;