New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this expected behavior for setcurrenttime()/play()? #1924
Comments
@someonetookmyname The |
Thank you for the quick reply. |
Actually, I was mistaken .. your suggestion does not work. |
I'll check this and also make sure that there's documentation about it |
For now my focus is on 3.x-dev branch so any fixes will go to that branch given that we will release it soon |
Ok .. thanks very much for looking into it. I'm happy to work with the 3.x-dev branch. Please let me know if I can be of any help. Thanks again, Andrew |
Of course If you test your issue I'm that branch and a test in general just to make sure we're solid I will appreciate it |
Absolutely .. I will put that together and test against the current 3.x-dev and let you know soon ... thanks. |
Hi, I just made a discovery .. calling player.media.play() seems to be what determines if things work as expected (see below) .. though, that makes me more confused as to when I'm supposed to use the main wrapper functions etc. Please shout if any questions about the example or if I can provide further help. Thanks, Andrew Attached is an example .. it behaves the same against 2.23.2 and 3.x-dev.
|
@someonetookmyname I'll check this right now |
@someonetookmyname I know why. |
Hi, Thanks for taking a look .. can you give a few lines of context? .. I just downloaded a fresh mediaelement-3-2.x-dev/, but line 1521 in build/mediaelement-and-player.js doesn't seem like what you are mentioning (unless I'm looking in the wrong file?) Thanks, Andrew |
My apologies. Line 7369 in that file |
Hi, |
Exactly. I'll put the fix once I do more testing to make sure it won't affect anything |
Awesome .. thanks. |
Can you do me a favor and test on iPhone please? I can't test it right now but if you can help me with that and in an iPad I'd appreciate it |
I haven't put the fix yet but if you can use your files to test it would be great |
Hi, |
I just had 1 test out of ~25 start from 0 instead of the offset .. it was on OS X Desktop. Not sure how much to worry about that. |
I'm not sure I understand the last comment, but to give you some context of the nature of the piece of code added as a part of the play method that is messing with setCurrentTime: in 2013 a PR was submitted since they stated that there were issues with iPad when playing the video only; so to ensure that it will play properly, the added the load() method inside the play. I haven't seen this as an issue in other places, but you basically tested this on an iPad without issues. So basically we are invalidating the fix since it seems not needed. Let me know if you have any more questions or comments about this before I perform the fix |
I had an emulator and I tested your example on it and everything went fine BTW |
If you wanna do one last test, just hit the play button, and try to test including a video and audio on the same page. And then try to set the current time for both to 25. If you don't see any issues I think it's safe to say that solves the issue |
Hi, My last comment simply meant that I did ~25 tests trying to get some audio to start-for-the-first-time at sec 15 or so .. 24/25 of those tests worked great and started at 15 .. 1/25 started at 0. That's great news about the emulator. I'm certainly no expert on web audio/video .. in fact, I don't envy your job at all .. I'm amazed how finicky it is (and how stable your player has made it) .. and I don't know what is going on under the hood of mediaelement's methods, such that setCurrentTime->play could work fine for a small-ish audio file, but I don't have any feel for if things would start to break if you were searching all the way to the end of a big audio or video file on your way to play'ing (and without much delay) .. and then I also hear/see weirdnesses that seem to crop up in iOS that I don't hit anywhere else, which also makes me nervous. I don't do much video, but I'll try to put together a few tests like you describe and be back in touch .. smile. Thanks, Andrew |
OK I'll push in a minute the fix so you can test this; I'll do it in such a way that if the current time is 0 before playing I'd allow the loading; otherwise, only the play. I'll let you know when it's updated |
OK it's ready. Download the latest version of 3.x-dev so you can test, please |
Hi, |
We are currently working on getting a new website and I'm fixing minor things. We hope by the end of November but we'll try to release it as soon as possible. |
If nothing else I need to do, can you close this ticket, please? |
Great .. thanks. |
Hi,
I am using 2.23.2.
If I first create a player wrapping some audio:
And imagine I would like to start the audio at an offset:
Under that usage setCurrentTime(10.0) fails and playback starts from 0.0. Results are the same for Ubuntu and iOS.
However, if I instead directly address the underlying audio (after creating the player):
.. then playback starts as desired at 10.0 on both Ubuntu and iOS.
Why does the address-the-audio approach work as expected, but not the address-the-player approach? I was expecting for either both approaches to work, or both to fail.
Is there a drawback to using the address-the-audio approach, even if the audio is wrapped by the player (I'd still like to use the player interface for other things)?
p.s. Based on referenced approaches I've found elsewhere, the following also works as expected:
Thank you for any clarifications.
Best,
Andrew
The text was updated successfully, but these errors were encountered: