File tree 3 files changed +6
-1
lines changed
3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ self.lastCurrentTimeReceivedAt = Date.now();
9
9
self . targetFps = 30 ;
10
10
self . libassMemoryLimit = 0 ; // in MiB
11
11
self . renderOnDemand = false ; // determines if only rendering on demand
12
+ self . dropAllAnimations = false ; // set to true to enable "lite mode" with all animations disabled for speed
12
13
13
14
self . width = 0 ;
14
15
self . height = 0 ;
@@ -597,6 +598,7 @@ function onMessageFromMainEmscriptenThread(message) {
597
598
self . libassMemoryLimit = message . data . libassMemoryLimit || self . libassMemoryLimit ;
598
599
self . libassGlyphLimit = message . data . libassGlyphLimit || 0 ;
599
600
self . renderOnDemand = message . data . renderOnDemand || false ;
601
+ self . dropAllAnimations = message . data . dropAllAnimations || false ;
600
602
removeRunDependency ( 'worker-init' ) ;
601
603
break ;
602
604
}
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ Module['onRuntimeInitialized'] = function () {
95
95
self . changed = Module . _malloc ( 4 ) ;
96
96
97
97
self . octObj . initLibrary ( screen . width , screen . height ) ;
98
+ self . octObj . setDropAnimations ( ! ! self . dropAllAnimations ) ;
98
99
self . octObj . createTrack ( "/sub.ass" ) ;
99
100
self . ass_track = self . octObj . track ;
100
101
self . ass_library = self . octObj . ass_library ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ var SubtitlesOctopus = function (options) {
14
14
var self = this ;
15
15
self . canvas = options . canvas ; // HTML canvas element (optional if video specified)
16
16
self . renderMode = options . renderMode || ( options . lossyRender ? 'fast' : ( options . blendRender ? 'blend' : 'normal' ) ) ;
17
+ self . dropAllAnimations = options . dropAllAnimations || false ;
17
18
self . libassMemoryLimit = options . libassMemoryLimit || 0 ; // set libass bitmap cache memory limit in MiB (approximate)
18
19
self . libassGlyphLimit = options . libassGlyphLimit || 0 ; // set libass glyph cache memory limit in MiB (approximate)
19
20
self . targetFps = options . targetFps || 30 ;
@@ -122,7 +123,8 @@ var SubtitlesOctopus = function (options) {
122
123
targetFps : self . targetFps ,
123
124
libassMemoryLimit : self . libassMemoryLimit ,
124
125
libassGlyphLimit : self . libassGlyphLimit ,
125
- renderOnDemand : self . renderAhead > 0
126
+ renderOnDemand : self . renderAhead > 0 ,
127
+ dropAllAnimations : self . dropAllAnimations
126
128
} ) ;
127
129
} ;
128
130
You can’t perform that action at this time.
0 commit comments