LoadingProgress returns the progress at loading the GIF into memory as a fraction spanning 0 to 1.
()
| 126 | |
| 127 | // LoadingProgress returns the progress at loading the GIF into memory as a fraction spanning 0 to 1. |
| 128 | func (gifAnim *GifAnimation) LoadingProgress() float32 { |
| 129 | |
| 130 | for len(gifAnim.progressChannel) > 0 { |
| 131 | gifAnim.progress = <-gifAnim.progressChannel |
| 132 | } |
| 133 | return gifAnim.progress |
| 134 | |
| 135 | } |
| 136 | |
| 137 | type GifPlayer struct { |
| 138 | Animation *GifAnimation |