Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Video 修复嵌入视频代码的Ooyala_Video_Ooyala - Fatal编程技术网

Video 修复嵌入视频代码的Ooyala

Video 修复嵌入视频代码的Ooyala,video,ooyala,Video,Ooyala,我正在使用自定义主题的Wordpress 我有选择后格式,如音频,视频,报价等 当我选择我的文章作为视频时,它会显示两个选项:视频URL、视频嵌入代码 在视频嵌入代码,如果我把嵌入代码从Youtube它的工作。但主要问题是我把视频上传到Ooyala.com上。当我从ooyala插入html嵌入代码时。它不显示视频,只显示代码。(无视频) 在阅读了我的主题代码之后,我遇到了这个代码,它将嵌入代码转换为 function wpbandit_video_wmode_transparent($html,

我正在使用自定义主题的Wordpress

我有选择后格式,如音频,视频,报价等

当我选择我的文章作为视频时,它会显示两个选项:视频URL、视频嵌入代码

在视频嵌入代码,如果我把嵌入代码从Youtube它的工作。但主要问题是我把视频上传到Ooyala.com上。当我从ooyala插入html嵌入代码时。它不显示视频,只显示代码。(无视频)

在阅读了我的主题代码之后,我遇到了这个代码,它将嵌入代码转换为

function wpbandit_video_wmode_transparent($html, $url, $attr) {
if ( strpos( $html, "<embed src=" ) !== false ) {
    $html = str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque" ', $html);
} elseif ( strpos ($html, 'feature=oembed') !== false ) {
    $html = str_replace('feature=oembed', 'feature=oembed&wmode=opaque', $html);
} 
    return $html;
}
    add_filter('embed_oembed_html','wpbandit_video_wmode_transparent',10,3);

/**
    Add container to default video embeds
**/
function wpbandit_embed_oembed_html($html, $url, $attr, $post_id) {
    return '<div class="video-container">' . $html . '</div>';
}
add_filter('embed_oembed_html', 'wpbandit_embed_oembed_html', 99, 4);
函数wpbuidit\u video\u wmode\u transparent($html、$url、$attr){

如果(strpos($html,请尝试安装我们的Wordpress插件:

<script src='https://player.ooyala.com/v3/84b6e4bac6d945439a38bdfff895a0fd'></script>    <div id='ooyalaplayer' style='width:1280px;height:720px'></div><script>OO.ready(function() {     OO.Player.create('ooyalaplayer', 'N5MG1rYTpsId-Q4ZlUy1JEykqD5QMWEN'); });</script><noscript>    <div>Please enable Javascript to watch this video</div></noscript>