我对在jwplayer 6中设置水印表示怀疑。 是否有可能将文本设置为水印而不是徽标,如文档URL中所示。 Here
谢谢。
答案 0 :(得分:1)
水印只能是图像。你可以做的一件事是制作一个透明的PNG图像,它只是PhotoShop(或任何其他图像编辑程序)中的文本,并将其用作例如水印图像。
答案 1 :(得分:0)
jwplayer("myElement").setup({
file: "/assets/myVideo.mp4",
height: 360,
image: "/assets/myVideo.jpg",
logo: {
file: '/assets/myLogo.png',
link: 'http://example.com'
},
width: 640
});
答案 2 :(得分:0)
您可以使用脚本和.htaccess文件设置动态水印。 您需要创建一个png图像(可以是不透明的或透明的)。 例如,将其命名为watermark.png。 然后编写一个脚本,如下所示:
<?php
$text="Whatever text you want";
$im = imagecreate($imagewidth, 50);
$bg = imagecolorallocate($im, 200, 200, 200);
$textcolor = imagecolorallocate($im, 0, 0, 0);
// Write the string at the top left
imagestring($im, 5, 5, 3, $text, $textcolor);
// Output the image
header('Content-type: image/png',true,200);
imagepng($im);
imagedestroy($im);
?>
例如,将文件安全为watermark.php。 然后,为了使其在JWplayer中运行,请填写:
logo: {
file: 'watermark.png',
link: 'http://example.com'
},
然后创建一个像这样的.htacces文件来自动加载脚本而不是JWplayer中的watermark.png:
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)watermark.png$ watermark.php [L]
我希望有帮助吗?