gpt4 book ai didi

javascript - Popcorn.js 淡入/淡出字幕

转载 作者:行者123 更新时间:2023-11-30 06:33:36 26 4
gpt4 key购买 nike

我正在寻找一种使用 Popcorn.js 使视频字幕淡入淡出的方法。

就目前而言,似乎只是在使字幕内联或不显示字幕之间进行艰难的切换。

          start: function( event, options ){
options.innerContainer.style.display = "inline";
options.showSubtitle( options, options.text );
},

end: function( event, options ) {
options.innerContainer.style.display = "none";
options.innerContainer.innerHTML = "";
},

我该如何管理?

谢谢!

最佳答案

您可以使用 fadeIn() 和 fadeOut jquery 方法。把字幕放到一个div里就搞定了。

// Start
$('#mysubtitleDIV').fadeIn('slow');

// End
$('#imagediv').fadeOut('slow');

关于javascript - Popcorn.js 淡入/淡出字幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16018538/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com