我讀了你的問題,我想你想使一個單一的觀看頁面所有視頻。 如果獨立播放器正在播放列表,則可能沒問題。我建議你可以使用一些js庫,你不需要學習PHP和MYSQL。我發現這個圖書館
http://mediafront.org/osmplayer/#.Uf_wrzmy_Dc
我認爲它非常容易使用。你可以下載它,然後你可以在你的html頁面中像這樣修改你的代碼。
<!DOCTYPE html>
<html>
<head>
<title>Video Title - FTVO</title>
<meta charset="UTF-8">
<!-- Include the core jQuery and jQuery UI -->
<script type='text/javascript' src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<!-- Include the core media player JavaScript. -->
<script type="text/javascript" src="osmplayer/bin/osmplayer.compressed.js"></script>
<!-- Include the DarkHive ThemeRoller jQuery UI theme. -->
<link rel="stylesheet" href="osmplayer/jquery-ui/dark-hive/jquery-ui.css">
<!-- Include the Default template CSS and JavaScript. -->
<link rel="stylesheet" href="osmplayer/templates/default/css/osmplayer_default.css">
<link rel="stylesheet" href="osmplayer/templates/default/osmplayer.default.js">
<script type="text/javascript">
$(function() {
$("#osmplayer").osmplayer({
playlist: 'playlist.xml',
width: '480px',
height: '640px'
});
});
</script>
</head>
<body>
<h2>Video Title</h2>
<p>Watch this episode using the player below</p>
<div id="osmplayer"></div>
<hr>
<p>This site is property of <b>TechXtra Web Services</b></p>
</body>
</html>
對於播放列表,您創建XML只是更改視頻和圖像的位置路徑。
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<title>HTML5: Matagascar III</title>
<location>http://progressive.totaleclips.com.edgesuite.net/105/e105598_257.mp4</location>
<image>http://www.movieposter.com/posters/archive/main/143/MPW-71686</image>
</track>
<track>
<title>HTML5: Snow White and the Huntsman</title>
<location>http://progressive.totaleclips.com.edgesuite.net/103/e103981_257.mp4</location>
<image>http://www.movieposter.com/posters/archive/main/142/MPW-71148</image>
</track>
<track>
<title>HTML5: Men in Black III</title>
<location>http://progressive.totaleclips.com.edgesuite.net/105/e105857_257.mp4</location>
<image>http://www.movieposter.com/posters/archive/main/146/MPW-73434</image>
</track>
</trackList>
</playlist>
你能提供相關的代碼和更多的細節嗎?你有沒有想要解決的具體問題/問題? – 2013-08-05 18:08:53
你已經有Flash版本了嗎?你現在想要觀看的視頻如何填充它? – kalley
所有我試圖做的是使用HTML5和PHP一起爲我的所有內容製作一個頁面。例如: