svga / SVGAPlayer-Web

Similar to Lottie. Render After Effects / Animate CC (Flash) animations natively on Android and iOS, Web. 使用 SVGAPlayer 在 Android、iOS、Web中播放 After Effects / Animate CC (Flash) 动画。
https://svga.io
Apache License 2.0
954 stars 239 forks source link

ios8.3 系统报错 can't find variable performance #10

Closed ch1ch closed 6 years ago

ch1ch commented 6 years ago

在ios8.3的safari 和微信中无法显示运行。 safari会报错 can't find variable performance 。 请问如何解决,多谢-

PonyCui commented 6 years ago

没有遇到你说的问题

ch1ch commented 6 years ago

解决了,在之前加一段

window.performance = window.performance || {} ; window.performance.now = window.performance.now ||( function() { var st =Date.now(); return function() { return Date.now() - st ;} } )() ;

就可以了。

PonyCui commented 6 years ago

这个 performance 的 polyfill 在 Player 内部也是有实现的