HTML5视频元素不显示海报

HTML5视频元素不显示海报

本文介绍了iPad HTML5视频元素不显示海报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个iPad应用程序,它通过XML动态加载信息,其中一些显示在视频标签中。

I'm building an iPad app that loads information dynamically via XML, some of which is displayed in video tags.

标签本身工作正常,视频可以加载和播放,但由于某些原因,iPad不想呈现视频的海报属性。

The tags themselves work properly and the video can load and play, but for some reason, the iPad doesn't want to render the poster attributes for the videos.

然而,一旦我播放任何视频,所有突然之间,所有的海报都会在任何时候出现一个视频元素。

However, once I play any of the videos, all of a sudden all of the posters will show up anytime a video element is displayed.

其他人在网页加载时让视频元素显示海报有问题吗?

Anyone else had problems getting video elements to display posters on page load?

以下是我嵌入视频的方式:

Here's how I'm embedding the video:

<video id="videoPlayer" src=" + videoURL + " poster=" + posterURL + " controls="controls" width="480" height="360">&nbsp;</video>


推荐答案

可能是一个非常规修复,但加载海报在页面上的其他地方(不会向用户显示)的图像,每当我加载视频节点时,海报就会奇迹般地出现。

Might be an unconventional fix, but by loading the poster image somewhere else on the page (that doesn't get displayed to the user) the poster would miraculously show up whenever I loaded my video nodes.

这篇关于iPad HTML5视频元素不显示海报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 19:03