2017-03-03 26 views
0

我試圖在我的筆記本電腦上用Aframe平臺在本地播放球體視頻存儲。 首先,我用這個視頻:https://ucarecdn.com/bcece0a8-86ce-460e-856b-40dac4875f15/它的工作,但是當我下載這個視頻,並更改鏈接本地鏈接:http://localhost/webvr/testvr.mp4/,它沒有工作。 我的瀏覽器是Chrome版本56 這是HTML代碼我與通過Aframe播放本地球體視頻

<head> 
    <title>My A-Frame Scene</title> 
    <script src="https://aframe.io/releases/0.3.0/aframe.min.js"></script> 
    <script src="https://rawgit.com/oscarmarinmiro/aframe-video-  controls/master/dist/aframe-video-controls.min.js"></script> 
</head> 

<body> 
    <a-scene> 
    <a-assets> 
    <video id="video_1" crossorigin   src="http://localhost/webvr/testvr.mp4/"></video> 
    </a-assets> 

    <a-camera position="0 0 5"> 
     <a-cursor id="cursor" color="yellow"></a-cursor> 
    </a-camera> 

    <a-videosphere src="#video_1" rotation="0 180 0"></a-videosphere> 

    <a-entity video-controls="src:#video_1"></a-entity> 

</a-scene> 

+0

嘗試在視頻'src'結尾刪除多餘的「/」。 此外,請嘗試轉到網址「http://localhost/webvr/testvr.mp4」,並確保您可以訪問它。 – jhsu

+0

我通常可以通過本地主機訪問我的視頻,並刪除了「/」,但它仍然無法正常工作。你還有其他解決方案嗎? –

+0

只是在Firefox中嘗試相同。我得到我的視頻播放在Firefox中,但不是在鉻 – AishApp

回答

2

試驗試試這個:

src="/webvr/testvr.mp4" 

所以不要將您的視頻存儲在本地需要本地主機部分。

+0

我以前試過,但它不工作,我不知道爲什麼,PLZ幫助我! –