2014-12-30 64 views
0

我在頁面中嵌入了一個第三方 javascript腳本。它用於跟蹤頁面上視頻的事件。但是,我得到一個錯誤:XMLHttpRequest無法加載... mp4

XMLHttpRequest cannot load http://third-party_url.com/file.mp4. 
No 'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'http://fast.wistia.net' is therefore not allowed access. 

我知道有是解決該錯誤,但他們,也許就好像它是我自己的腳本適用。我該如何解決這個錯誤?

UPDATE:

我將此添加到我的

<VirtualHost *:80> 
    Access-Control-Allow-Origin: "http://fast.wistia.net"` 

/etc/apache2/sites-enabled/my_domain.com但它並沒有幫助。

回答

0

包括

<script type="text/javascript" src="http://www.ajax-cross-origin.com/js/jquery.ajax-cross-origin.min.js /> 

解決我的問題檢查出來。

+0

感謝它解決了什麼問題? – Kaiido

+0

它沒有幫助我。 –

相關問題