@gcorevideo/player 2.28.19 → 2.28.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/bottom-gear/gear.scss +2 -2
- package/assets/icons/new/arrow-right.svg +1 -1
- package/assets/icons/new/hd.svg +1 -1
- package/assets/icons/new/speed.svg +1 -1
- package/dist/core.js +1 -1
- package/dist/index.css +344 -344
- package/dist/index.embed.js +29 -19
- package/dist/index.js +29 -20
- package/lib/plugins/level-selector/QualityLevels.d.ts.map +1 -1
- package/lib/plugins/level-selector/QualityLevels.js +4 -0
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +6 -4
- package/lib/plugins/subtitles/ClosedCaptions.d.ts.map +1 -1
- package/lib/plugins/subtitles/ClosedCaptions.js +14 -11
- package/package.json +1 -1
- package/src/plugins/level-selector/QualityLevels.ts +4 -0
- package/src/plugins/media-control/MediaControl.ts +6 -4
- package/src/plugins/subtitles/ClosedCaptions.ts +15 -12
- package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +9 -3
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -132,6 +132,7 @@ describe('ClosedCaptions', () => {
|
|
|
132
132
|
describe('when subtitle is changed', () => {
|
|
133
133
|
beforeEach(async () => {
|
|
134
134
|
emitSubtitleAvailable(core)
|
|
135
|
+
cc.$el.find('#gplayer-cc-button').click()
|
|
135
136
|
await new Promise((resolve) => setTimeout(resolve, 100))
|
|
136
137
|
core.activePlayback.getCurrentTime = vi.fn().mockReturnValue(7)
|
|
137
138
|
core.activeContainer.getCurrentTime = vi.fn().mockReturnValue(7)
|
|
@@ -167,11 +168,16 @@ describe('ClosedCaptions', () => {
|
|
|
167
168
|
),
|
|
168
169
|
},
|
|
169
170
|
]
|
|
171
|
+
cc.$el.find('#gplayer-cc-menu li:nth-child(2) a').click()
|
|
172
|
+
await new Promise((resolve) => setTimeout(resolve, 100))
|
|
173
|
+
// TODO test explicitly that PLAYBACK_SUBTITLE_CHANGED event does not cause track switch
|
|
170
174
|
core.activePlayback.emit(Events.PLAYBACK_SUBTITLE_CHANGED, { id: 2 })
|
|
175
|
+
await new Promise((resolve) => setTimeout(resolve, 100))
|
|
176
|
+
|
|
171
177
|
})
|
|
172
178
|
it('should activate subtitle track', () => {
|
|
173
179
|
expect(core.activePlayback.closedCaptionsTracks[1].track.mode).toBe(
|
|
174
|
-
'
|
|
180
|
+
'hidden',
|
|
175
181
|
)
|
|
176
182
|
expect(core.activePlayback.closedCaptionsTracks[0].track.mode).toBe(
|
|
177
183
|
'hidden',
|
|
@@ -188,8 +194,8 @@ describe('ClosedCaptions', () => {
|
|
|
188
194
|
emitSubtitleAvailable(core)
|
|
189
195
|
cc.$el.find('#gplayer-cc-menu li:nth-child(2) a').click()
|
|
190
196
|
})
|
|
191
|
-
it('should
|
|
192
|
-
expect(core.activePlayback.closedCaptionsTrackId).toEqual(
|
|
197
|
+
it('should deactivate native subtitles track', () => {
|
|
198
|
+
expect(core.activePlayback.closedCaptionsTrackId).toEqual(-1)
|
|
193
199
|
})
|
|
194
200
|
it('should highlight selected menu item', () => {
|
|
195
201
|
expect(
|