File tree 3 files changed +12
-1
lines changed
java/com/example/ponycui_home/svgaplayer
library/src/main/java/com/opensource/svgaplayer 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ public void onClick(View view) {
37
37
38
38
private void loadAnimation () {
39
39
SVGAParser svgaParser = SVGAParser .Companion .shareParser ();
40
- String name = this .randomSample ();
40
+ // String name = this.randomSample();
41
+ //asset jojo_audio.svga cannot callback
42
+ String name = "jojo_audio.svga" ;
41
43
Log .d ("SVGA" , "## name " + name );
42
44
svgaParser .setFrameSize (100 , 100 );
43
45
svgaParser .decodeFromAssets (name , new SVGAParser .ParseCompletion () {
Original file line number Diff line number Diff line change @@ -187,6 +187,15 @@ class SVGAVideoEntity {
187
187
}
188
188
setupSoundPool(entity, completionBlock)
189
189
val audiosFileMap = generateAudioFileMap(entity)
190
+ /* *
191
+ * repair audio error it not callback
192
+ audiosFileMap.size==0 soundPool?.load will not go
193
+ setOnLoadCompleteListener will not run
194
+ completionBlock not run cannot callback
195
+ */
196
+ if (audiosFileMap.size== 0 ){
197
+ run (completionBlock)
198
+ }
190
199
this .audioList = entity.audios.map { audio ->
191
200
return @map createSvgaAudioEntity(audio, audiosFileMap)
192
201
}
You can’t perform that action at this time.
0 commit comments