Tôi đã thử phát một video .mp4 từ một trang web (với Thẻ video HTML5) bằng UIWebView. Thiết bị và mô phỏng iPhone/iPad chỉ hiển thị khung màu đen có nút phát được phát. Nếu tôi vừa gọi trang web này trên phiên bản Safari Mac, bạn có thể chơi nó. Có vấn đề gì không?UIWebview không phát mp4 Video
Đây không phải là tệp cục bộ. Html trông giống như sau:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="../css/shared-culture.css" />
</head>
<body>
<section class="base">
<hgroup>
<h1>creative commons</h1>
<h2>a shared culture</h2>
</hgroup>
<p>To celebrate our 2008 fundraising campaign, Creative Commons has
released “A Shared Culture,” a short video by renowned filmmaker <a
href="http://en.wikipedia.org/wiki/Jesse_Dylan">Jesse Dylan</a>. Known for
helming a variety of films, music videos, and the Emmy Award-winning <a
href="http://my.barackobama.com/page/invite/yeswecanvideo">“Yes We Can”</a>
Barack Obama campaign video collaboration with rapper will.i.am, Dylan created
“A Shared Culture” to help spread the word about the Creative Commons mission. </p>
<!-- height="240" width="360" -->
<video id="video1" controls="controls">
<source src="../video/shared-culture.mp4" type="video/mp4"/>
<source src="../video/shared-culture.webm" type="video/webm"/>
<div class="errmsg">
<p>Your Reading System does not support (this) video.</p>
<pre><code>
<video id="video1" controls="controls">
<source src="../video/shared-culture.mp4" type="video/mp4"/>
<source src="../video/shared-culture.webm" type="video/webm"/>
</video>
</code></pre>
</div>
</video>
<p>In the video, some of the leading thinkers behind Creative Commons
describe how the organization is helping “save the world from failed sharing”
through free tools that enable creators to easily make their work available to
the public for legal sharing and remix. Dylan puts the Creative Commons system
into action by punctuating the interview footage with dozens of photos that have
been offered to the public for use under CC licenses. Similarly, he used two
CC-licensed instrumental pieces by Nine Inch Nails as the video’s soundtrack
music. These tracks, “17 Ghosts II” and “21 Ghosts III,” come from the Nine Inch
Nails album Ghosts I-IV, which was released earlier this year under a Creative
Commons BY-NC-SA license. (See <a
href="http://creativecommons.org/videos/a-shared-culture">attribution</a>.)
</p>
</section>
</body>
</html>
là video từ tệp cục bộ, bạn có thể đăng mã 'HTML' của mình không. – arthankamal
Nếu bạn chỉ muốn phát video trong trang web đó, hãy xem [VideoPlayerKit] (https://github.com/ign/VideoPlayerKit). –
Chỉ cần xem nguồn trang tại 'http://my.barackobama.com. . ./video/shared-culture.mp4' và nó tuyên bố thẻ nhúng phim với thuộc tính: 'type =" application/x-shockwave-flash "'. Đối với Apple HLS, bạn cần H.264/AVC trong vùng chứa MPEG2.TS. Tài liệu HLS tại đây: https://developer.apple.com/resources/http-streaming/ –