You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the new version of this plugin, you changed the calculation of Ad duration and remaining time
Here you can find before VS now (I simplified and removed functions)
In bold(V1.1.0), the changing line
V0.8:
var remainingTime = this.adsManager.getRemainingTime();
var duration = this.currentAd.getDuration();
var currentTime = duration - remainingTime;
currentTime = currentTime > 0 ? currentTime : 0;
var remainingMinutes = Math.floor(remainingTime / 60);
var remainingSeconds = Math.floor(remainingTime % 60);
if (remainingSeconds.toString().length < 2) {
remainingSeconds = '0' + remainingSeconds;
}
V1.1.0:
var remainingTime = this.adsManager.getRemainingTime();
var duration = this.currentAd.getDuration();
var currentTime = duration - remainingTime;
currentTime = currentTime > 0 ? currentTime : 0;
**var remainingTime = duration - currentTime;** // We override the first remainingTime here
var remainingMinutes = Math.floor(remainingTime / 60);
var remainingSeconds = Math.floor(remainingTime % 60);
if (remainingSeconds.toString().length < 2) {
remainingSeconds = '0' + remainingSeconds;
}
As we use VPaid, sometimes there are strange cases where:
this.currentAd.getDuration() returns -1
this.adsManager.getRemainingTime() return 15 seconds for example (this method seems to be more stable, and return a value in more cases than the other)
As we don't use it anymore to calculate the remaining time, we have sometimes VPaid with -1;-1 values which were not the case in 0.8
Any reasons the two methods return different results?
Thanks
The text was updated successfully, but these errors were encountered:
Hey there - sorry I sent out a PR but forgot to respond here. I'm changing the plugin to avoid re-calculating the remainingTime, so this should fix your issue.
Hi,
Since the new version of this plugin, you changed the calculation of Ad duration and remaining time
Here you can find before VS now (I simplified and removed functions)
In bold(V1.1.0), the changing line
V0.8:
V1.1.0:
As we use VPaid, sometimes there are strange cases where:
this.currentAd.getDuration() returns -1
this.adsManager.getRemainingTime() return 15 seconds for example (this method seems to be more stable, and return a value in more cases than the other)
As we don't use it anymore to calculate the remaining time, we have sometimes VPaid with -1;-1 values which were not the case in 0.8
Any reasons the two methods return different results?
Thanks
The text was updated successfully, but these errors were encountered: