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

Videos with audio should play silent when no audio available #112

Closed
brion opened this Issue May 5, 2014 · 17 comments

Comments

Projects
None yet
6 participants
@brion
Owner

brion commented May 5, 2014

Videos with audio currently require a working audio output to play, since we chain to the audio clock.

If no audio was available, we should fall back to the video framerate clock and stop trying to output audio.

@brion brion added the enhancement label May 5, 2014

@brion brion added this to the ogv.js 2.0 - modular milestone Oct 21, 2014

@brion brion self-assigned this Oct 26, 2014

@brion

This comment has been minimized.

Owner

brion commented Oct 26, 2014

In progress in stream-refactor branch

@brion brion removed their assignment Oct 26, 2014

@brion

This comment has been minimized.

Owner

brion commented Oct 26, 2014

Wait no it's not

@abuinitski

This comment has been minimized.

abuinitski commented May 14, 2015

I will try to take on this if you don't mind.

@brion

This comment has been minimized.

Owner

brion commented May 14, 2015

Awesome -- ping me as necessary. :) Note that for the iOS case we have Web Audio that detects as available but doesn't trigger if started programmatically, so it may be necessary to detect that no samples are being consumed and switch over to the video clock... Or set up a timer to consume the audio silently as a fallback, maybe.

@brion brion modified the milestones: ogv.js 1.0 - playback, ogv.js 2.0 - modular Jun 25, 2015

@brion brion modified the milestones: ogv.js 2.0 - modular, ogv.js 1.0 - playback Jul 4, 2015

@brion brion modified the milestones: ogv.js 1.1 - cleanup, ogv.js 1.2 - modular cleanup Aug 17, 2015

@brion

This comment has been minimized.

Owner

brion commented Aug 17, 2015

Ok, the current versions now use mostly the same code paths for audio and no-audio paths, so this should be easier to make work consistently now. Need to basically handle the case where the audio context (or node?) doesn't initialize correctly, and fall over to the system time as the clock.

And further, would be nice to make sure it can still re-initialize audio again later when playback is re-triggered.

@abuinitski

This comment has been minimized.

abuinitski commented Aug 17, 2015

I had a lot of testing with iOS and Android for the time past. So I know very well how this works now. I will start doing this, give me a week or two.

On Aug 17, 2015, at 5:38 AM, Brion Vibber notifications@github.com wrote:

Ok, the current versions now use mostly the same code paths for audio and no-audio paths, so this should be easier to make work consistently now. Need to basically handle the case where the audio context (or node?) doesn't initialize correctly, and fall over to the system time as the clock.

And further, would be nice to make sure it can still re-initialize audio again later when playback is re-triggered.


Reply to this email directly or view it on GitHub #112 (comment).

@brion brion referenced this issue Sep 13, 2015

Closed

iOS9 #310

@rickyblaha

This comment has been minimized.

rickyblaha commented Sep 13, 2015

ogv.js is awesome! Do you have an idea of when this feature might be implemented?

@marian-r

This comment has been minimized.

marian-r commented Sep 16, 2015

+1

@rickyblaha

This comment has been minimized.

rickyblaha commented Sep 29, 2015

@abuinitski let me know if you need any help with this feature. In your fork's audio_feeder branch, what are your known issues (other than no Workers yet)? Building your demo, it plays pretty well in iOS Simulator: after changing the demo to be initially muted and auto-play, it plays, and clicking to un-mute plays sound on iOS.

@brion

This comment has been minimized.

Owner

brion commented Sep 30, 2015

@abuinitski let me know if you've got a patch ready to test, otherwise I'll start work on this soon as it's a popular request. :)

@senaev

This comment has been minimized.

senaev commented Feb 8, 2016

+1

@brion brion modified the milestones: ogv.js 1.2 - various improvements, ogv.js 1.1 - cleanup Apr 17, 2016

brion added a commit that referenced this issue May 14, 2016

Bypass audioFeeder when starting playback muted
This switches playback to drive off of the video clock timers
when started muted, which allows script-triggered autoplay on
iOS of files containing audio.

May or may not have surprise bugs in the muted path.

Audio is still decoded, so when unmuting the audioFeeder is
started up and we're able to continue from the current position.

Partial fix for #112

Todo:
* try to autodetect the case where audio initialization failed
* clean up remaining bugs in non-audio clock
@brion

This comment has been minimized.

Owner

brion commented May 14, 2016

Proof of concept on 'muted' branch. Seems to work, but want to clean up some other bugs with the non-audio clock path and see if can detect the error state.

@brion brion modified the milestones: ogv.js 1.1.1 - quick fixes, ogv.js 1.2 - various improvements May 14, 2016

@brion

This comment has been minimized.

Owner

brion commented May 14, 2016

Ok, this got folded into 1.1.1-alpha.4. Give it a whirl! https://github.com/brion/ogv.js/releases/download/1.1.1-alpha.4/ogvjs-1.1.1-alpha.4.zip

@omegdadi

This comment has been minimized.

omegdadi commented May 16, 2016

Autoplay looks like it is working now on iOS! Thanks for the quick fix 👍 I'm trying to unmute that video now, but that doesn't look like it is working, is that expected?

@brion

This comment has been minimized.

Owner

brion commented May 17, 2016

@omegdadi unmuting should work though something might have got missed.., can you post a sample context and I'll test it out?

@omegdadi

This comment has been minimized.

omegdadi commented May 17, 2016

I've got it up on this page here: http://www.itsongames.com/demo/ogv/ogv.html. You can pass autoplay or muted = false on the querystring, both default to true. For me, the video pauses and sound is still muted. Thanks for checking it out.

@brion

This comment has been minimized.

Owner

brion commented May 17, 2016

@omegdadi Ok I see what's going on -- it's still setting up the audio context when play() method is called; I forgot to commit the bit that disabled that. :) 1.1.1-alpha.5 will include fix to delay audio context setup for this case.

@brion brion closed this in 4f0f485 May 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment