javascript - 使用 flowplayer 将图像显示为第一帧并单击图像播放视频

标签 javascript html flowplayer

我正在使用flowpalyer播放视频。我试图将 png 图像显示为起始图像而不是常规的黑屏。但由于某种原因它不起作用任何人都可以帮助我确定问题所在

<script type="text/javascript" src="http://brianhaskins.com/protege/flowplayer-3.2.2.min.js"></script>

<div style="width: 290px; padding-bottom: 0px;" id="optin">
<div style="width:264px;height:198px;border:1px solid red;">
<a  href="http://brianhaskins.com/blogvideo/blogoptinfinal/blogoptinfinal.mp4" 
style="display:block;width:290px;height:171px;"     id="player"> </a>
<script language="JavaScript">
flowplayer("player", "http://brianhaskins.com/protege/flowplayer-3.2.2.swf"{

    // here is our playlist with two clips
    playlist: [

        // this first PNG clip works as a splash image
        {
            url: 'http://brianhaskins.com/blogvideo/blogoptinfinal/FirstFrame.png', 
            scaling: 'orig'
        },

        // second clip is a video. when autoPlay is set to false the splash screen will be shown
        {
            url: 'http://brianhaskins.com/blogvideo/blogoptinfinal/blogoptinfinal.mp4', 
            autoPlay: false, 

            // video will be buffered when splash screen is visible
            autoBuffering: true 
        }
    ]
});</script>
</div>

最佳答案

这是我使用的代码。希望它能帮助其他和我处境相同的人

</script><script type="text/javascript" src="http://brianhaskins.com/protege/flowplayer-3.2.2.min.js"></script>

<div style="width: 271px; padding-bottom: 0px;border:3px solid #ccc;margin:0 auto" id="optin">
<div style="width:264px;height:198px;margin:0 auto">
<a  href="http://brianhaskins.com/blogvideo/blogoptinfinal/blogoptinfinal.mp4"  style="display:block;width:264px;height:198px;z-index:300"  id="player"> </a>
<script language="JavaScript">
     flowplayer("player", "http://brianhaskins.com/protege/flowplayer-3.2.2.swf",{

// here is our playlist with two clips
playlist: [

    // this first PNG clip works as a splash image
    {
        url: 'http://brianhaskins.com/blogvideo/blogoptinfinal/FirstFrame.jpg', 
        scaling: 'orig'
    },

    // second clip is a video. when autoPlay is set to false the splash screen will be shown
    {
        url: 'http://brianhaskins.com/blogvideo/blogoptinfinal/blogoptinfinal.mp4', 
        autoPlay: false, 

        // video will be buffered when splash screen is visible
        autoBuffering: true 
    }
]
});</script>

关于javascript - 使用 flowplayer 将图像显示为第一帧并单击图像播放视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5619538/

相关文章:

javascript - HTTP 上传 - 我怎么知道它已完成?

html - 图像对齐中心 - CHROME - FIREFOX - IE

javascript - 等待页面加载或等待 X 秒后再加载播放器

javascript - 使用多个 iframe vids 的 ReactJS 只有 1 个有效,其他是 Promise pending

仅用于数字的 Javascript RegEx(无特殊字符)

html - (CSS) 媒体查询

html - Firefox 在 css 边距填充中显示奇怪的行为不起作用

javascript - flowpayer 无法在 Android 设备上运行。 (需要 Flash 版本 10,1 或更高版本)

apache - Flowplayer 从 apache 流式传输 mp4

javascript - D3 v4 中的 d3.rebind