2016-08-28 7 views
0
<?php 

$args = array(
    'post_type' => 'attachment', 
    'numberposts' => -1, 
    'post_status' => null, 
    'post_parent' => null, // any parent 
    'post_mime_type' => 'video/mp4' 
); 

$attachments = get_posts($args); 

if ($attachments) { 
    foreach ($attachments as $post) { 
    setup_postdata($post); 
    the_title(); 
    // the_attachment_link($post->ID, false); 
?> 
    <video width="320" height="240" controls> 
    <source src="<?php  wp_get_attachment_link($post->ID, false); ?>" type="video/mp4"> 
</video> 
<?php 


    the_excerpt(); 
    } 
} 

?> 

私はMP4ビデオをワードプレスのメディアにアップロードしましたが、私はhtml5タグで再生できません。どこに間違いがあるのか​​分かりません。WordpressのアップロードされたビデオはHTML 5タグで再生できませんか?

答えて

0

あなたが任意のHTML5のビデオコンバータのアプリケーションからHTML5のビデオフォーマットにビデオファイルを変換することができますかあなたが見ることができ、以下の記事に従ってください、あなたは少なくとも2 HTML5のビデオフォーマットを提供していることを確認し、

http://www.betterhostreview.com/add-html5-videos-wordpress.html

URLの下に、

http://www.betterhostreview.com/free-video-converter-convert-html5-videos-freemake.html

関連する問題