2011-10-13 4 views
2

간단한 프로젝트를 재생할 수 없습니다 콘텐츠를 다운로드하려고 호출 된 URL에서 재생 ...IE에서 Colorbox 외부 페이지를로드,

코더보다 디자이너의 것. 도움이 필요해! 여기

그리고

JQuery와 있습니다 :

$(document).ready(function(){ 
     //Examples of how to assign the ColorBox event to elements 
     $("a[rel='example1']").colorbox(); 
     $("a[rel='example2']").colorbox(); 
     $("a[rel='example3']").colorbox(); 
     $("a[rel='example4']").colorbox(); 
     $("a[rel='example7']").colorbox(); 
     $(".example7").colorbox({width:"40%", height:"25%", iframe:true}); 

     //Example of preserving a JavaScript event for inline calls. 
     $("#click").click(function(){ 
      $('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here."); 
      return false; 
     }); 
    }); 

을 그리고 여기에 HTML입니다 :

<a class="projects example7" href="http://www.floordaily.net/UploadedFiles/RadioInterviews/MP3/Manny_2-15-08.mp3" title=" " rel="example7">Live<br />Interviews</a> 
<a class="example7" href="http://www.floordaily.net/UploadedFiles/RadioInterviews/MP3/Manny%20from%20Mohawk%27s%20Floorscapes%20meeting%20in%202008.mp3" title=" " rel="example7"></a> 
<a class="example7" href="http://www.floordaily.net/UploadedFiles/RadioInterviews/MP3/Manny%20Llerena%20Discusses%20the%20Highlights%20of%20Mohawks%20Aligned%20Retailer%20Meeting.mp3" title=" " rel="example7"></a> 

답변

2

문제는 여기에 IE의 colorbox하지,하지만 IE는 비디오 및 오디오 파일을 처리하는 대신 방법에 대해 설명합니다. 또한 각 사람의 IE 설정 방법에 따라 다릅니다. 일반적으로 브라우저에는 음악 및 비디오 파일을 재생할 수있는 무언가가 내장되어 있습니다. 그러나 Microsoft는 귀하가 다른 제품을 사용하여 더 행복해하고 미디어 플레이어를 열 것이라고 가정합니다.

이 문제를 방지하려면 음악 또는 비디오 파일을 미리 제작 된 플레이어에 삽입해야합니다. 야후는 자바 스크립트에서 수행되는 매우 쉬운 솔루션을 제공합니다. 그렇지 않으면 플레이어와 함께하는 모든 일은 자바 스크립트에 있습니다. 이를 컬러 박스에 통합하기 위해 취해야 할 조치는 다음과 같습니다.

1) 플레이어의 모든 코드가 포함 된 별도의 페이지를 설정하십시오. 여기 간다 :

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<title>Click blocker test</title> 
<script type="text/javascript"> 
    var YWPParams = { 
     autoplay:true, 
     volume:0.5 
    }; 
</script> 
<script type="text/javascript" src="http://webplayer.yahooapis.com/player-beta.js"></script> 
</head> 

<body style="font-size:200%"> 
    <a id="test1" href="http://www.floordaily.net/UploadedFiles/RadioInterviews/MP3/Manny_2-15-08.mp3" style="display:none">Video</a><br /> 
</body> 
</html> 

2) 다음 페이지에있는 링크를 사용하여 MP3 파일 :

$("#playerLink").colorbox({ 
    iframe: true, 
    width:"50%", 
    height:"50%" //or whatever dimensions you like 
}); 

기본적으로 방법으로는 이러한 설정으로 (작동)는 야후 스크립트가있는 링크를 검색한다는 것입니다 확장자는 .mp3이며 플레이어에로드됩니다. Yahoo의 플레이어 설정에 대한 자세한 내용은 here을 참조하십시오.

이것은 한 선수의 예일뿐입니다. 무리가 있습니다. jquery mp3 player here이 있지만 내장 된 mp3 플레이어를 검색하면 많은 결과를 얻을 수 있습니다.

관련 문제