Comments (8)
I added the following code:
window.setInterval(function() {
jQuery('div.notify').html(`end: ${video.ended}, ${video.currentTime}, ${video.duration}`);
}, 1000);
the current time and duration are logged correctly, but the numbers are not identical on the ipad and iphone. Looks like a rounding error.
desktop: end: true, 9.357641, 9.357641
iphone: end: false, 9.3566666, 9.35666666666666667.
If you are measuring the time, I think you might need to use an epsilon comparison?
I will try and re-encode the video, and clip a second off, might also help.
from iphone-inline-video.
If you want to enable it on the iPad: #22 (comment)
Normally the ended
event should fire (https://github.com/bfred-it/iphone-inline-video/blob/gh-pages/index.js#L87). When the video ends, could you verify that the ended
property is true on the video with Safari's remote debugger? (e.g. video.ended
) If not, verify that the .currentTime
matches .duration
. It sounds strange that the iPad isn't triggering the event, considering that the module doesn't affect it at all.
from iphone-inline-video.
I am on windows, so that is tricky.
Will it help if you can browse to our test site
You can see a div with the status text on it, which changes under chrome and firefox, but not iphone or ipad.
The video there is now working rather nicely on iphone and ipad so thanks very much for that.
All that remains is that I want to restart the video when it finishes, but alas that event is not triggering on the pad or phone. For reference the jquery is in video.js
Thanks!
from iphone-inline-video.
I have reencoded the video and the end event is now triggering. Judging by what I have been reading video on mobile is a minefield.
Not sure if you want to chalk this up to a glitch. Perhaps you have some idea why the duration was a rounding error higher than the current time.
from iphone-inline-video.
Would you mind sending me the video? There could be issues in setting the time to that specific value (i.e. the browser resets 9.35666666666666667 to 9.3566666 when setting currentTime
and the only solution is to calculate .ended
manually, but it might not show the very last frame in some cases)
from iphone-inline-video.
I published v1.5.0, can you verify that it works with your old video? I skipped the manual currentTime
clamping — the browser does it automatically, which means that if you set currentTime = 10
it should reach the end of the video at 9.35666666666666667
from iphone-inline-video.
I'd love to get this fixed—before I or anyone else bumps into this
from iphone-inline-video.
Eventually I did bump into this with a video having a length of 2.5025025025025025
from iphone-inline-video.
Related Issues (20)
- Handle autoplay state and events correctly HOT 1
- Some properties don't work in fullscreen
- Test HOT 1
- Test
- Replace ಠ with IIV? HOT 5
- Some warnings/errors when installing with npm v5.0.3 HOT 1
- [iOS] Autoplay doesn't work with css prop display:none HOT 1
- Use the iphone-inline-video with vidoe. Js HOT 1
- Would this library work on non-webGL devices? HOT 3
- It doesn't work for in-app video HOT 1
- [Deprecation] 'HTMLVideoElement.webkitDisplayingFullscreen' is deprecated. Please use 'Document.fullscreenElement' instead. HOT 4
- option to force IIV to be used on iOS 11 when in low power mode HOT 1
- vpaid enabled ? HOT 1
- Error DOMException HOT 9
- Is there a way to do this on an iframe element instead of <video>? HOT 1
- Common and es modules HOT 2
- ios11.2.5
- video.pause is not a function. in Chrome device Mode with iPhone simulations only. (React) HOT 1
- Control bar not Hidden HOT 1
- React uses enableInlineVideo to cause the ios8 and 9 devices to play video abnormally HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iphone-inline-video.