IOS 5打一个buzztouch应用与静音模式视频时没有声音 [英] IOS 5 No audio when playing a video with Silent mode on with a buzztouch app

查看:174
本文介绍了IOS 5打一个buzztouch应用与静音模式视频时没有声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了几个应用程序与buzztouch为iPhone和iPad,这里是一个自由的为例:

http://itunes.apple。 COM /美国/应用/ LR-基本自由版/ id497563707?MT = 8

我不知道code非常多,我有这就是为什么我设计我的应用程序很少使用基本Buzztouch,它的方式是惊人的!

的只有一个问题,我有是默认的行为,当你播放视频(这是我的大多数应用程序都在做,打的教程),如果静音模式是无论是在iPad或iPhone上,没有音频,甚至想过音量滑块是活动的,给予IM pressions用户,有一个错误,我得到了一些不好的评论,由于这一点,我也有写的人我一下吧。然后我告诉他们,他们需要做的就是关闭静音模式,他们的声音又回来了,每次的作品,但在此期间,我得到complaits!

因此​​,这里是我的问题,有一个简单的方法,我可以位于Buzztouch产生code,可以easely进行更改,以便当视频播放,音频撑地,despiste静音模式被激活的属性。

其实,我检查4或其他5的iPhone类似的应用程序包括默认的YouTube苹果的应用程序,默认的是音频播放,即使静音模式开启时,给我的客户,我的应用程序被窃听的IM pression

我不是一个程序员,所以请但是尽可能简单的答案。

TKU这么多的帮助。

塞尔<​​/ P>

解决方案

你所描述的是iOS中的默认行为 - 当响铃/静音开关处于静音模式,从您的应用程序的所有音频将燮pressed

我不知道从BuzzTouch实施这一点,但这里是我用来解决这个问题对于播放视频我的应用程序之一土生土长的解决方案:

  MPMoviePlayerViewController * MPVC = [[MPMoviePlayerViewController页头] initWithContentURL:myVidURL];...设置播放器...// prevent从电影播放器​​关闭音频静音开关
NSError * _error =零;
[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback错误:&放大器; _error]。[自presentMoviePlayerViewControllerAnimated:MPVC];

您还需要包括AVFoundation框架,这个工作。

下面就是我第一次发现这个提示的链接:

<一个href=\"http://www.24100.net/2011/05/ignore-ringtone-mute-switch-during-mpmovieplayer-video-playback-ios/\">http://www.24100.net/2011/05/ignore-ringtone-mute-switch-during-mpmovieplayer-video-playback-ios/

I have done several apps with buzztouch for Iphone and Ipads, here is a free one as an example :

http://itunes.apple.com/us/app/lr-basics-free-edition/id497563707?mt=8

I do not know code very much, I have very little basics that is why I designed my app using Buzztouch, which by the way is amazing !

The only one problem that I have is that the default behavior when you play a video (which was most of my apps are doing, playing tutorials) and if the silent mode is on either on Ipad or Iphone, there is no audio, even thought the volume slider is active, given the impressions to users that there is a bug, and I got some bad reviews due to that, I have also people writing me about it. I Then tell them all they have to do is to turn off the silent mode and they the audio is back, works everytime, but in the meantime I get complaits !

So here is my questions, is there a simple way I can located in the Buzztouch generated code a property that can easely be changed so that when a video is played, audio stays, despiste the silent mode being active.

I actually checked 4 or 5 other Iphones similar applications including the default youtube apple app, the default is that the audio plays even if the silent mode is turn on, giving my customer the impression that my app is bugged.

I'm not a programmer so please but as simple as possible in your answer.

Tku so much for the help.

Serge

解决方案

What you are describing is the default behavior in iOS - when the ring/silent switch is in silent mode all audio from your app will be suppressed.

I don't know about implementing this from BuzzTouch, but here is a native solution I used to get around this for one of my apps that plays video:

MPMoviePlayerViewController *mpvc = [[MPMoviePlayerViewController alloc] initWithContentURL:myVidURL];

... set up player ...

// prevent mute switch from switching off audio from movie player
NSError *_error = nil;
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &_error];

[self presentMoviePlayerViewControllerAnimated:mpvc];

You will also need to include the AVFoundation framework for this to work.

Here's the link where I first found this tip:

http://www.24100.net/2011/05/ignore-ringtone-mute-switch-during-mpmovieplayer-video-playback-ios/

这篇关于IOS 5打一个buzztouch应用与静音模式视频时没有声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆