From f45a2153d9147349af6ee9ac78156886c79e612d Mon Sep 17 00:00:00 2001 From: iotcat Date: Sun, 6 Sep 2020 16:09:39 +0800 Subject: [PATCH] lang --- index.html | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/index.html b/index.html index b97a215..92a638e 100644 --- a/index.html +++ b/index.html @@ -5,18 +5,19 @@ ACG.WATCH Player - + +

ACG.WATCH

-

Watch ACG video ONLINE

+

在线观看经典番剧Watch ACG video ONLINE

@@ -27,26 +28,26 @@
-

Name: Unkonwn..

+

视频名称Name: 未知Unkonwn..

- - + +
- Show Video Params -

Instant video params ^_^

+ 展开视频参数Show Video Params +

以下是实时视频参数哦^_^Instant video params ^_^

- - + + @@ -141,7 +142,7 @@
-

Powered By Ushio | Made with love by iotcat

+

Powered By Ushio | Made with love by iotcat


@@ -156,7 +157,7 @@ container: document.getElementById('dplayer'), theme: '#'+('00000'+ (Math.random()*0x1000000<<0).toString(16)).substr(-6), logo: 'https://cdn.yimian.xyz/img/logo/logo_white.png', - lang: 'zh-cn', + lang: ((page.tran.getLang() == 'zh')?'zh-cn':'en'), autoplay: true, video: { pic: 'https://api.yimian.xyz/img/?size=1920x1080', @@ -201,7 +202,10 @@ if(session.get($.md5(options.video.quality[0].url)) != null){ dp.seek(session.get($.md5(options.video.quality[0].url))); options.video.playFrom = session.get($.md5(options.video.quality[0].url)); - dp.notice("已恢复到上次播放位置", 4000); + if(page.tran.getLang() == 'zh') + dp.notice("已恢复到上次播放位置", 4000); + else + dp.notice("Video recovered from Cloud..", 4000); } }); } @@ -229,7 +233,10 @@ session.set($.md5(options.video.quality[0].url), "0"); $.get("https://acg.watch/api/getNextByUrl?url="+options.video.quality[0].url, function(res){ //res = JSON.parse(res); - dp.notice("正在跳转至下一集", 4000); + if(page.tran.getLang() == 'zh') + dp.notice("正在跳转至下一集", 4000); + else + dp.notice("Jumping to the next episode", 4000); setTimeout(function(){ session.set('acg/last_watch', res.url); history.pushState({},page.title,"https://acg.watch/player?url="+res.url); @@ -269,14 +276,14 @@ var getQuality = function(res){ var quality = [ { - name: "推荐", + name: ((page.tran.getLang() == 'zh')?"推荐":'Preferred'), url: res.url } ]; if(res.hasOwnProperty('extra') && res.extra.length > 0){ for(var i = 0; i < res.extra.length; i++){ quality.push({ - name: "备选"+i, + name: ((page.tran.getLang() == 'zh')?"备选":'Backup ')+i, url: res.extra[i] }); } @@ -306,7 +313,10 @@ if(options.video.defaultQuality >= options.video.quality.length - 1){ return; } - dp.notice("监测到卡顿,切换片源"); + if(page.tran.getLang() == 'zh') + dp.notice("监测到卡顿,切换片源"); + else + dp.notice("Detected freeze, trying another source"); options.video.defaultQuality = (options.video.defaultQuality >= options.video.quality.length - 1) ? options.video.defaultQuality : options.video.defaultQuality+1; console.log('Switch quality to ' + options.video.defaultQuality); dp.switchQuality(options.video.defaultQuality);
ParamsValue名称ParamsValue