![](/img/trans.png)
[英]html5 video playlist in wordpress using ajax through jquery
[英]WordPress Not Rendering HTML5 Video
我正在嘗試在WordPress中創建啟動頁面(已完成),但是瀏覽器未找到我想播放的視頻。
不在WordPress中時可以使用。 但是一旦進入WordPress,就不是。 這是我的代碼:
<?php
/*
Template Name: Splash
*/
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Iron Triangle Films Splash Page</title>
<link rel="stylesheet" href="css/styles.">
<style>
.mainContent{
width: 50%;
margin-left: 250px;
}
</style>
</head>
<body>
<div class="mainContent">
<video id="my_video" height="500" width="700" autoplay>
<source src="<?php echo get_bloginfo('template_directory');?> itf.mp4" type="video/mp4">
<source src="<?php echo get_bloginfo('template_directory');?> itf.ogv" type="video/ogg">
<p>Your browser does not support HTML5 video.</p>
</video>
<p style="text-align: center;">This site is currently under development and will be back online shortly.</p>
</div><!--End Main Content div-->
</body>
</html>
視頻源中的以下代碼行:
<?php echo get_bloginfo('template_directory');?>
由某人建議,但這沒有用。
該網站是www.irontrianglefilms.com
非常感謝您在嘗試解決此問題的第二天。 克里斯·馬佐基
嘗試使用此命令,記住在調用函數以獲取目錄后添加“ /”。
<?php
/*
Template Name: Splash
*/
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Iron Triangle Films Splash Page</title>
<link rel="stylesheet" href="css/styles.">
<style>
.mainContent{
width: 50%;
margin-left: 250px;
}
</style>
</head>
<body>
<div class="mainContent">
<video id="my_video" height="500" width="700" autoplay>
<source src="<?php echo get_bloginfo('template_directory');?>/itf.mp4" type="video/mp4">
<source src="<?php echo get_bloginfo('template_directory');?>/itf.ogv" type="video/ogg">
<p>Your browser does not support HTML5 video.</p>
</video>
<p style="text-align: center;">This site is currently under development and will be back online shortly.</p>
</div><!--End Main Content div-->
</body>
</html>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.