Youtube embedded video will only have audio when iPhone not muted - iphone

I'm developing a mobile website which includes Youtube embedded videos, I am doing this through the <iframe> tag:
<iframe src="http://www.youtube.com/embed/videoID" frameborder="0" width="560" height="315"></iframe>
The video embeds OK, and plays as expected, but when the iPhone has the silent switch to Muted, no audio comes out, (with headphones the audio is OK). Whenever I un-mute the iPhone, the speakers work fine and the Youtube video works perfectly...
Is there a way I can override the iPhone silent switch so that the speakers play the video even when the iPhone is muted?
Many apps, including the native Youtube app work fine with the speakers even when the iPhone is muted, since these are all user-initiated audio events...

No, Apple allows it's users to have this option to respect their privacy. There are times when everyone needs to have their phones be silent. iPhone wouldn't be much of a phone if it didn't allow that.

Related

Continuous HTML5 audio/video playback in iOS?

I'm working on a mobile web app and want to allow for continuous playback of HTML5 audio or video in both Android and iOS (i.e. queue up a playlist of YouTube videos or Grooveshark songs and have them all play in a row automatically).
Android doesn't seem to be an issue, but everything I've read has suggested that Safari prevents audio from playing unless it's initiated by a user, and prevents continuous play if the screen becomes locked.
That said, Grooveshark's mobile web app will play an entire playlist of songs in my iPhone 5 (iOS 7). It'll play the next song even if I'm in another Safari tab or I lock the screen.
So the question: How do they do that?
This code (jQuery) works for me in iPhone Safari iOS7 for continuous playback. Even if I have my screen locked/other tab it changes track when the first has ended (given a bit of patience for the new track to load)
<audio id="audio1" src="song1.mp3" controls></audio>
<script type="text/javascript">
$('#audio1').on('ended',function(){
$(this).attr('src','song2.mp3');
$(this)[0].play();
});
</script>
I've read has suggested that Safari prevents audio from playing unless it's initiated by a user.
=> That is true and is by design - no work around known as of today (well ... I have seen ugly attempt to make it work).

How can I embed a video on my website in order to work on an iPhone and what video format is required?

I have seen several sites where they are able to create links to videos and they actually open on the video player of the iPhone, iPad or iPod.
This is obviously not a flash player video, and they don't seem to be embedded from youtube.
So I was wondering how can I add a video on my site that can be opened on an iPhone, and also what type of format is required for this?
Thanks
HTML5 Video works on iOS devices, see http://html5video.org
and here is a decent player plugin
http://videojs.org

playing an intro video for a website on iphone and ipad

I have been doing some research into what is possible, as far as I can tell
Autoplay
Possible to autostart videos on early versions of IOS http://www.codeblog.co/getting-autoplay-working-on-ios/ although this no longer works on current version (exact version it stopped working I don't know). Behaviour seems to be the same on both the iPad and iPhone?
Playing video in page
On the iPhone videos always pop out to player, its not possible to play in page.
However is possible to play videos in page on the iPad - have tried out the videos on here and they do play inline.
http://www.html5rocks.com/en/tutorials/video/basics/
Playing as intro video
May be able to do an enter now button for the site with below code to trigger
<input type="button" value="Play" onClick="document.myMovie.play()">
https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW10
Could then on iPad make this take the full screen in page in website and use js to detect when the video finishes. Am thinking on iPhone may not be possible to detect when video finishes?
Can anyone clarify what is possible?
As much as I know intro video aren't too popular, this is a requirement for the site.
Automatic play is not possible on iOS as fas sa I'm aware. They removed support on purpose to stop people from doing it.
Any playback now requires the user to actually specify for the video to play, so providing a button to play it should be fine?
Can't you keep your video in the bundle and play it with MPMovieePlayer.Then you won't need to autoplay the video,the video will be played autometically itself.As I do the same thing.

iPad Video Playback only delivers audio, not visuals

Recently we've developed an iPhone app for an external company, and everything works fine in the app.
There is a section where the app pulls video from the client's server, and streams it into the iPhone's MPMoviePlayerController. This works fine on the iPhone and iPodTouch - both the video and the audio show up just great.
The problem, however, is that when the app is run on an iPad (using the iPad's iPhone simulator thingo that it does) only the audio plays, and no video can be seen.
Does anybody have any suggestions about what may be causing this? I thought perhaps it was the encoding, but then why would this prevent the video from playing on the iPad, and not the iPhone?
Use mpmovieplayerviewcontroller instead, you might find it works better.Here is a link to the ref http://developer.apple.com/iphone/library/iPad/index.html#documentation/mediaplayer/reference/mpmovieplayerviewcontroller_class/reference/reference.html

How do I choose a video from UIImagePickerController on iPhone 3G?

On my iPhone 3G I have a couple videos saved from emails and some apps i recored with and every time I try and open the UIImagePickerController it doesn't show the videos for me to choose. How do I get the UIImagePickerController to include videos and not just pictures?
You can't, not on the iPhone 3G. For reasons only known to the gods at Apple, almost all video functionality is disabled on the 3G though it can support it perfectly fine.