Index: trunk/extensions/OggHandler/OggPlayer.js |
— | — | @@ -29,7 +29,9 @@ |
30 | 30 | // Save still image HTML |
31 | 31 | if ( !(params.id in this.savedThumbs) ) { |
32 | 32 | var thumb = document.createDocumentFragment(); |
33 | | - thumb.appendChild( elt.cloneNode( true ) ); |
| 33 | + for ( i = 0; i < elt.childNodes.length; i++ ) { |
| 34 | + thumb.appendChild( elt.childNodes.item( i ).cloneNode( true ) ); |
| 35 | + } |
34 | 36 | this.savedThumbs[params.id] = thumb; |
35 | 37 | } |
36 | 38 | |
— | — | @@ -52,7 +54,11 @@ |
53 | 55 | } |
54 | 56 | } |
55 | 57 | |
56 | | - if ( !player || !this.clientSupports[player] ) { |
| 58 | + if ( !this.clientSupports[player] ) { |
| 59 | + player = false; |
| 60 | + } |
| 61 | + |
| 62 | + if ( !player ) { |
57 | 63 | for ( var i = 0; i < this.players.length; i++ ) { |
58 | 64 | if ( this.clientSupports[this.players[i]] ) { |
59 | 65 | player = this.players[i]; |
— | — | @@ -62,7 +68,6 @@ |
63 | 69 | } |
64 | 70 | |
65 | 71 | elt.innerHTML = ''; |
66 | | - |
67 | 72 | switch ( player ) { |
68 | 73 | case 'videoElement': |
69 | 74 | this.embedVideoElement( elt, params ); |
— | — | @@ -83,15 +88,20 @@ |
84 | 89 | this.embedQuicktimePlugin( elt, params ); |
85 | 90 | break; |
86 | 91 | case 'thumbnail': |
| 92 | + default: |
87 | 93 | if ( params.id in this.savedThumbs ) { |
88 | 94 | elt.appendChild( this.savedThumbs[params.id].cloneNode( true ) ); |
89 | 95 | } else { |
90 | 96 | elt.appendChild( document.createTextNode( 'Missing saved thumbnail for ' + params.id ) ); |
91 | 97 | } |
92 | | - break; |
93 | | - default: |
94 | | - elt.innerHTML = '<div>' + this.msg['ogg-no-player'] + '</div>'; |
95 | | - player = 'none'; |
| 98 | + if ( player != 'thumbnail' ) { |
| 99 | + var div = document.createElement( 'div' ); |
| 100 | + div.className = 'ogg-player-options'; |
| 101 | + div.style.cssText = 'width: ' + ( params.width - 10 ) + 'px;'; |
| 102 | + div.innerHTML = this.msg['ogg-no-player']; |
| 103 | + elt.appendChild( div ); |
| 104 | + player = 'none'; |
| 105 | + } |
96 | 106 | } |
97 | 107 | if ( player != 'thumbnail' ) { |
98 | 108 | var optionsBox = this.makeOptionsBox( player, params ); |
— | — | @@ -137,7 +147,6 @@ |
138 | 148 | } |
139 | 149 | |
140 | 150 | // Mozilla plugins |
141 | | - |
142 | 151 | |
143 | 152 | if(navigator.mimeTypes && navigator.mimeTypes.length > 0) { |
144 | 153 | for ( var i = 0; i < navigator.mimeTypes.length; i++) { |