用于 html5 视频插播广告的 jQuery 插件?

发布于 2024-08-28 05:31:16 字数 134 浏览 5 评论 0原文

是否有适用于 html5 视频的 jQuery 插件可以在视频中插入视频内广告?

大多数 Flash 的工作原理是在特定时间戳暂停视频,播放广告流,然后恢复原始视频流。 html5 的 jquery 字幕插件看起来非常相似,但又有所不同。

Are there any jQuery plugins for html5 video to insert instream ads into the video?

Most of the flash ones work by pausing the video at a particular timestamp, and playing an ad stream, then resuming the original video stream. The jquery captions plugin for html5 seems very similar, but different.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凉城 2024-09-04 05:31:16

我没有找到任何插件,但我修补了 jCap 以提供回调并制作了一个添加示例:
http://github.com/irae/jCaps/blob/master/addsexample。 html

$("#myVid").jCaps({
    language: 'en',
    languageChooser: false,
    toggleButton: false,
    onButton: false,
    offButton: false,
    interfaceImg: false,
    transcriptButton:false,
    showCaptions: true,
    transcriptType: 'html',
    transcriptsDiv: $('#transcripts'),
    subtitleChangeCallback:function(oldV,newV) {
        if(!addShown) {
            addShown = true;
            $('#myVid').get(0).pause();
            setTimeout(function(){
                $('#captions').text('');
                $('#myVid').get(0).play();
            },5*1000); // time to show add (5 seconds)
        }
    }
});

这并不理想。如果我是你,我会为此从头开始一个新插件。在 jCap 已有功能的基础上进行构建并不困难。

I didn't find any plugins, but I've patched jCap to provide a callback and made an add example:
http://github.com/irae/jCaps/blob/master/addsexample.html

$("#myVid").jCaps({
    language: 'en',
    languageChooser: false,
    toggleButton: false,
    onButton: false,
    offButton: false,
    interfaceImg: false,
    transcriptButton:false,
    showCaptions: true,
    transcriptType: 'html',
    transcriptsDiv: $('#transcripts'),
    subtitleChangeCallback:function(oldV,newV) {
        if(!addShown) {
            addShown = true;
            $('#myVid').get(0).pause();
            setTimeout(function(){
                $('#captions').text('');
                $('#myVid').get(0).play();
            },5*1000); // time to show add (5 seconds)
        }
    }
});

This is not ideal. If I were you, I've started a new plugin from scratch just for that. It's not difficult to build on top of what's jCap already does.

萌面超妹 2024-09-04 05:31:16

下面是如何将任何 HTML 元素放在视频顶部并在特定时间显示它的快速示例!
http://blog.app-solut.com/2011/03/display-additional-overlay-elements-on-top-of-an-html5-video-element-with-javascript/

Here is quick example of how to put any HTML element on top of a video and show it at a specific time!
http://blog.app-solut.com/2011/03/display-additional-overlay-elements-on-top-of-an-html5-video-element-with-javascript/

和影子一齐双人舞 2024-09-04 05:31:16

与 Flash 相比,HTML5 的启动和加载视频速度肯定要快得多。但是,某些视频的声音往往会延迟或根本无法播放。它还需要工作。

HTML5 definitely starts and loads the video much faster compared to its flash counterpart. However, the sounds of some of the videos tend to either be delayed or they (the sounds) would not play at all. It still needs work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文