Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
{
"path": "./dist/cld-video-player.light.min.js",
"maxSize": "131kb"
"maxSize": "135kb"
},
{
"path": "./lib/cld-video-player.js",
Expand Down
5 changes: 4 additions & 1 deletion src/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ export default {
analytics: false,
cloudinaryAnalytics: true,
allowUsageReport: true,
playedEventPercents: [25, 50, 75, 100]
playedEventPercents: [25, 50, 75, 100],
html5: {
nativeTextTracks: false
}
};
4 changes: 0 additions & 4 deletions src/plugins/chapters/chapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ const ChaptersPlugin = (function () {
default: true
});

// required for Safari to display the captions
// https://github.com/videojs/video.js/issues/8519
await new Promise(resolve => setTimeout(resolve, 100));

const end = this.player.duration();
Object.entries(this.options).forEach((entry, index, arr) => {
const cue = new VTTCue(
Expand Down
4 changes: 0 additions & 4 deletions src/plugins/paced-transcript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ function pacedTranscript(config) {
mode: options.default ? 'showing' : 'disabled'
});

// required for Safari to display the captions
// https://github.com/videojs/video.js/issues/8519
await new Promise(resolve => setTimeout(resolve, 100));

captions.forEach(caption => {
captionsTrack.track.addCue(new VTTCue(caption.startTime, caption.endTime, caption.text));
});
Expand Down
6 changes: 1 addition & 5 deletions src/plugins/srt-text-tracks/srt-text-tracks.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ function srtTextTracks(config, player) {
mode: config.default ? 'showing' : 'disabled'
});

// required for Safari to display the captions
// https://github.com/videojs/video.js/issues/8519
await new Promise(resolve => setTimeout(resolve, 100));

// Add the WebVTT data to the track
webvttCues.forEach(cue => {
if (cue) {
Expand All @@ -47,7 +43,7 @@ function srtTextTracks(config, player) {
// SRT parser
const srt2webvtt = data => {
const SRTParser = new srtParser2();

const cues = SRTParser.fromSrt(data);

return cues.map(cue => ({
Expand Down
Loading