插件和录像带的HTML显示 [英] HTML display of Plugin and videotag

查看:186
本文介绍了插件和录像带的HTML显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正面临着一个奇怪的问题与html display.I有一个html页面,同时具有插件对象和视频标签。两者都置于同一地区。插件面积为970x560,视频面积为320x240像素。该插件渲染的图像中有一个矩形孔,用于观看视频(即,部分渲染的图像具有透明像素(alpha opaque = 0),仅用于显示视频)。

现在在chrome中启动这个html应用程序,我只能看到视频的第一帧,而不能看到插件呈现的图像。但是为了交叉检查图像是否被渲染,我倾倒了图像,它们确实存在,并且当我改变插件的背景风格属性(如背景色)时,我只能看到图像和背景图像中的背景剪切图像的一部分。

我发布了下面的html。视频链接也发布了,图片发布了
视频链接 http:// www。 w3schools.com/tags/movie.mp4 http:// www .w3schools.com / tags / tryit.asp?filename = tryhtml5_video
图片网址

![带透明像素的插件渲染图像] [ 1]

[1]: http://i.stack.imgur。 com / 3yLDB.png

HTML代码

  < HTML> 
< head>
PROXY PLUGIN
< / head>
< script>
函数pluginLoaded(){
console.log(Plugin loaded!);
alert(Plugin loaded!);
}
var myVideo = document.getElementById(testVideo);
函数plugin0()
{
return document.getElementById('proxyplugin');
}
plugin = plugin0;

< / script>
< body bgcolor =#000000>
< style type =text / css>
.myClass {color:white;文字装饰:粗体;位置:绝对;左:60px;顶部:170像素;宽度:320像素;高度:240像素; }
< / style>

< div style =position:absolute; top:120px; left:60px;>

< video id =testVideowidth =320height =240controls>
< source src =movie.mp4type =video / mp4>
< source src =movie.oggtype =video / ogg>
您的浏览器不支持视频标签。
< / video>

< / div>
< / object>
< / body>
< / html>

请帮忙!!!!

感谢您的意见。



我得到了答案。这是因为chrome标志导致了问题。



我必须明确启用覆盖软件渲染列表Mac,Windows,Linux,Chrome OS,Android 标志。它覆盖内置的软件渲染列表并在不支持的系统配置上启用GPU加速。但我仍然不确定,也不明白为什么软件渲染不能达到预期的效果。为什么硬件渲染需要它。



如果有人可以澄清,这将是有帮助的。



感谢和问候,

Techtotie。

I am facing a weird problem with html display.I have a html page that has both plugin object and video tag. Both are placed under the same area. Plugin area is 970x560 and video area is 320x240px. The plugin renders images which have a rectangular hole cut inside them to view the video(i.e., some part of images rendered have transparent pixels (alpha opaque=0 ) just to display the video).

Now on launching of this html application in chrome, I am able to see only the video first frame and not the image rendered by plugin. But to cross check if the image is rendered or not I dumped the image and they do exist and also when I change the background style property of the plugin like background colour I am able to see the image along with the background only in the recatngular hole cut part of image.

I am posting the html below. The link for video is also posted and image is posted video link http://www.w3schools.com/tags/movie.mp4 (http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_video) image url

![Plugin rendered image with transparent pixels][1]
[1]: http://i.stack.imgur.com/3yLDB.png

HTML Code

 <html>
<head>
    PROXY PLUGIN
</head>
  <script>
   function pluginLoaded() {
              console.log("Plugin loaded!");
              alert("Plugin loaded!");
            }
  var myVideo=document.getElementById("testVideo"); 
  function plugin0()
  {
    return document.getElementById('proxyplugin');
  }
  plugin = plugin0;

</script>
<body bgcolor=#000000>
<style type="text/css">
    .myClass { color: white; text-decoration: bold; position:absolute;left: 60px; top:170px;width:320px;height:240px; }
    </style>

   <div style="position: absolute; top: 120px; left: 60px;">

    <video id="testVideo" width="320" height="240" controls>
      <source src="movie.mp4" type="video/mp4">
      <source src="movie.ogg" type="video/ogg">
      Your browser does not support the video tag.
    </video>

</div>    
<object id="proxyplugin" type="application/x-proxyplugin" bgcolor="#E6E6FA" style="position: absolute;left: 60px; top:120px;  width: 970px; height: 560px;z-index:3" > <param name="onload" value="pluginLoaded" /> <param name="wmode" value="transparent" />
    </object>
 </body>
</html>

Please help!!!!

Thanks in advance, TechTotie.

解决方案

Thanks for your inputs.

I got the answer. It was because of chrome flags that was causing a problem.

I had to explicitly enable "Override software rendering list Mac, Windows, Linux, Chrome OS, Android" flag. It Overrides the built-in software rendering list and enables GPU-acceleration on unsupported system configurations. But I am still not sure and could not understand why software rendering could not do what was expected. Why is Hardware Rendering required for it.

It would be helpful if anyone could clarify.

Thanks and Regards,

Techtotie.

这篇关于插件和录像带的HTML显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆