diff --git a/scripts/createTests.js b/scripts/createTests.js
index 5854c1b94..7219c29c8 100644
--- a/scripts/createTests.js
+++ b/scripts/createTests.js
@@ -24,7 +24,7 @@ const htmls = glob
.map((item) => item.map((pre) => parse(pre.innerHTML).textContent))
.flat(Infinity)
.filter((item) => item.trim().startsWith('var art'))
- .map((item) => item.replace(/\/assets/g, 'https://artplayer.org/assets'))
+ .map((item) => item.replace(/\/assets/g, './assets'))
.map((item) => item.replace(/\s{3}/g, '\n '));
const tests = `
@@ -38,10 +38,13 @@ describe('Document', function() {
${htmls
.map((item, index) => {
return `
- it('Test${index}', function() {
+ it('Test${index}', function(done) {
${item}
- expect(art.id).to.be.an('number');
+ setTimeout(() => {
+ expect(art.id).to.be.an('number');
+ done();
+ }, 1000);
});`;
})
.join('\n\n')}
diff --git a/test/assets/img/favicon.ico b/test/assets/img/favicon.ico
new file mode 100644
index 000000000..1b9f010e8
Binary files /dev/null and b/test/assets/img/favicon.ico differ
diff --git a/test/assets/img/indicator.svg b/test/assets/img/indicator.svg
new file mode 100644
index 000000000..e0c134312
--- /dev/null
+++ b/test/assets/img/indicator.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/test/assets/img/ploading.gif b/test/assets/img/ploading.gif
new file mode 100644
index 000000000..1a8c97d04
Binary files /dev/null and b/test/assets/img/ploading.gif differ
diff --git a/test/assets/img/state.png b/test/assets/img/state.png
new file mode 100644
index 000000000..f95626e82
Binary files /dev/null and b/test/assets/img/state.png differ
diff --git a/test/assets/sample/danmuku.xml b/test/assets/sample/danmuku.xml
new file mode 100644
index 000000000..52df9f489
--- /dev/null
+++ b/test/assets/sample/danmuku.xml
@@ -0,0 +1 @@
+chat.bilibili.com11724691050000k-v刚看完中文的看完中文版,看一下原版压压惊那一买哇我叫欧布,欧布奥特曼!口昌占戈哥欠刚看完自个儿看吧!今晚三刷!日刷一遍。哈哈89这个数字神了子个看的笑哭我欠的电影票已还老子有杯存了三年的抠脚酒,那些抢着要喝的我这里有在下版本 有何贵干好感动三刷回来留念幸瑜,我们一起去看吧这是什么歌啊啊啊好好听3刷路过看了也没脱单,让我找一个漂亮的德国妹子做女朋友吧!-0-真想问问表白那些人在这里表白算什么只能说你是懦夫电影院看完的+1哪买啊大陆版的宣传片最有感觉你的名字 郑安琪bgm 花火五刷纪念 sc你……我……想和你一起看《你的名字》这就是我们梦寐以求的,唐朝和尚一个人刷了七遍就我了吧,我还是个男生自己看的看完中毒了,越看中毒越深,新海诚你算计我..........misha希望下辈子可以做个东京的帅哥自己看吧自己看吧果然还是大陆版的预告最好看完电影再看预告的那个等等我,我也是哈哈电影院6刷路过截止到20号,断断续续去刷了六遍,也是没谁了火花明天二刷预告好良心刚看完国语感觉各种不适应看完之后更加不可能有女朋友了三刷归来超级好看米兹哈我也觉得大陆的预告最好生蛋胯热我好喜欢这这一段话~~~misa欧布的等等我滚滚滚走错片场了,瞬间笑了王彬力这个宣传片的字幕不知道比电影院播放的正片好多少这个宣传片的字幕比影院播放的正片好太多了预告片,大陆这版做的最为优秀好看好温柔的声音,大爱美丽而致命看完第二天分手贼好看被同事安利好久,所以决定不看了欧布奥特曼!哪买啊!!!!!哦列哇,速趴塞牙人贝剧塔。为什么会早就该分手呢哈哈,zwj1每日刷预告让我失忆一天,我再去看一遍花火的最后一分钟才是。。。这个BGM是10分钟的雅蠛蝶!!!!祝表白的单身到死。不怎么好看,天天想而已2017年继续刷说的对↑浓缩的都是精华,,,,看透太多神木DD少年音好苏这段剪的好好浪漫噢赶上了我们这儿的最后一场π_πLYR自己看感觉不错天降正义什么时候可以看我要看整部在哪里可以看整部求地址求地址在哪里可以看整部bgm 火花av7752928 萌新剪辑英文歌BGM加你的名字求支持火花的后半段,中间bgm特长张瀚我看几遍都没想哭的感觉五刷路过电影院去了四遍希望快出资源,没能二刷有点遗憾在中国这样的评价不错了郑立!!!电影院20刷达成!中文字幕最美三叶的口嚼酒我能喝到肝硬化靓女啊在 这 停 顿其他9位老伙伴你们好好棒看的午夜场 整个电影院就像是被我们四人包场了泪目你好!我看了四遍加藤惠请高数CYQ我下辈子还爱他来世我要做东京的帅哥不想出门,在网上看了盗版的我的妈呀那些不知道男主女主名字的人不要刷好吗看着别扭男主たき女主みつはみやみつmistuha 拼错了是mistuha!!!十刷MS。自己看吧hyx♡虎艺寻♡スパークル運命だとか未来とか運命だとか未来とかって言葉が どれだけ手を伸ばそうと 届かない場所で僕ら恋をする時計の針を2人を横目に見ながら進むそんな世界を2人で一生いや何生でも生き抜いていこう不管“命运”“未来”这种话语有多少来伸出手吧我们在它们传达不到的地方恋爱在两人深情对视时两人在那样的世界里永生永世坚强地活下去それは、夢のような景色のようにそれは、まるで夢の景色のようにただひたすらに美しい眺めだった神木dd声音好棒啊看了很多地区预还是觉得大陆预告舒服看过电影还是很激动豆瓣现在8.5电影院看超棒一般般我也就看了100多遍而已表白能当着面去说么三叶毒晚期这样好痛苦,我记得你,你不记得我你们这群渣渣我直接带她看的看完就表白每次到着都鸡皮疙瘩一身…好ㄟ我3刷了十刷路过真·神作真·神作为啥我听不见qwq1.5倍速出戏哈哈哈哈哈哈哈0.5倍速美哭了这段BGM在一个近⑨分钟的音乐里,非常好听。想看看不了啊啊啊啊啊啊啊啊希望下辈子可以做个京都的帅哥ctOS的别跑,决战到天亮没声音的我是一个人吗看哭了预告片看了好多次表白的原地爆炸啊!(╯‵□′)╯︵┴─┴0.5#0.5#瞬间解毒6的一批- - 每次到这里总会起鸡皮疙瘩美不胜收看看看一直不敢看第二遍,怕把自己又看哭看来八遍了ovuvuevuevue enyetuenwuevue ugbemugbem osasovuvuevuevue enyetuenwuevue ugbemugbem osas赵威最后一句太好听了爱♥爱♥我和我的左手CJX ZZC 2017.2.17想念你和对象一起去看过我也觉得最后一句太美了天啊,整屏都是字^o^已看完你的名字,茨木童子本大爷的名字,世间无人不晓up的头像把我的感动整没了.吉良吉影王卿一起去看吧0.5声线都变了2333333全片最感动的地方之一!!麦涛 看了八次泪目!!!!君の名は你的名字是,,,吉良吉影你的名字是,,,吉良吉影2017-03-19刷3遍的在此(*¯︶¯*)无限大な梦のあとの 何もない世の中じゃ每次看都激动啊看完以后老子月考就上去了 神奇我的鸡皮疙瘩~他的名字是-xr和我家小可爱一起去看的(男的)朝、目が覚めるとなぜか泣いている。朝、目が覚めるとなぜか泣いている。見ていたはずの夢はいつも思い出せないただ、ずっと何かを・・・誰かを探している你的名字本大爷下次要做个漂亮的小姐姐 芒果没感觉还点进来的你是有多贱?二刷了看完泪目了和美美哒女孩子一起看的,开心~距喜欢pv这段了!!!!讲的是什么啊龙思颖画质好评.misuha!!!小僚机,我知道你会来看想不起就别想了吾名欧布,我将照亮黑暗,击退邪恶。。。米子哈他ki谷看了八遍无论你在世界的哪里,我都会再一次的去见你,周佳音无论你在世界的哪里,我都会再一次的去见你,周佳音无论你在世界的哪里,我都会再一次的去见你,周佳音无论你在世界的哪里,我都会再一次的去见你,周佳音无论你在世界的哪里,我都会再一次的去见你,周佳音神木小天使的声音啊啊啊啊苏爆了每天刷几遍!预告片真的超好 字幕翻译也好那买的啊“爱”就是科学与逻辑永远无法解释的程序。“爱”就是科学与逻辑永远无法解释的程序。“爱”就是科学与逻辑永远无法解释的程序。“爱”就是科学与逻辑永远无法解释的程序。画质感人217.6.1表白神木小天使!!!神木DD赛高!!!再次回归和朋友去看的……走低的原因还不是因为某些“先进”的家长以为这是吸氧羊就带着孩子去看,结果呢?这里的伴奏真的好配啊!订电影票时就看到只有我的头像是没有泷的三叶。。。不要说票房低。你的名字在浙江青少年间的知名度几乎是百分之后刷人名的原地爆炸语文课PPT无论你在这个世界上的任何地方,我都会去见你喵,还记得一起看完的么名侦探柯南 是个侦探你的名字 陈同宙bgm:黄昏之时bgm:黄昏之时bgm黄昏之时你是谁?神木dd!!斯提拉mitsuhaみつは!!!欧布!自己看吧在下坂本最后一句真美你的名字 一目连_(:3 」∠ )_这段话好喜欢mzx那买啊哇卓涵字为什么666非常喜欢我叫赵卫东无数次刷预告片,如果电影院能在上映就好了表白我神木的声音啊啊啊啊啊啊过了半年再刷 还是激动到捂嘴神作火花这部电影的BGM次次听都能想起来电影里的场景然后开始泪目哭什么哭必须刷50遍以上感动的要死算是考古吧看的我泪流满面带有色眼镜的小粉红求你原地爆炸结果跟基友看了。。。鸡皮疙瘩,最喜欢你的名字:陈常鑫你的名字:陈常鑫三刷 无悔!表示看预告片也能看哭 美不胜收好巧我101遍国语版的真心不好听嗷嗷嗷最后一句太好听了每次看都有说不出的东西我的入宅作!入宅神作看了两遍哭了两遍我咧瓦路飞鸡皮疙瘩我电影院刷了2遍,云盘20遍极速救不了这画质画质666666这不是你们的表白墙谢谢最喜欢的这段对话嘟嘟嘟嵩嵩三叶是我的中国版预告片真的很棒宫水三叶立花泷,夫妻携手战B萌。泷叶八进四生死局,请大家投票支援!宫水三叶立花泷,夫妻携手战B萌。泷叶八进四生死局,请大家投票支援!宫水三叶立花泷,夫妻携手战B萌。泷叶八进四生死局,请大家投票支援!宫水三叶立花泷,夫妻携手战B萌。泷叶八进四生死局,请大家投票支援!宫水三叶立花泷,夫妻携手战B萌。泷叶八进四生死局,请大家投票支援!宫水三叶立花泷,夫妻携手战B萌。泷叶八进四生死局,请大家投票支援!宫水三叶立花泷,夫妻携手战B萌。泷叶八进四生死局,请大家投票支援!看完就表白,然后就在一起了你的名字超级喜欢大陆版这个预告超级喜欢大陆的版本!这里的BGM确实是スパ一クル的,不过要等7分多钟才到那儿看过了这个背影由我承包↓超喜欢这段!!!嘉什么时候中国也能出这样的电影朝目が覚めると なぜか泣いている 見ていたはずの夢は いつも思い出せないただ ずっと何かを探している覚えってない相変わらずエッチしたい想问一下手机里的信息是怎么消失的见你 哪怕是借助神的力量大陆这剪辑真是人才盘李猿的够了我想下辈子是一个漂亮的小姐姐希望我下辈子能做一个漂亮的小姐姐mmp啦啦啦啦承包新海诚艾子健......................白色强势看预告比正片有感觉系列声音好甜啊耳机福利是米子哈,不是米傻好吧讲真 大陆剪辑是我觉得最好的版本..无论在哪我都会去找你,周元歆无论在哪我都会去找你,周元歆无论在哪我都会去找你,周元歆无论在哪我都会去找你,周元歆无论在哪我都会去找你,周元歆无论在哪我都会去找你,周元歆无论在哪我都会去找你,周元歆无论在哪我都会去找你,周元歆无论在哪我都会去找你,周元歆无论在哪我都会去找你,周元歆16刷无悔每次到陨石这里就一身鸡皮疙瘩好感人啊zzy滝君 覚えて ない?これってもしかして俺たち夢の中で入れ替わってる求野生字幕君把罗马音加上,急急急~@你的光头! !ちょっと 滝君男子の視線 スカッと注意てめぇ 三葉俺の人間関係変えるなよほんとに自分のおっぱい好きあなあの男(女)は消えてるまさかはっきり覚えてる誰だ誰誰に会いに来た夢は夢は目覚めればいつか消える違う夢じゃなかったあの人の一个星期连着看了4遍,看一遍哭一遍(17.11.8)合影2017双11从隔壁英语版过来米萨!!!!!!老娘名字tara(滑稽)耶稣基督!bgm燃起一年后再来看预告片66666666666BGM好棒!ly一起看吧泪目这里的BGM是什么啊求BGM约会必看HYJ真的好想和你一起看一周年后,我还是一个人韩越珊走吧,相约电影院配音好赞别说了,三叶是我的超喜欢预告的剪辑对!就是这个纪录片超感动!!!不对,不是纪录片是预告片听到这音乐就鸡皮疙瘩最喜欢大陆的预告片虐了自己一个人看吧我们已经分手了耶稣基督!看宣传片都会泪目的电影你的名字:奥巴马bgm火花每天看一遍bgm是黄昏之时 32秒开始还是大陆版的预告片最好看配音好好你的绳子欧蕾哇索隆你的好友:RADWIMPS已上线啊,“一起看吧”,这句话简直太美了,不去看都不行啊哭了 呼吸都在颤抖我们已经分手了美不胜收看哭了我真的感动我还是忘不了巨石强森真的是百看不厌怎么下载成mp3三叶的口嚼酒喝到肝硬化的站住,我能喝到肾衰~2016 12月 一起看的同学们 你们好吗不想忘记你这预告片比电影还带劲我来了真的是神剪辑!每日一刷mjx你为什么要拒绝我asa、me ga sameruto nazeka naiteiru。tada (tada) zutto nanika o sagashiteiru.takikun....oboete nai?miteita hazu no yume wa itsumo omoidasenaityotto takikun, danshi no shisen, sukato tyuihontoni jibun no oppai suki yanakietekuano otoko (onna) wamasaka hakkiri oboeteruanohito no mamae omoidasen noiutamontandatigau, yume jya nakatta.omae no sekai doko ni itemo kanarazu ainiku tekimi no namae wa? namae wa?当年一起看你的名字的同学,现在,你们还好吗鸡皮疙瘩爱lxc 我想和你一起看我在电视看了完整 的电影好球!夸爆洋次郎哇预告片都好燃 好喜欢 够我无限循环了说实话陨石这里的音乐能加进一个防空警报就更好了6666哈哈看了四遍不止,还各种安利给别人看,可惜别人好像都看不懂声优的声音太无敌了新海诚不相信爱情
diff --git a/test/assets/sample/layer.png b/test/assets/sample/layer.png
new file mode 100644
index 000000000..8df7bc4b6
Binary files /dev/null and b/test/assets/sample/layer.png differ
diff --git a/test/assets/sample/poster.jpg b/test/assets/sample/poster.jpg
new file mode 100644
index 000000000..8de637316
Binary files /dev/null and b/test/assets/sample/poster.jpg differ
diff --git a/test/assets/sample/subtitle.ass b/test/assets/sample/subtitle.ass
new file mode 100644
index 000000000..11fffa8c2
--- /dev/null
+++ b/test/assets/sample/subtitle.ass
@@ -0,0 +1,97 @@
+[Script Info]
+; This is an Advanced Sub Station Alpha v4+ script.
+Title: phpNOQ5Gi
+ScriptType: v4.00+
+Collisions: Normal
+PlayDepth: 0
+
+[V4+ Styles]
+Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
+Style: Default,Arial,20,&H00FFFFFF,&H0300FFFF,&H00000000,&H02000000,0,0,0,0,100,100,0,0,1,2,1,2,10,10,10,1
+
+[Events]
+Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginV, Effect, Text
+Dialogue: 0,0:00:01.50,0:00:03.95,Default,,0,0,0,,歌名:One More Time,One More Chance\N〖愿往事重来〗
+Dialogue: 0,0:00:04.00,0:00:05.95,Default,,0,0,0,,【新海诚动画】『秒速5センチメートル』\N《秒速5厘米》主题曲
+Dialogue: 0,0:00:06.00,0:00:08.95,Default,,0,0,0,,编曲:森俊之
+Dialogue: 0,0:00:09.00,0:00:11.95,Default,,0,0,0,,作词|作曲|演唱:山崎まさよし <山崎将义>
+Dialogue: 0,0:00:12.00,0:00:15.95,Default,,0,0,0,,
+Dialogue: 0,0:00:16.00,0:00:20.25,Default,,0,0,0,,これ以上何をう失(し)なえば\N【还要再失去什么】
+Dialogue: 0,0:00:20.30,0:00:23.25,Default,,0,0,0,,心は许(ゆる)されるの\N【才能让心得到宽恕?】
+Dialogue: 0,0:00:23.30,0:00:27.25,Default,,0,0,0,,どれ程(ほど)の痛(いた)みならば\N【还要再怎样痛苦】
+Dialogue: 0,0:00:27.30,0:00:30.25,Default,,0,0,0,,もう一度君に会(あ)える\N【才能与你再次相见】
+Dialogue: 0,0:00:30.30,0:00:33.25,Default,,0,0,0,,One more time
+Dialogue: 0,0:00:33.30,0:00:37.95,Default,,0,0,0,,季节(きせつ)よ うつろわないで\N【不愿看到季节的变迁】
+Dialogue: 0,0:00:38.00,0:00:41.05,Default,,0,0,0,,One more time
+Dialogue: 0,0:00:41.10,0:00:45.25,Default,,0,0,0,,ふざけあった时间(じかん)よ\N【曾与你嬉闹的时光啊】
+Dialogue: 0,0:00:45.30,0:00:49.25,Default,,0,0,0,,くいちがうときはいつも\N【每次争执的时候】
+Dialogue: 0,0:00:49.30,0:00:53.10,Default,,0,0,0,,仆が先(さき)に折(お)れたね\N【总是我先让步】
+Dialogue: 0,0:00:53.15,0:00:56.25,Default,,0,0,0,,わがままな性格(せいかく)が\N【你那任性的性格】
+Dialogue: 0,0:00:56.30,0:00:59.25,Default,,0,0,0,,なおさら爱(いと)しくさせた\N【反而令你更加可爱】
+Dialogue: 0,0:00:59.30,0:01:02.95,Default,,0,0,0,,One more chance
+Dialogue: 0,0:01:03.00,0:01:07.25,Default,,0,0,0,,记忆(きおく)に足(あし)を取(と)られて\N【回忆绊住我的脚步】
+Dialogue: 0,0:01:07.30,0:01:10.25,Default,,0,0,0,,One more chance
+Dialogue: 0,0:01:10.30,0:01:14.95,Default,,0,0,0,,次(つぎ)の场所を选(えら)べない\N【无法选择下个地方】
+Dialogue: 0,0:01:15.00,0:01:18.25,Default,,0,0,0,,いつでも捜(さが)しているよ\N【总是在一直寻觅】
+Dialogue: 0,0:01:18.30,0:01:21.95,Default,,0,0,0,,どっかに君の姿(すがた)を\N【寻觅着你的身影】
+Dialogue: 0,0:01:22.00,0:01:23.95,Default,,0,0,0,,向(むか)いのホーム\N【对面的月台上】
+Dialogue: 0,0:01:24.00,0:01:25.95,Default,,0,0,0,,路地裏(ろじうら)の窓(まど)\N【在小巷的窗口里】
+Dialogue: 0,0:01:26.00,0:01:29.25,Default,,0,0,0,,こんなとこにいるはずもないのに\N【尽管明知道你不可能在那里】
+Dialogue: 0,0:01:29.30,0:01:33.25,Default,,0,0,0,,愿(ねが)いがもしも叶(かな)うなら\N【若愿望能够实现】
+Dialogue: 0,0:01:33.30,0:01:36.55,Default,,0,0,0,,いますぐ君のもとへ\N【好想马上去到你身边】
+Dialogue: 0,0:01:36.60,0:01:40.25,Default,,0,0,0,,できないことは もう何もない\N【如今我再也不会有丝毫退缩】
+Dialogue: 0,0:01:40.30,0:01:47.30,Default,,0,0,0,,すべてかけて抱きしめてみせるよ\N【我会不顾一切将你紧紧拥抱】
+Dialogue: 0,0:01:47.35,0:01:51.95,Default,,0,0,0,,
+Dialogue: 0,0:01:52.00,0:01:55.25,Default,,0,0,0,,
+Dialogue: 0,0:01:55.30,0:01:59.25,Default,,0,0,0,,寂(さび)しさ纷(まぎ)らすだけなら\N【如果只是为了排遣寂寞】
+Dialogue: 0,0:01:59.30,0:02:02.95,Default,,0,0,0,,谁でもいいはずなのに\N【其实不管是谁都无所谓】
+Dialogue: 0,0:02:03.00,0:02:07.25,Default,,0,0,0,,星が落(お)ちそうな夜(よる)だから\N【唯有在星辰仿佛要坠落的夜晚】
+Dialogue: 0,0:02:07.30,0:02:10.25,Default,,0,0,0,,自分(じぶん)をいつわれない\N【我无法欺骗自己】
+Dialogue: 0,0:02:10.30,0:02:13.25,Default,,0,0,0,,One more time
+Dialogue: 0,0:02:13.30,0:02:17.25,Default,,0,0,0,,季节(きせつ)よ うつろわないで\N【不愿看到季节的变迁】
+Dialogue: 0,0:02:17.30,0:02:20.25,Default,,0,0,0,,One more time
+Dialogue: 0,0:02:20.30,0:02:24.60,Default,,0,0,0,,ふざけあった时间(じかん)よ\N【曾与你嬉闹的时光啊】
+Dialogue: 0,0:02:24.65,0:02:25.25,Default,,0,0,0,,
+Dialogue: 0,0:02:25.30,0:02:29.05,Default,,0,0,0,,いつでも捜(さが)しているよ\N【总是在一直寻觅】
+Dialogue: 0,0:02:29.10,0:02:32.25,Default,,0,0,0,,どっかに君(きみ)の姿(すがた)を\N【寻觅着你的身影】
+Dialogue: 0,0:02:32.30,0:02:34.25,Default,,0,0,0,,交差点(こうさてん)でも\N【每个十字路口】
+Dialogue: 0,0:02:34.30,0:02:36.25,Default,,0,0,0,,梦の中でも 【每次梦境之中】
+Dialogue: 0,0:02:36.30,0:02:39.95,Default,,0,0,0,,こんなとこにいるはずもないのに\N【尽管明知道你不可能在那里】
+Dialogue: 0,0:02:40.00,0:02:43.25,Default,,0,0,0,,奇迹(きせき)がもしも起(お)こるなら\N【若奇迹将会发生】
+Dialogue: 0,0:02:43.30,0:02:46.95,Default,,0,0,0,,今すぐ君に见せたい\N【我希望马上就能见到你】
+Dialogue: 0,0:02:47.00,0:02:50.25,Default,,0,0,0,,新しい朝(あさ) これからの仆\N【无论崭新的清晨 还是今后的自己】
+Dialogue: 0,0:02:50.30,0:02:57.25,Default,,0,0,0,,言えなかった「好き」という言叶も\N【或是那句没能说出口的「喜欢你」】
+Dialogue: 0,0:02:57.30,0:03:04.45,Default,,0,0,0,,
+Dialogue: 0,0:03:04.50,0:03:05.95,Default,,0,0,0,,
+Dialogue: 0,0:03:06.00,0:03:13.95,Default,,0,0,0,,夏の想い出がまわる\N【夏日的回忆在脑海中回旋】
+Dialogue: 0,0:03:14.00,0:03:20.95,Default,,0,0,0,,ふいに消(き)えた鼓动(こどう)\N【刹那间消失的悸动】
+Dialogue: 0,0:03:21.00,0:03:24.95,Default,,0,0,0,,いつでも捜(さが)しているよ\N【总是在一直寻觅】
+Dialogue: 0,0:03:25.00,0:03:27.95,Default,,0,0,0,,どっかに君の姿(すがた)を\N【寻觅着你的身影】
+Dialogue: 0,0:03:28.00,0:03:29.95,Default,,0,0,0,,明(あ)け方(がた)の街(まち)\N【在拂晓的街头】
+Dialogue: 0,0:03:30.00,0:03:31.95,Default,,0,0,0,,桜木町(さくらぎちょう)で\N【在种满樱树的小镇】
+Dialogue: 0,0:03:32.00,0:03:35.95,Default,,0,0,0,,こんなとこに来(く)るはずもないのに\N【尽管明知道你不可能在那里】
+Dialogue: 0,0:03:36.00,0:03:39.25,Default,,0,0,0,,愿(ねが)いがもしも叶(かな)うなら\N【若愿望能够实现】
+Dialogue: 0,0:03:39.30,0:03:43.05,Default,,0,0,0,,今すぐ君のもとへ\N【现在马上去到你身边】
+Dialogue: 0,0:03:43.10,0:03:46.80,Default,,0,0,0,,できないことは もう何(なに)もない\N【如今我再也不会有丝毫退缩】
+Dialogue: 0,0:03:46.85,0:03:50.60,Default,,0,0,0,,すべてかけて抱きしめてみせるよ\N【我会不顾一切紧紧将你拥抱】
+Dialogue: 0,0:03:50.65,0:03:54.25,Default,,0,0,0,,いつでも捜(さが)しているよ\N【总是在一直寻觅】
+Dialogue: 0,0:03:54.30,0:03:57.70,Default,,0,0,0,,どっかに君のかけらを\N【寻觅着你的片断】
+Dialogue: 0,0:03:57.75,0:03:59.25,Default,,0,0,0,,旅先(たびさき)の店(みせ)\N【在旅途中的小店】
+Dialogue: 0,0:03:59.30,0:04:01.45,Default,,0,0,0,,新闻(しんぶん)の隅(すみ)\N【在报纸的角落】
+Dialogue: 0,0:04:01.50,0:04:04.95,Default,,0,0,0,,こんなとこにあるはずもないのに\N【尽管明知道你不可能在那里】
+Dialogue: 0,0:04:05.00,0:04:08.25,Default,,0,0,0,,奇迹(きせき)がもしも起(お)こるなら\N【若奇迹将会发生】
+Dialogue: 0,0:04:08.30,0:04:12.25,Default,,0,0,0,,今すぐ君に见せたい\N【我希望现在就能见到你】
+Dialogue: 0,0:04:12.30,0:04:16.05,Default,,0,0,0,,新しい朝(あさ) これからの仆\N【无论崭新的清晨 还是今后的自己】
+Dialogue: 0,0:04:16.10,0:04:19.40,Default,,0,0,0,,言えなかった「好き」という言叶も\N【或是那句没能说出口的「喜欢你」】
+Dialogue: 0,0:04:19.45,0:04:19.95,Default,,0,0,0,,
+Dialogue: 0,0:04:20.00,0:04:22.95,Default,,0,0,0,,いつでも捜(さが)してしまう\N【总是在一直寻觅】
+Dialogue: 0,0:04:23.00,0:04:26.95,Default,,0,0,0,,どっかに君の笑颜(えがお)を\N【寻觅着你的笑容】
+Dialogue: 0,0:04:27.00,0:04:30.25,Default,,0,0,0,,急行(きゅうこう)待ちの 踏切(ふみきり)あたり\N【哪怕在等待列车通过的铁路道口】
+Dialogue: 0,0:04:30.30,0:04:34.25,Default,,0,0,0,,こんなとこにいるはずもないのに\N【虽然明明知道你不可能在那里】
+Dialogue: 0,0:04:34.30,0:04:37.95,Default,,0,0,0,,命(いのち)が缲(く)り返(かえ)すならば\N【如果生命能够重来】
+Dialogue: 0,0:04:38.00,0:04:41.05,Default,,0,0,0,,何度(なんど)も君のもとへ\N【无论几次我都要去你身边】
+Dialogue: 0,0:04:41.10,0:04:45.15,Default,,0,0,0,,欲(ほ)しいものなど もう何もない\N【那时我一定别无所求】
+Dialogue: 0,0:04:45.20,0:04:52.75,Default,,0,0,0,,君のほかに大切なものなど\N【再也没有什么比你更加重要】
+Dialogue: 0,0:04:52.80,0:05:10.95,Default,,0,0,0,,
+Dialogue: 0,0:05:11.00,0:05:15.45,Default,,0,0,0,,
+Dialogue: 0,0:05:15.50,0:05:25.50,Default,,0,0,0,,--终わり--
\ No newline at end of file
diff --git a/test/assets/sample/subtitle.srt b/test/assets/sample/subtitle.srt
new file mode 100644
index 000000000..6a82b395a
--- /dev/null
+++ b/test/assets/sample/subtitle.srt
@@ -0,0 +1,402 @@
+1
+00:00:01,500 --> 00:00:03,950
+One More Time,One More Chance
+愿往事重来
+
+2
+00:00:04,000 --> 00:00:05,950
+秒速5センチメートル
+秒速5厘米
+
+3
+00:00:06,000 --> 00:00:08,950
+编曲:森俊之
+
+4
+00:00:09,000 --> 00:00:11,950
+山崎まさよし
+山崎将义
+
+5
+00:00:12,000 --> 00:00:15,950
+
+
+6
+00:00:16,000 --> 00:00:20,250
+これ以上何をう失(し)なえば
+还要再失去什么
+
+7
+00:00:20,300 --> 00:00:23,250
+心は许(ゆる)されるの
+才能让心得到宽恕?
+
+8
+00:00:23,300 --> 00:00:27,250
+どれ程(ほど)の痛(いた)みならば
+还要再怎样痛苦
+
+9
+00:00:27,300 --> 00:00:30,250
+もう一度君に会(あ)える
+才能与你再次相见
+
+10
+00:00:30,300 --> 00:00:33,250
+One more time
+
+11
+00:00:33,300 --> 00:00:37,950
+季节(きせつ)よ うつろわないで
+不愿看到季节的变迁
+
+12
+00:00:38,000 --> 00:00:41,050
+One more time
+
+13
+00:00:41,100 --> 00:00:45,250
+ふざけあった时间(じかん)よ
+曾与你嬉闹的时光啊
+
+14
+00:00:45,300 --> 00:00:49,250
+くいちがうときはいつも
+每次争执的时候
+
+15
+00:00:49,300 --> 00:00:53,100
+仆が先(さき)に折(お)れたね
+总是我先让步
+
+16
+00:00:53,150 --> 00:00:56,250
+わがままな性格(せいかく)が
+你那任性的性格
+
+17
+00:00:56,300 --> 00:00:59,250
+なおさら爱(いと)しくさせた
+反而令你更加可爱
+
+18
+00:00:59,300 --> 00:01:02,950
+One more chance
+
+19
+00:01:03,000 --> 00:01:07,250
+记忆(きおく)に足(あし)を取(と)られて
+回忆绊住我的脚步
+
+20
+00:01:07,300 --> 00:01:10,250
+One more chance
+
+21
+00:01:10,300 --> 00:01:14,950
+次(つぎ)の场所を选(えら)べない
+无法选择下个地方
+
+22
+00:01:15,000 --> 00:01:18,250
+いつでも捜(さが)しているよ
+总是在一直寻觅
+
+23
+00:01:18,300 --> 00:01:21,950
+どっかに君の姿(すがた)を
+寻觅着你的身影
+
+24
+00:01:22,000 --> 00:01:23,950
+向(むか)いのホーム
+对面的月台上
+
+25
+00:01:24,000 --> 00:01:25,950
+路地裏(ろじうら)の窓(まど)
+在小巷的窗口里
+
+26
+00:01:26,000 --> 00:01:29,250
+こんなとこにいるはずもないのに
+尽管明知道你不可能在那里
+
+27
+00:01:29,300 --> 00:01:33,250
+愿(ねが)いがもしも叶(かな)うなら
+若愿望能够实现
+
+28
+00:01:33,300 --> 00:01:36,550
+いますぐ君のもとへ
+好想马上去到你身边
+
+29
+00:01:36,600 --> 00:01:40,250
+できないことは もう何もない
+如今我再也不会有丝毫退缩
+
+30
+00:01:40,300 --> 00:01:47,300
+すべてかけて抱きしめてみせるよ
+我会不顾一切将你紧紧拥抱
+
+31
+00:01:47,350 --> 00:01:51,950
+
+
+32
+00:01:52,000 --> 00:01:55,250
+
+
+33
+00:01:55,300 --> 00:01:59,250
+寂(さび)しさ纷(まぎ)らすだけなら
+如果只是为了排遣寂寞
+
+34
+00:01:59,300 --> 00:02:02,950
+谁でもいいはずなのに
+其实不管是谁都无所谓
+
+35
+00:02:03,000 --> 00:02:07,250
+星が落(お)ちそうな夜(よる)だから
+唯有在星辰仿佛要坠落的夜晚
+
+36
+00:02:07,300 --> 00:02:10,250
+自分(じぶん)をいつわれない
+我无法欺骗自己
+
+37
+00:02:10,300 --> 00:02:13,250
+One more time
+
+38
+00:02:13,300 --> 00:02:17,250
+季节(きせつ)よ うつろわないで
+不愿看到季节的变迁
+
+39
+00:02:17,300 --> 00:02:20,250
+One more time
+
+40
+00:02:20,300 --> 00:02:24,600
+ふざけあった时间(じかん)よ
+曾与你嬉闹的时光啊
+
+41
+00:02:24,650 --> 00:02:25,250
+
+
+42
+00:02:25,300 --> 00:02:29,050
+いつでも捜(さが)しているよ
+总是在一直寻觅
+
+43
+00:02:29,100 --> 00:02:32,250
+どっかに君(きみ)の姿(すがた)を
+寻觅着你的身影
+
+44
+00:02:32,300 --> 00:02:34,250
+交差点(こうさてん)でも
+每个十字路口
+
+45
+00:02:34,300 --> 00:02:36,250
+梦の中でも 每次梦境之中
+
+46
+00:02:36,300 --> 00:02:39,950
+こんなとこにいるはずもないのに
+尽管明知道你不可能在那里
+
+47
+00:02:40,000 --> 00:02:43,250
+奇迹(きせき)がもしも起(お)こるなら
+若奇迹将会发生
+
+48
+00:02:43,300 --> 00:02:46,950
+今すぐ君に见せたい
+我希望马上就能见到你
+
+49
+00:02:47,000 --> 00:02:50,250
+新しい朝(あさ) これからの仆
+无论崭新的清晨 还是今后的自己
+
+50
+00:02:50,300 --> 00:02:57,250
+言えなかった「好き」という言叶も
+或是那句没能说出口的「喜欢你」
+
+51
+00:02:57,300 --> 00:03:04,450
+
+
+52
+00:03:04,500 --> 00:03:05,950
+
+
+53
+00:03:06,000 --> 00:03:13,950
+夏の想い出がまわる
+夏日的回忆在脑海中回旋
+
+54
+00:03:14,000 --> 00:03:20,950
+ふいに消(き)えた鼓动(こどう)
+刹那间消失的悸动
+
+55
+00:03:21,000 --> 00:03:24,950
+いつでも捜(さが)しているよ
+总是在一直寻觅
+
+57
+00:03:25,000 --> 00:03:27,950
+どっかに君の姿(すがた)を
+寻觅着你的身影
+
+58
+00:03:28,000 --> 00:03:29,950
+明(あ)け方(がた)の街(まち)
+在拂晓的街头
+
+59
+00:03:30,000 --> 00:03:31,950
+桜木町(さくらぎちょう)で
+在种满樱树的小镇
+
+60
+00:03:32,000 --> 00:03:35,950
+こんなとこに来(く)るはずもないのに
+尽管明知道你不可能在那里
+
+61
+00:03:36,000 --> 00:03:39,250
+愿(ねが)いがもしも叶(かな)うなら
+若愿望能够实现
+
+62
+00:03:39,300 --> 00:03:43,050
+今すぐ君のもとへ
+现在马上去到你身边
+
+63
+00:03:43,100 --> 00:03:46,800
+できないことは もう何(なに)もない
+如今我再也不会有丝毫退缩
+
+64
+00:03:46,850 --> 00:03:50,600
+すべてかけて抱きしめてみせるよ
+我会不顾一切紧紧将你拥抱
+
+65
+00:03:50,650 --> 00:03:54,250
+いつでも捜(さが)しているよ
+总是在一直寻觅
+
+66
+00:03:54,300 --> 00:03:57,700
+どっかに君のかけらを
+寻觅着你的片断
+
+67
+00:03:57,750 --> 00:03:59,250
+旅先(たびさき)の店(みせ)
+在旅途中的小店
+
+68
+00:03:59,300 --> 00:04:01,450
+新闻(しんぶん)の隅(すみ)
+在报纸的角落
+
+69
+00:04:01,500 --> 00:04:04,950
+こんなとこにあるはずもないのに
+尽管明知道你不可能在那里
+
+70
+00:04:05,000 --> 00:04:08,250
+奇迹(きせき)がもしも起(お)こるなら
+若奇迹将会发生
+
+71
+00:04:08,300 --> 00:04:12,250
+今すぐ君に见せたい
+我希望现在就能见到你
+
+72
+00:04:12,300 --> 00:04:16,050
+新しい朝(あさ) これからの仆
+无论崭新的清晨 还是今后的自己
+
+73
+00:04:16,100 --> 00:04:19,400
+言えなかった「好き」という言叶も
+或是那句没能说出口的「喜欢你」
+
+74
+00:04:19,450 --> 00:04:19,950
+
+
+75
+00:04:20,000 --> 00:04:22,950
+いつでも捜(さが)してしまう
+总是在一直寻觅
+
+76
+00:04:23,000 --> 00:04:26,950
+どっかに君の笑颜(えがお)を
+寻觅着你的笑容
+
+77
+00:04:27,000 --> 00:04:30,250
+急行(きゅうこう)待ちの 踏切(ふみきり)あたり
+哪怕在等待列车通过的铁路道口
+
+78
+00:04:30,300 --> 00:04:34,250
+こんなとこにいるはずもないのに
+虽然明明知道你不可能在那里
+
+79
+00:04:34,300 --> 00:04:37,950
+命(いのち)が缲(く)り返(かえ)すならば
+如果生命能够重来
+
+80
+00:04:38,000 --> 00:04:41,050
+何度(なんど)も君のもとへ
+无论几次我都要去你身边
+
+81
+00:04:41,100 --> 00:04:45,150
+欲(ほ)しいものなど もう何もない
+那时我一定别无所求
+
+82
+00:04:45,200 --> 00:04:52,750
+君のほかに大切なものなど
+再也没有什么比你更加重要
+
+83
+00:04:52,800 --> 00:05:10,950
+
+
+84
+00:05:11,000 --> 00:05:15,450
+
+
+85
+00:05:15,500 --> 00:05:25,500
+--终わり--
+
diff --git a/test/assets/sample/subtitle.vtt b/test/assets/sample/subtitle.vtt
new file mode 100644
index 000000000..0d7bcb10e
--- /dev/null
+++ b/test/assets/sample/subtitle.vtt
@@ -0,0 +1,404 @@
+WEBVTT
+
+1
+00:00:01.500 --> 00:00:03.950
+歌名:One More Time,One More Chance
+愿往事重来
+
+2
+00:00:04.000 --> 00:00:05.950
+秒速5センチメートル
+秒速5厘米
+
+3
+00:00:06.000 --> 00:00:08.950
+编曲:森俊之
+
+4
+00:00:09.000 --> 00:00:11.950
+山崎まさよし
+山崎将义
+
+5
+00:00:12.000 --> 00:00:15.950
+
+
+6
+00:00:16.000 --> 00:00:20.250
+これ以上何をう失(し)なえば
+还要再失去什么
+
+7
+00:00:20.300 --> 00:00:23.250
+心は许(ゆる)されるの
+才能让心得到宽恕?
+
+8
+00:00:23.300 --> 00:00:27.250
+どれ程(ほど)の痛(いた)みならば
+还要再怎样痛苦
+
+9
+00:00:27.300 --> 00:00:30.250
+もう一度君に会(あ)える
+才能与你再次相见
+
+10
+00:00:30.300 --> 00:00:33.250
+One more time
+
+11
+00:00:33.300 --> 00:00:37.950
+季节(きせつ)よ うつろわないで
+不愿看到季节的变迁
+
+12
+00:00:38.000 --> 00:00:41.050
+One more time
+
+13
+00:00:41.100 --> 00:00:45.250
+ふざけあった时间(じかん)よ
+曾与你嬉闹的时光啊
+
+14
+00:00:45.300 --> 00:00:49.250
+くいちがうときはいつも
+每次争执的时候
+
+15
+00:00:49.300 --> 00:00:53.100
+仆が先(さき)に折(お)れたね
+总是我先让步
+
+16
+00:00:53.150 --> 00:00:56.250
+わがままな性格(せいかく)が
+你那任性的性格
+
+17
+00:00:56.300 --> 00:00:59.250
+なおさら爱(いと)しくさせた
+反而令你更加可爱
+
+18
+00:00:59.300 --> 00:01:02.950
+One more chance
+
+19
+00:01:03.000 --> 00:01:07.250
+记忆(きおく)に足(あし)を取(と)られて
+回忆绊住我的脚步
+
+20
+00:01:07.300 --> 00:01:10.250
+One more chance
+
+21
+00:01:10.300 --> 00:01:14.950
+次(つぎ)の场所を选(えら)べない
+无法选择下个地方
+
+22
+00:01:15.000 --> 00:01:18.250
+いつでも捜(さが)しているよ
+总是在一直寻觅
+
+23
+00:01:18.300 --> 00:01:21.950
+どっかに君の姿(すがた)を
+寻觅着你的身影
+
+24
+00:01:22.000 --> 00:01:23.950
+向(むか)いのホーム
+对面的月台上
+
+25
+00:01:24.000 --> 00:01:25.950
+路地裏(ろじうら)の窓(まど)
+在小巷的窗口里
+
+26
+00:01:26.000 --> 00:01:29.250
+こんなとこにいるはずもないのに
+尽管明知道你不可能在那里
+
+27
+00:01:29.300 --> 00:01:33.250
+愿(ねが)いがもしも叶(かな)うなら
+若愿望能够实现
+
+28
+00:01:33.300 --> 00:01:36.550
+いますぐ君のもとへ
+好想马上去到你身边
+
+29
+00:01:36.600 --> 00:01:40.250
+できないことは もう何もない
+如今我再也不会有丝毫退缩
+
+30
+00:01:40.300 --> 00:01:47.300
+すべてかけて抱きしめてみせるよ
+我会不顾一切将你紧紧拥抱
+
+31
+00:01:47.350 --> 00:01:51.950
+
+
+32
+00:01:52.000 --> 00:01:55.250
+
+
+33
+00:01:55.300 --> 00:01:59.250
+寂(さび)しさ纷(まぎ)らすだけなら
+如果只是为了排遣寂寞
+
+34
+00:01:59.300 --> 00:02:02.950
+谁でもいいはずなのに
+其实不管是谁都无所谓
+
+35
+00:02:03.000 --> 00:02:07.250
+星が落(お)ちそうな夜(よる)だから
+唯有在星辰仿佛要坠落的夜晚
+
+36
+00:02:07.300 --> 00:02:10.250
+自分(じぶん)をいつわれない
+我无法欺骗自己
+
+37
+00:02:10.300 --> 00:02:13.250
+One more time
+
+38
+00:02:13.300 --> 00:02:17.250
+季节(きせつ)よ うつろわないで
+不愿看到季节的变迁
+
+39
+00:02:17.300 --> 00:02:20.250
+One more time
+
+40
+00:02:20.300 --> 00:02:24.600
+ふざけあった时间(じかん)よ
+曾与你嬉闹的时光啊
+
+41
+00:02:24.650 --> 00:02:25.250
+
+
+42
+00:02:25.300 --> 00:02:29.050
+いつでも捜(さが)しているよ
+总是在一直寻觅
+
+43
+00:02:29.100 --> 00:02:32.250
+どっかに君(きみ)の姿(すがた)を
+寻觅着你的身影
+
+44
+00:02:32.300 --> 00:02:34.250
+交差点(こうさてん)でも
+每个十字路口
+
+45
+00:02:34.300 --> 00:02:36.250
+梦の中でも 每次梦境之中
+
+46
+00:02:36.300 --> 00:02:39.950
+こんなとこにいるはずもないのに
+尽管明知道你不可能在那里
+
+47
+00:02:40.000 --> 00:02:43.250
+奇迹(きせき)がもしも起(お)こるなら
+若奇迹将会发生
+
+48
+00:02:43.300 --> 00:02:46.950
+今すぐ君に见せたい
+我希望马上就能见到你
+
+49
+00:02:47.000 --> 00:02:50.250
+新しい朝(あさ) これからの仆
+无论崭新的清晨 还是今后的自己
+
+50
+00:02:50.300 --> 00:02:57.250
+言えなかった「好き」という言叶も
+或是那句没能说出口的「喜欢你」
+
+51
+00:02:57.300 --> 00:03:04.450
+
+
+52
+00:03:04.500 --> 00:03:05.950
+
+
+53
+00:03:06.000 --> 00:03:13.950
+夏の想い出がまわる
+夏日的回忆在脑海中回旋
+
+54
+00:03:14.000 --> 00:03:20.950
+ふいに消(き)えた鼓动(こどう)
+刹那间消失的悸动
+
+55
+00:03:21.000 --> 00:03:24.950
+いつでも捜(さが)しているよ
+总是在一直寻觅
+
+56
+00:03:25.000 --> 00:03:27.950
+どっかに君の姿(すがた)を
+寻觅着你的身影
+
+57
+00:03:28.000 --> 00:03:29.950
+明(あ)け方(がた)の街(まち)
+在拂晓的街头
+
+58
+00:03:30.000 --> 00:03:31.950
+桜木町(さくらぎちょう)で
+在种满樱树的小镇
+
+59
+00:03:32.000 --> 00:03:35.950
+こんなとこに来(く)るはずもないのに
+尽管明知道你不可能在那里
+
+60
+00:03:36.000 --> 00:03:39.250
+愿(ねが)いがもしも叶(かな)うなら
+若愿望能够实现
+
+61
+00:03:39.300 --> 00:03:43.050
+今すぐ君のもとへ
+现在马上去到你身边
+
+62
+00:03:43.100 --> 00:03:46.800
+できないことは もう何(なに)もない
+如今我再也不会有丝毫退缩
+
+63
+00:03:46.850 --> 00:03:50.600
+すべてかけて抱きしめてみせるよ
+我会不顾一切紧紧将你拥抱
+
+64
+00:03:50.650 --> 00:03:54.250
+いつでも捜(さが)しているよ
+总是在一直寻觅
+
+65
+00:03:54.300 --> 00:03:57.700
+どっかに君のかけらを
+寻觅着你的片断
+
+66
+00:03:57.750 --> 00:03:59.250
+旅先(たびさき)の店(みせ)
+在旅途中的小店
+
+67
+00:03:59.300 --> 00:04:01.450
+新闻(しんぶん)の隅(すみ)
+在报纸的角落
+
+68
+00:04:01.500 --> 00:04:04.950
+こんなとこにあるはずもないのに
+尽管明知道你不可能在那里
+
+69
+00:04:05.000 --> 00:04:08.250
+奇迹(きせき)がもしも起(お)こるなら
+若奇迹将会发生
+
+70
+00:04:08.300 --> 00:04:12.250
+今すぐ君に见せたい
+我希望现在就能见到你
+
+71
+00:04:12.300 --> 00:04:16.050
+新しい朝(あさ) これからの仆
+无论崭新的清晨 还是今后的自己
+
+72
+00:04:16.100 --> 00:04:19.400
+言えなかった「好き」という言叶も
+或是那句没能说出口的「喜欢你」
+
+73
+00:04:19.450 --> 00:04:19.950
+
+
+74
+00:04:20.000 --> 00:04:22.950
+いつでも捜(さが)してしまう
+总是在一直寻觅
+
+75
+00:04:23.000 --> 00:04:26.950
+どっかに君の笑颜(えがお)を
+寻觅着你的笑容
+
+76
+00:04:27.000 --> 00:04:30.250
+急行(きゅうこう)待ちの 踏切(ふみきり)あたり
+哪怕在等待列车通过的铁路道口
+
+77
+00:04:30.300 --> 00:04:34.250
+こんなとこにいるはずもないのに
+虽然明明知道你不可能在那里
+
+78
+00:04:34.300 --> 00:04:37.950
+命(いのち)が缲(く)り返(かえ)すならば
+如果生命能够重来
+
+79
+00:04:38.000 --> 00:04:41.050
+何度(なんど)も君のもとへ
+无论几次我都要去你身边
+
+80
+00:04:41.100 --> 00:04:45.150
+欲(ほ)しいものなど もう何もない
+那时我一定别无所求
+
+81
+00:04:45.200 --> 00:04:52.750
+君のほかに大切なものなど
+再也没有什么比你更加重要
+
+82
+00:04:52.800 --> 00:05:10.950
+
+
+83
+00:05:11.000 --> 00:05:15.450
+
+
+84
+00:05:15.500 --> 00:05:25.500
+--终わり--
+
diff --git a/test/assets/sample/thumbnails.png b/test/assets/sample/thumbnails.png
new file mode 100644
index 000000000..42f844be8
Binary files /dev/null and b/test/assets/sample/thumbnails.png differ
diff --git a/test/assets/sample/video.flv b/test/assets/sample/video.flv
new file mode 100644
index 000000000..375acb751
Binary files /dev/null and b/test/assets/sample/video.flv differ
diff --git a/test/assets/sample/video.mp4 b/test/assets/sample/video.mp4
new file mode 100644
index 000000000..386ebf6f2
Binary files /dev/null and b/test/assets/sample/video.mp4 differ
diff --git a/test/document.test.js b/test/document.test.js
index 6219a73e0..5a4eff263 100644
--- a/test/document.test.js
+++ b/test/document.test.js
@@ -5,61 +5,73 @@ describe("Document", function () {
});
});
- it("Test0", function () {
+ it("Test0", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
var $video = art.template.query(".art-video");
console.info($video);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test1", function () {
+ it("Test1", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
var $video = art.query(".art-video");
console.info($video);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test2", function () {
+ it("Test2", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.storage.set("your-key", "your-value");
art.storage.get("your-key");
art.storage.del("your-key");
art.storage.clean();
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test3", function () {
+ it("Test3", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.i18n.get("Play"));
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test4", function () {
+ it("Test4", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
lang: "jp",
});
art.i18n.update({
@@ -83,15 +95,18 @@ describe("Document", function () {
},
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test5", function () {
+ it("Test5", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
subtitle: {
- url: "https://artplayer.org/assets/sample/subtitle.srt",
+ url: "./assets/sample/subtitle.srt",
encoding: "utf-8",
@@ -115,15 +130,18 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test6", function () {
+ it("Test6", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
subtitle: {
- url: "https://artplayer.org/assets/sample/subtitle.srt",
+ url: "./assets/sample/subtitle.srt",
encoding: "utf-8",
@@ -139,19 +157,22 @@ describe("Document", function () {
art.on("ready", () => {
art.seek = 20;
setTimeout(() => {
- art.subtitle.switch("https://artplayer.org/assets/sample/subtitle.srt");
+ art.subtitle.switch("./assets/sample/subtitle.srt");
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test7", function () {
+ it("Test7", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
- var img = "https://artplayer.org/assets/sample/layer.png";
+ var img = "./assets/sample/layer.png";
art.on("ready", () => {
setTimeout(() => {
art.layers.add({
@@ -170,26 +191,32 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test8", function () {
+ it("Test8", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.notice.show = "自定义提示信息1";
art.notice.show = "自定义提示信息2";
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test9", function () {
+ it("Test9", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
setTimeout(() => {
@@ -197,13 +224,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test10", function () {
+ it("Test10", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
setTimeout(() => {
@@ -223,13 +253,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test11", function () {
+ it("Test11", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.contextmenu.show = true;
@@ -238,13 +271,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test12", function () {
+ it("Test12", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.contextmenu.show = true;
@@ -261,13 +297,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test13", function () {
+ it("Test13", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.loading.show = true;
@@ -276,13 +315,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test14", function () {
+ it("Test14", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.mask.show = true;
@@ -291,13 +333,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test15", function () {
+ it("Test15", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.hotkey.add(65, () => {
@@ -308,13 +353,16 @@ describe("Document", function () {
});
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test16", function () {
+ it("Test16", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
setting: true,
autoSize: true,
});
@@ -326,13 +374,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test17", function () {
+ it("Test17", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
setting: true,
autoSize: true,
});
@@ -350,73 +401,91 @@ describe("Document", function () {
});
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test18", function () {
+ it("Test18", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(Artplayer.instances.length);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test19", function () {
+ it("Test19", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("video:play", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test20", function () {
+ it("Test20", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test21", function () {
+ it("Test21", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("play", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test22", function () {
+ it("Test22", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("pause", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test23", function () {
+ it("Test23", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("seek", (...args) => {
console.info(args);
@@ -425,13 +494,16 @@ describe("Document", function () {
art.seek = 5;
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test24", function () {
+ it("Test24", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("volume", (...args) => {
console.info(args);
@@ -440,13 +512,16 @@ describe("Document", function () {
art.volume = 0.5;
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test25", function () {
+ it("Test25", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("destroy", (...args) => {
console.info(args);
@@ -455,37 +530,46 @@ describe("Document", function () {
art.destroy();
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test26", function () {
+ it("Test26", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("focus", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test27", function () {
+ it("Test27", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("blur", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test28", function () {
+ it("Test28", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("hover", (state) => {
// state 为true时,鼠标从外面移进播放器
@@ -493,256 +577,325 @@ describe("Document", function () {
console.info(state);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test29", function () {
+ it("Test29", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
autoSize: true,
});
art.on("resize", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test30", function () {
+ it("Test30", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("mousemove", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test31", function () {
+ it("Test31", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("url", (...args) => {
console.info(args);
});
art.on("ready", (...args) => {
- art.url = "https://artplayer.org/assets/sample/video.mp4?t=0";
+ art.url = "./assets/sample/video.mp4?t=0";
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test32", function () {
+ it("Test32", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
fullscreen: true,
});
art.on("fullscreen", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test33", function () {
+ it("Test33", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
fullscreenWeb: true,
});
art.on("fullscreenWeb", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test34", function () {
+ it("Test34", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("hotkey", (...args) => {
console.info(args);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test35", function () {
+ it("Test35", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test36", function () {
+ it("Test36", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
// container: document.querySelector('.artplayer-app'),
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test37", function () {
+ it("Test37", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test38", function () {
+ it("Test38", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
- poster: "https://artplayer.org/assets/sample/poster.jpg",
+ url: "./assets/sample/video.mp4",
+ poster: "./assets/sample/poster.jpg",
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test39", function () {
+ it("Test39", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
title: "【新海诚动画】『秒速5センチメートル』",
screenshot: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test40", function () {
+ it("Test40", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
theme: "#ffad00",
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test41", function () {
+ it("Test41", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
volume: 0.5,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test42", function () {
+ it("Test42", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
isLive: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test43", function () {
+ it("Test43", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
muted: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test44", function () {
+ it("Test44", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
autoplay: true,
muted: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test45", function () {
+ it("Test45", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
autoMini: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test46", function () {
+ it("Test46", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
loop: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test47", function () {
+ it("Test47", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
flip: true,
setting: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test48", function () {
+ it("Test48", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
rotate: true,
setting: true,
autoSize: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test49", function () {
+ it("Test49", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
playbackRate: true,
setting: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test50", function () {
+ it("Test50", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
aspectRatio: true,
setting: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test51", function () {
+ it("Test51", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
screenshot: true,
// 可选
moreVideoAttr: {
@@ -750,97 +903,124 @@ describe("Document", function () {
},
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test52", function () {
+ it("Test52", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
setting: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test53", function () {
+ it("Test53", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
hotkey: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test54", function () {
+ it("Test54", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
pip: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test55", function () {
+ it("Test55", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
mutex: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test56", function () {
+ it("Test56", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
fullscreen: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test57", function () {
+ it("Test57", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
fullscreenWeb: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test58", function () {
+ it("Test58", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
subtitle: {
- url: "https://artplayer.org/assets/sample/subtitle.srt",
+ url: "./assets/sample/subtitle.srt",
},
setting: true,
subtitleOffset: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test59", function () {
+ it("Test59", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
miniProgressBar: true,
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test60", function () {
+ it("Test60", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
localVideo: true,
controls: [
{
@@ -857,13 +1037,16 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test61", function () {
+ it("Test61", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
localSubtitle: true,
controls: [
{
@@ -880,13 +1063,16 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test62", function () {
+ it("Test62", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
setting: true,
settings: [
{
@@ -929,13 +1115,16 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test63", function () {
+ it("Test63", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
contextmenu: [
{
html: "自定义菜单",
@@ -952,13 +1141,16 @@ describe("Document", function () {
art.contextmenu.show = true;
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test64", function () {
+ it("Test64", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
controls: [
{
disable: false,
@@ -1004,37 +1196,43 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test65", function () {
+ it("Test65", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
quality: [
{
default: true,
html: "SD 480P",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
},
{
html: "HD 720P",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
},
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test66", function () {
+ it("Test66", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
highlight: [
{
time: 60,
@@ -1068,28 +1266,34 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test67", function () {
+ it("Test67", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
whitelist: ["iPhone OS 11"],
// whitelist: ['*'],
// whitelist: [(ua) => /iPhone OS 11/gi.test(ua)],
// whitelist: [/iPhone OS 11/gi],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test68", function () {
+ it("Test68", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
thumbnails: {
- url: "https://artplayer.org/assets/sample/thumbnails.png",
+ url: "./assets/sample/thumbnails.png",
number: 100,
@@ -1101,15 +1305,18 @@ describe("Document", function () {
},
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test69", function () {
+ it("Test69", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
subtitle: {
- url: "https://artplayer.org/assets/sample/subtitle.srt",
+ url: "./assets/sample/subtitle.srt",
encoding: "utf-8",
@@ -1123,13 +1330,16 @@ describe("Document", function () {
},
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test70", function () {
+ it("Test70", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
moreVideoAttr: {
"webkit-playsinline": true,
@@ -1137,17 +1347,20 @@ describe("Document", function () {
},
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test71", function () {
+ it("Test71", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
icons: {
- loading: '
',
+ loading: '
',
- state: '
',
+ state: '
',
play: "",
@@ -1171,23 +1384,29 @@ describe("Document", function () {
},
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test72", function () {
+ it("Test72", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.flv",
+ url: "./assets/sample/video.flv",
type: "flv",
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test73", function () {
+ it("Test73", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.flv",
+ url: "./assets/sample/video.flv",
customType: {
flv: function (video, url, art) {
// video: 视频dom元素
@@ -1197,23 +1416,29 @@ describe("Document", function () {
},
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test74", function () {
+ it("Test74", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
lang: "en",
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test75", function () {
+ it("Test75", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
autoSize: true,
setting: true,
playbackRate: true,
@@ -1277,29 +1502,35 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test76", function () {
+ it("Test76", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
plugins: [
artplayerPluginDanmuku({
// 弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致
- danmuku: "https://artplayer.org/assets/sample/danmuku.xml",
+ danmuku: "./assets/sample/danmuku.xml",
}),
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test77", function () {
+ it("Test77", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
plugins: [
artplayerPluginDanmuku({
// 使用 Promise 异步返回
@@ -1331,16 +1562,19 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test78", function () {
+ it("Test78", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
plugins: [
artplayerPluginDanmuku({
- danmuku: "https://artplayer.org/assets/sample/danmuku.xml",
+ danmuku: "./assets/sample/danmuku.xml",
}),
],
controls: [
@@ -1366,16 +1600,19 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test79", function () {
+ it("Test79", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
plugins: [
artplayerPluginDanmuku({
- danmuku: "https://artplayer.org/assets/sample/danmuku.xml",
+ danmuku: "./assets/sample/danmuku.xml",
}),
],
controls: [
@@ -1399,16 +1636,19 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test80", function () {
+ it("Test80", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
plugins: [
artplayerPluginDanmuku({
- danmuku: "https://artplayer.org/assets/sample/danmuku.xml",
+ danmuku: "./assets/sample/danmuku.xml",
}),
],
controls: [
@@ -1436,16 +1676,19 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test81", function () {
+ it("Test81", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
plugins: [
artplayerPluginDanmuku({
- danmuku: "https://artplayer.org/assets/sample/danmuku.xml",
+ danmuku: "./assets/sample/danmuku.xml",
}),
],
controls: [
@@ -1473,26 +1716,32 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test82", function () {
+ it("Test82", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
muted: true,
});
art.on("ready", () => {
art.play();
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test83", function () {
+ it("Test83", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
muted: true,
});
art.on("ready", () => {
@@ -1502,13 +1751,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test84", function () {
+ it("Test84", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
muted: true,
});
art.on("ready", () => {
@@ -1518,37 +1770,46 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test85", function () {
+ it("Test85", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.seek = 5;
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test86", function () {
+ it("Test86", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.forward = 5;
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test87", function () {
+ it("Test87", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.seek = 5;
@@ -1557,13 +1818,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test88", function () {
+ it("Test88", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.volume);
@@ -1571,63 +1835,69 @@ describe("Document", function () {
console.info(art.volume);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test89", function () {
+ it("Test89", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.url);
- art.url = "https://artplayer.org/assets/sample/video.mp4?t=0";
+ art.url = "./assets/sample/video.mp4?t=0";
console.info(art.url);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test90", function () {
+ it("Test90", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.seek = 10;
setTimeout(() => {
- art.switchUrl(
- "https://artplayer.org/assets/sample/video.mp4?t=0",
- "新视频名字"
- );
+ art.switchUrl("./assets/sample/video.mp4?t=0", "新视频名字");
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test91", function () {
+ it("Test91", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.seek = 10;
setTimeout(() => {
- art.switchQuality(
- "https://artplayer.org/assets/sample/video.mp4?t=0",
- "新视频地址"
- );
+ art.switchQuality("./assets/sample/video.mp4?t=0", "新视频地址");
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test92", function () {
+ it("Test92", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.muted);
@@ -1635,13 +1905,16 @@ describe("Document", function () {
console.info(art.muted);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test93", function () {
+ it("Test93", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.currentTime);
@@ -1649,64 +1922,79 @@ describe("Document", function () {
console.info(art.currentTime);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test94", function () {
+ it("Test94", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.duration);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test95", function () {
+ it("Test95", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.seek = 10;
art.screenshot();
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test96", function () {
+ it("Test96", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.seek = 10;
art.getDataURL().then((url) => console.info(url));
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test97", function () {
+ it("Test97", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.seek = 10;
art.getBlobUrl().then((url) => console.info(url));
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test98", function () {
+ it("Test98", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
fullscreen: true,
});
art.on("ready", () => {
@@ -1716,13 +2004,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test99", function () {
+ it("Test99", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
fullscreenWeb: true,
});
art.on("ready", () => {
@@ -1732,13 +2023,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test100", function () {
+ it("Test100", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
fullscreenWeb: true,
});
art.on("ready", () => {
@@ -1748,28 +2042,34 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test101", function () {
+ it("Test101", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
- poster: "https://artplayer.org/assets/sample/poster.jpg",
+ url: "./assets/sample/video.mp4",
+ poster: "./assets/sample/poster.jpg",
});
art.on("ready", () => {
console.info(art.poster);
- art.poster = "https://artplayer.org/assets/sample/poster.jpg?t=0";
+ art.poster = "./assets/sample/poster.jpg?t=0";
console.info(art.poster);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test102", function () {
+ it("Test102", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.mini = true;
@@ -1778,13 +2078,16 @@ describe("Document", function () {
}, 3000);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test103", function () {
+ it("Test103", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
muted: true,
});
art.on("ready", () => {
@@ -1793,13 +2096,16 @@ describe("Document", function () {
console.info(art.playing);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test104", function () {
+ it("Test104", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.autoSize);
@@ -1807,25 +2113,31 @@ describe("Document", function () {
console.info(art.autoSize);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test105", function () {
+ it("Test105", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(JSON.stringify(art.rect));
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test106", function () {
+ it("Test106", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.flip);
@@ -1833,13 +2145,16 @@ describe("Document", function () {
console.info(art.flip);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test107", function () {
+ it("Test107", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
autoSize: true,
});
art.on("ready", () => {
@@ -1848,13 +2163,16 @@ describe("Document", function () {
console.info(art.rotate);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test108", function () {
+ it("Test108", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.playbackRate);
@@ -1862,13 +2180,16 @@ describe("Document", function () {
console.info(art.playbackRate);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test109", function () {
+ it("Test109", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.aspectRatio);
@@ -1876,13 +2197,16 @@ describe("Document", function () {
console.info(art.aspectRatio);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test110", function () {
+ it("Test110", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
console.info(art.loop);
@@ -1890,25 +2214,31 @@ describe("Document", function () {
console.info(art.loop);
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test111", function () {
+ it("Test111", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
});
art.on("ready", () => {
art.destroy();
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test112", function () {
+ it("Test112", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
controls: [
{
position: "right",
@@ -1921,13 +2251,13 @@ describe("Document", function () {
html: 'Subtitle 01',
- url: "https://artplayer.org/assets/sample/subtitle.srt?id=1",
+ url: "./assets/sample/subtitle.srt?id=1",
},
{
html: 'Subtitle 02',
- url: "https://artplayer.org/assets/sample/subtitle.srt?id=2",
+ url: "./assets/sample/subtitle.srt?id=2",
},
],
@@ -1942,13 +2272,16 @@ describe("Document", function () {
],
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
- it("Test113", function () {
+ it("Test113", function (done) {
var art = new Artplayer({
container: ".artplayer-app",
- url: "https://artplayer.org/assets/sample/video.mp4",
+ url: "./assets/sample/video.mp4",
setting: true,
});
art.on("ready", () => {
@@ -2002,6 +2335,9 @@ describe("Document", function () {
var $setting1 = art.setting["setting1"];
});
- expect(art.id).to.be.an("number");
+ setTimeout(() => {
+ expect(art.id).to.be.an("number");
+ done();
+ }, 1000);
});
});