player.js
player.js copied to clipboard
Subtitles are not enabled when passing as options to loadVideo
Expected Behavior
- When passing texttrack in the options to loadVideo, the video should load with the expected texttrack enabled.
Actual Behavior
- The texttrack is not enabled. However, the texttrack can be enabled by calling enableTextTrack after the video is loaded.
- Also, when passing texttrack as an option when initializing the player, it works as expected.
Steps to Reproduce
CodeSandbox here: https://codesandbox.io/s/vimeo-player-subtitle-loadvideo-issue-vsexxs?file=/src/index.ts
- Make sure "None" (or something other than "English") is selected for subtitles.
- Press play on the video and fast forward to the end, forcing the next video to play.
- When using code (1) in the sandbox, the English subtitles will not be enabled when the next video loads.
- Switch to using code (2) and try again. The English subtitles will be enabled as expected when loading the next video.