我已在JW播放器上上传了视频,并且具有视频iframe的嵌入式代码。 这是代码:
<div itemscope itemtype="https://schema.org/VideoObject">
<meta itemprop="uploadDate" content="Mon Oct 19 2020 20:05:26 GMT+0530 (India Standard Time)"/>
<meta itemprop="name" content="Videoplayback"/>
<meta itemprop="duration" content="PT1M44S" />
<meta itemprop="thumbnailUrl" content="https://content.jwplatform.com/thumbs/6LW07G5B-640.jpg"/>
<meta itemprop="contentUrl" content="https://content.jwplatform.com/videos/6LW07G5B-YaWb87XS.mp4"/>
<div style="position:relative; overflow:hidden; padding-bottom:56.25%">
<iframe src="https://cdn.jwplayer.com/players/6LW07G5B-idNUUstD.html" width="100%" height="100%" frameborder="0" scrolling="auto" title="Videoplayback" style="position:absolute;" allowfullscreen></iframe>
</div>
</div>
我正在我的react.js项目中使用它,我希望视频可以循环播放。 这是我尝试过的:
const videoView = "https://content.jwplatform.com/videos/6LW07G5B-YaWb87XS.mp4?&autostart=true&repeat=always"
<div itemscope itemtype="https://schema.org/VideoObject">
<meta itemprop="uploadDate" content="Mon Oct 19 2020 20:05:26 GMT+0530 (India Standard Time)"/>
<meta itemprop="name" content="Videoplayback"/>
<meta itemprop="duration" content="PT1M44S" />
<meta itemprop="thumbnailUrl" content="https://content.jwplatform.com/thumbs/6LW07G5B-640.jpg"/>
<meta itemprop="contentUrl" content={videoView}/>
<div style="position:relative; overflow:hidden; padding-bottom:56.25%">
<iframe src="https://cdn.jwplayer.com/players/6LW07G5B-idNUUstD.html" width="100%" height="100%" frameborder="0" scrolling="auto" title="Videoplayback" style="position:absolute;" allowfullscreen></iframe>
</div>
</div>
现在视频显示在页面上,但不会自动开始或循环播放。 我究竟做错了什么? 预先感谢。