add posterMix

This commit is contained in:
Harvey committed 2021-11-01 09:21:14 +08:00
1 parent d5b4851a8f
commit ec97a5912e
9 files changed
+77 -55

No files matched your search

+12 -1
View File
@@ -1,6 +1,17 @@
const $container = document.querySelector('.artplayer-app');
// 在服务器端可以直接访问 Artplayer.html 属性,返回供 ssr 使用的 html
// 然后直接插值于播放器的容器里
// const Artplayer = require('artplayer');
// console.log(Artplayer.html);
// 在浏览器端,开启 useSSR 即可
// 模拟效果
$container.innerHTML = Artplayer.html;
var art = new Artplayer({
useSSR: true,
container: '.artplayer-app',
container: $container,
url: 'https://artplayer.org/assets/sample/video.mp4',
title: 'One More Time One More Chance',
poster: '/assets/sample/poster.jpg',