mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
简化icon
This commit is contained in:
1 parent
d9b38d8e72
commit
4d537d3872
11 files changed
+58
-51
No files matched your search
@@ -6,11 +6,12 @@ export default function fullscreen(controlOption) {
|
||||
mounted: $control => {
|
||||
const {
|
||||
events: { proxy },
|
||||
icons,
|
||||
i18n,
|
||||
player,
|
||||
} = art;
|
||||
|
||||
const $fullscreen = append($control, art.icons.fullscreen);
|
||||
|
||||
const $fullscreen = append($control, icons.fullscreen);
|
||||
tooltip($fullscreen, i18n.get('Fullscreen'));
|
||||
|
||||
proxy($control, 'click', () => {
|
||||
|
||||
@@ -6,11 +6,12 @@ export default function fullscreenWeb(controlOption) {
|
||||
mounted: $control => {
|
||||
const {
|
||||
events: { proxy },
|
||||
icons,
|
||||
i18n,
|
||||
player,
|
||||
} = art;
|
||||
|
||||
const $fullscreenWeb = append($control, art.icons.fullscreenWeb);
|
||||
const $fullscreenWeb = append($control, icons.fullscreenWeb);
|
||||
tooltip($fullscreenWeb, i18n.get('Web fullscreen'));
|
||||
|
||||
proxy($control, 'click', () => {
|
||||
|
||||
@@ -6,10 +6,11 @@ export default function pip(controlOption) {
|
||||
mounted: $control => {
|
||||
const {
|
||||
events: { proxy },
|
||||
icons,
|
||||
i18n,
|
||||
player,
|
||||
} = art;
|
||||
const $pip = append($control, art.icons.pip);
|
||||
const $pip = append($control, icons.pip);
|
||||
tooltip($pip, i18n.get('Mini player'));
|
||||
proxy($control, 'click', () => {
|
||||
player.pipEnabled();
|
||||
|
||||
@@ -6,12 +6,13 @@ export default function playAndPause(controlOption) {
|
||||
mounted: $control => {
|
||||
const {
|
||||
events: { proxy },
|
||||
player,
|
||||
icons,
|
||||
i18n,
|
||||
player,
|
||||
} = art;
|
||||
|
||||
const $play = append($control, art.icons.play);
|
||||
const $pause = append($control, art.icons.pause);
|
||||
const $play = append($control, icons.play);
|
||||
const $pause = append($control, icons.pause);
|
||||
tooltip($play, i18n.get('Play'));
|
||||
tooltip($pause, i18n.get('Pause'));
|
||||
|
||||
|
||||
@@ -6,11 +6,12 @@ export default function screenshot(controlOption) {
|
||||
mounted: $control => {
|
||||
const {
|
||||
events: { proxy },
|
||||
icons,
|
||||
i18n,
|
||||
player,
|
||||
} = art;
|
||||
|
||||
const $screenshot = append($control, art.icons.screenshot);
|
||||
const $screenshot = append($control, icons.screenshot);
|
||||
tooltip($screenshot, i18n.get('Screenshot'));
|
||||
proxy($screenshot, 'click', () => {
|
||||
player.screenshot();
|
||||
|
||||
@@ -6,11 +6,12 @@ export default function setting(controlOption) {
|
||||
mounted: $control => {
|
||||
const {
|
||||
events: { proxy },
|
||||
icons,
|
||||
i18n,
|
||||
setting,
|
||||
} = art;
|
||||
|
||||
const $setting = append($control, art.icons.setting);
|
||||
const $setting = append($control, icons.setting);
|
||||
tooltip($setting, i18n.get('Show setting'));
|
||||
|
||||
proxy($control, 'click', () => {
|
||||
|
||||
@@ -6,11 +6,12 @@ export default function subtitle(controlOption) {
|
||||
mounted: $control => {
|
||||
const {
|
||||
events: { proxy },
|
||||
icons,
|
||||
i18n,
|
||||
subtitle,
|
||||
} = art;
|
||||
|
||||
const $subtitle = append($control, art.icons.subtitle);
|
||||
const $subtitle = append($control, icons.subtitle);
|
||||
tooltip($subtitle, i18n.get('Hide subtitle'));
|
||||
|
||||
proxy($control, 'click', () => {
|
||||
|
||||
@@ -29,7 +29,7 @@ export default function playbackRateMix(art, player) {
|
||||
|
||||
Object.defineProperty(player, 'playbackRateRemove', {
|
||||
value: () => {
|
||||
if (player.$playbackRateState) {
|
||||
if (player.playbackRateState) {
|
||||
player.playbackRate(1);
|
||||
delete $player.dataset.playbackRate;
|
||||
art.emit('playbackRateRemove');
|
||||
|
||||
@@ -1,16 +1,3 @@
|
||||
function i18nMix(i18n) {
|
||||
i18n.update({
|
||||
'zh-cn': {
|
||||
'Playback of this file format is not supported': '不支持播放该文件格式',
|
||||
'Load local video successfully': '加载本地视频成功',
|
||||
},
|
||||
'zh-tw': {
|
||||
'Playback of this file format is not supported': '不支持播放該文件格式',
|
||||
'Load local video successfully': '加載本地視頻成功',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export default function localPreview(art) {
|
||||
const { append, setStyle, setStyles, sleep } = art.constructor.utils;
|
||||
const {
|
||||
@@ -21,7 +8,17 @@ export default function localPreview(art) {
|
||||
template,
|
||||
player,
|
||||
} = art;
|
||||
i18nMix(i18n);
|
||||
|
||||
i18n.update({
|
||||
'zh-cn': {
|
||||
'Playback of this file format is not supported': '不支持播放该文件格式',
|
||||
'Load local video successfully': '加载本地视频成功',
|
||||
},
|
||||
'zh-tw': {
|
||||
'Playback of this file format is not supported': '不支持播放該文件格式',
|
||||
'Load local video successfully': '加載本地視頻成功',
|
||||
},
|
||||
});
|
||||
|
||||
function loadVideo(file) {
|
||||
if (file) {
|
||||
|
||||
Reference in new issue
Block a user