| | 36 | function podPressGenerateM4APreview(strPlayerDiv, strMediaFile, numWidth, numHeight, bPreviewOnly) { |
| | 37 | if (typeof numWidth == 'undefined') { numWidth = 320; } |
| | 38 | if (typeof numHeight == 'undefined') { numHeight = 25; } // height of the browser plugin (height of the real player bar) |
| | 39 | var numHeight_middle = 3; // height of the middle row of the player preview |
| | 40 | if (typeof bPreviewOnly == 'undefined') { bPreviewOnly = false; } |
| | 41 | |
| | 42 | if(!bPreviewOnly) { |
| | 43 | var strOnclick= ' onclick="javascript:podPressShowHidePlayer('+strPlayerDiv+', \''+strMediaFile+'\', '+numWidth+', '+numHeight+', \'force\'); return false;"'; |
| | 44 | } else { |
| | 45 | var strOnclick= ''; // for a preview of this preview player at the player settings page on the admin pages (for the future) |
| | 46 | } |
| | 47 | |
| | 48 | var strResult = ''; |
| | 49 | strResult += '<div class="podPress_videoplayer_wrapper" style="width: '+(numWidth+14)+'px; padding:0px; margin:0px; display:block; background-color:#ff0000;"'+strOnclick+'>'; |
| | 50 | strResult += ' <div class="podPress_videoplayer_toprow" style="width:100%; padding:0px; margin:0px;">'; |
| | 51 | strResult += ' <img src="'+podPressBackendURL+'images/vpreview_top_left.png" style="width:7px; height:27px; float:left; padding:0px; margin:0px;" alt="."/>'; |
| | 52 | strResult += ' <span style="height:27px; border:0px; display:block; float:left; padding:0px; margin:0px; width: '+numWidth+'px; text-align:center; background:url(\''+podPressBackendURL+'images/vpreview_top_background.png\'); background-repeat: repeat-x;"><img src="'+podPressBackendURL+'images/vpreview_top_middle.png" style="width:119px; height:27px padding:0px; margin:0px; border:0px;" alt="." /></span>'; |
| | 53 | strResult += ' <img src="'+podPressBackendURL+'images/vpreview_top_right.png" style="width:7px; height:27px; float:left; padding:0px; margin:0px;" alt="." />'; |
| | 54 | strResult += ' </div>'; |
| | 55 | |
| | 56 | strResult += ' <div class="podPress_videoplayer_middlerow" style="width:100%; padding:0px; margin:0px;">'; |
| | 57 | strResult += ' <span style="width:7px; height:'+numHeight_middle+'px; padding:0px; margin:0px; display:block; float:left; background:url(\''+podPressBackendURL+'images/vpreview_left_background.png\'); background-repeat:repeat-y;"></span>'; |
| | 58 | strResult += ' <span style="width:'+numWidth+'px; height:'+numHeight_middle+'px; padding:0px; margin:0px; border:0px; float:left; background-color:rgb(225,225,225); display:block;" id="podPress_previewImageIMG_'+strPlayerDiv+'"'+strOnclick+'></span>'; |
| | 59 | strResult += ' <span style="width:7px; height:'+numHeight_middle+'px; padding:0px; margin:0px; display:block; float:left; background:url(\''+podPressBackendURL+'images/vpreview_right_background.png\'); background-repeat:repeat-y;"></span>'; |
| | 60 | strResult += ' </div>'; |
| | 61 | |
| | 62 | strResult += ' <div class="podPress_videoplayer_bottomrow" style="width:100%; padding:0px; margin:0px;">'; |
| | 63 | strResult += ' <img src="'+podPressBackendURL+'images/vpreview_bottom_left.png" style="width:7px; height:23px; float:left; padding:0px; margin:0px;" alt="." />'; |
| | 64 | strResult += ' <span style="display:block; float:left; padding:0px; margin:0px; text-align: left; background:url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"><img src="'+podPressBackendURL+'images/vpreview_bottom_middle_left.png" style="width:56px; height:23px" alt="." /></span>'; |
| | 65 | strResult += ' <span style="height:23px; display:block; float:left; padding:0px; margin:0px; width:'+String(Math.abs(numWidth-112))+'px; background:url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"></span>'; |
| | 66 | strResult += ' <span style="display:block; float:left; padding:0px; margin:0px; text-align:right; background:url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"><img src="'+podPressBackendURL+'images/vpreview_bottom_middle_right.png" style="width:56px; height:23px" alt="." /></span>'; |
| | 67 | strResult += ' <img src="'+podPressBackendURL+'images/vpreview_bottom_right.png" style="width:7px; height:23px; float:left; padding:0px; margin:0px;" alt="." />'; |
| | 68 | strResult += ' </div>'; |
| | 69 | strResult += '</div>'; |
| | 70 | return String(strResult); |
| | 71 | } |
| | 72 | |
| 37 | | if (typeof numWidth == 'undefined') { |
| 38 | | numWidth = 320; |
| 39 | | } |
| 40 | | if (typeof numHeight == 'undefined') { |
| 41 | | numHeight = 240; |
| 42 | | } |
| 43 | | if (typeof strPreviewImg == 'undefined') { |
| 44 | | strPreviewImg = podPressDefaultPreviewImage; |
| 45 | | } |
| 46 | | if (typeof bPreviewOnly == 'undefined') { |
| 47 | | bPreviewOnly = false; |
| 48 | | } |
| | 74 | if (typeof numWidth == 'undefined') { numWidth = 320; } |
| | 75 | if (typeof numHeight == 'undefined') { numHeight = 240; } |
| | 76 | if (typeof strPreviewImg == 'undefined') { strPreviewImg = podPressDefaultPreviewImage; } |
| | 77 | if (typeof bPreviewOnly == 'undefined') { bPreviewOnly = false; } |