2016-04-02 113 views
0

我正在查看顯示視頻標籤的網站播放m4a文件。在html中給出了m4a文件的源URL。播放器正在顯示的源網址和網址是相同的。瀏覽器如何從視頻標籤下載源文件

如果我在瀏覽器中加載源URL,它只會加載相同的播放器。我可以通過右擊chrome/firefox下載src文件並點擊保存音頻/鏈接爲。

視頻標籤如何從源視頻下載m4a文件?不應該訪問src url允許我以相同的方式右擊播放器並選擇保存音頻爲?

回答

0

只需在視頻的網址中使用錨點即可。將它與視頻元素一起包裝在一個塊元素中,使外觀更像一個下載鏈接。

片段

figure { 
 
    width: 480px; 
 
    padding: 10px 5px 15px; 
 
    background: #000; 
 
    border-radius: 12px; 
 
} 
 
a { 
 
    text-decoration: none; 
 
    color: #00e; 
 
    background: transparent; 
 
    border: 1px sold #00e; 
 
    border-radius: 10px; 
 
    padding: 5px; 
 
    text-align: center; 
 
} 
 
a:hover { 
 
    color: #0ff; 
 
    background: #555; 
 
    border: 1px solid #0ff; 
 
}
<figure> 
 
    <video src="http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/12/html5-video-article-demos/maui-with-words.webm" controls preload="none" width="480"></video> 
 
    <figcaption><a href="http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/12/html5-video-article-demos/maui-with-words.webm">Download</a> 
 
    </figcaption> 
 
</figure>

相關問題