【问题标题】:How to embed text in video using flowplayer?如何使用 flowplayer 在视频中嵌入文本?
【发布时间】:2015-02-01 05:56:39
【问题描述】:

flowplayer 有一个视频正在播放,可以在我的网站上下载。

我正在使用以下代码从右侧为文本设置动画:使用 jquery 从 100% 到左侧 100%。

 flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", {
                wmode: 'transparent',
                // the content plugin will show the ad
                plugins: {
                    myContent: {
                        url: 'flowplayer.content-3.2.9.swf',
                        wmode: 'transparent',
                        top: 20,
                        right: '129%',
                        opacity: 0.8,
                        width: '295',
                        borderRadius: 0,
                        padding: 0,
                        background: 'transparent',
                        border: '0px solid transparent',
                        backgroundGradient: 'none',
                        style: {
                            '.title': {
                                fontSize: 16,
                                fontFamily: 'verdana,arial,helvetica'
                            }
                        },
                    }
                },
                clip: {
                    url: 'stepup.mp4',

                    // make something happen on the mid of clip
                    onCuepoint: [[1000 * 60], function(clip, cuepoint) {

                            var plugin = this.getPlugin("myContent");

                            plugin.setHtml('<p>This is sample text</p>');

                            plugin.animate({left: '129%'}, 90000);

                        }],
                }
            });
        });

以下代码有两个问题:

1) 我将如何在视频中间设置提示点。目前设置为第 60 秒。

2) 如何在停止时停止文本动画并在恢复时开始。

3) 我如何保持从视频左边缘到视频右边缘的动画屏幕宽度。

4) 视频中嵌入的文本是否会存在于下载的文件中?如果不是,我会怎么做?

提前致谢。

【问题讨论】:

    标签: javascript jquery html flowplayer


    【解决方案1】:

    这是在 Flow 视频中添加字幕的教程。

    示例代码如下:

              <p begin = "00:00:00.01" dur="04.00">
            First caption with default style coming from the Content plugin config
        </p>
    
              <p begin = "00:00:04.19" dur="04.00" style="1">
          2nd caption with timed text styling to make the text white
        </p>
    
              <p begin = "8s" dur="04.00" style="2">
          3rd caption using a small black font
        </p>
         </div>
    

    这里是找到教程的地址:

    http://flash.flowplayer.org/plugins/flash/captions.html

    希望这会有所帮助!

    【讨论】:

    • 谢谢凯文!我已经这样做了。这是我的问题。
    猜你喜欢
    • 1970-01-01
    • 2012-04-01
    • 2014-07-07
    • 2016-12-29
    • 1970-01-01
    • 2013-09-30
    • 2015-06-11
    • 2017-10-06
    • 1970-01-01
    相关资源
    最近更新 更多