Open brightchip opened 1 year ago
That is a very interesting nested if statement you got going there.
Haven't experience any of these problems that you mention. An example project would be really helpful in trying to debug how these issues are being created.
And for the infinate loading problem it can be solved like this:
player.addEventListener("vmPlaybackReady", (event) => {
let val = event.detail;
if (!val) {
function reloadPlayerSource() {
const vmFile = document.querySelector("vm-file");
if (vmFile) {
if (vmFile.mediaEl) {
vmFile.dispatch("duration", vmFile.mediaEl.duration);
vmFile.dispatch("playbackRates", vmFile.playbackRates);
}
// vmFile.onLoadedMetadata();
vmFile.onTextTracksChange();
vmFile.dispatch("playbackReady", true);
if (currentTime) {
player.currentTime = currentTime;
}
vmFile.onProgress();
hiddenControls(true);
}
}
reloadPlayerSource();
}
});
The package has so many problems. Sorry I didn't prepare any example project but The bugs should be appearing very often if you're actually using it.
On mobile, The controls along with the scrim do not hide at all for which it happens every time after entering fullscreen and sometimes after sliding the seekbar or interact with the controls (You can try it on your home page with a mobile device: https://vimejs.com/). Gladly for this problem, I had made some changes and can make it work.
The loading screen does not hide even when the video is playing. This is not ocurred every time.
On mobile, the video player has no sound (Not a problem of mute button but the volume being too low to generate a sound. It's about 0 or 1 )!! And for this problem I had made a manully volume setting:
I think the iOS should be supported atlest in non-fullscreen mode . Currently the UI are entirely from iOS default .