0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2024-12-22 13:22:58 -05:00

Fix quality selector

This commit is contained in:
dragongoose 2023-06-13 14:33:14 -04:00
parent cdcb40db52
commit ca599c45a7
No known key found for this signature in database
GPG key ID: 50DB99B921579009

View file

@ -3,7 +3,7 @@
import videojs from 'video.js'
import 'videojs-contrib-quality-levels'
import type { QualityLevelList, QualityLevel } from 'videojs-contrib-quality-levels'
import { useI18n } from 'vue-i18n'
import i18n from '@/i18n'
export const createQualitySelector = (player: any) => {
const qualityLevels: QualityLevelList = player.qualityLevels()
@ -11,7 +11,7 @@ export const createQualitySelector = (player: any) => {
const MenuItem = videojs.getComponent('MenuItem')
let formatedQualities: { name: string; index: number; id: string }[]
let t = useI18n()
let t = i18n.global.t
const setQuality = (id: string) => {
const found = formatedQualities.find((i) => i.id === id)