From d7846e5fbe0ddf79663812810fff0a6eed036fe0 Mon Sep 17 00:00:00 2001 From: yuusora Date: Thu, 13 Jan 2022 09:25:55 +0800 Subject: [PATCH] feat(sub): demo to subtitles --- demo/demo.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/demo/demo.js b/demo/demo.js index acc7112..2509ff6 100644 --- a/demo/demo.js +++ b/demo/demo.js @@ -65,7 +65,23 @@ function initPlayers() { thumbnails: 'https://i.loli.net/2019/06/06/5cf8c5d9cec8510758.jpg' }, subtitle: { - url: 'https://s-sh-17-dplayercdn.oss.dogecdn.com/hikarunara.vtt' + url: [ + { + subtitle: 'https://s-sh-17-dplayercdn.oss.dogecdn.com/hikarunara.vtt', + lang: 'zh-CN', + name: '光', + }, + { + subtitle: 'https://gist.githubusercontent.com/samdutton/ca37f3adaf4e23679957b8083e061177/raw/e19399fbccbc069a2af4266e5120ae6bad62699a/sample.vtt', + lang: 'en-US', + name: 'github', + }, + ], + defaultSubtitle: 7, + type: 'webvtt', + fontSize: '25px', + bottom: '10%', + color: '#b7daff' }, danmaku: { id: '9E2E3368B56CDBB4',