久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='WH4We'></small><noframes id='WH4We'>

  • <tfoot id='WH4We'></tfoot>

      <bdo id='WH4We'></bdo><ul id='WH4We'></ul>
  • <legend id='WH4We'><style id='WH4We'><dir id='WH4We'><q id='WH4We'></q></dir></style></legend>

        <i id='WH4We'><tr id='WH4We'><dt id='WH4We'><q id='WH4We'><span id='WH4We'><b id='WH4We'><form id='WH4We'><ins id='WH4We'></ins><ul id='WH4We'></ul><sub id='WH4We'></sub></form><legend id='WH4We'></legend><bdo id='WH4We'><pre id='WH4We'><center id='WH4We'></center></pre></bdo></b><th id='WH4We'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WH4We'><tfoot id='WH4We'></tfoot><dl id='WH4We'><fieldset id='WH4We'></fieldset></dl></div>

      1. 在 ios 5 中的 MP 音樂播放器控制器中出現錯誤的播

        Getting wrong playback state in MP Music Player Controller in ios 5(在 ios 5 中的 MP 音樂播放器控制器中出現錯誤的播放狀態)

        1. <small id='4XKrs'></small><noframes id='4XKrs'>

        2. <i id='4XKrs'><tr id='4XKrs'><dt id='4XKrs'><q id='4XKrs'><span id='4XKrs'><b id='4XKrs'><form id='4XKrs'><ins id='4XKrs'></ins><ul id='4XKrs'></ul><sub id='4XKrs'></sub></form><legend id='4XKrs'></legend><bdo id='4XKrs'><pre id='4XKrs'><center id='4XKrs'></center></pre></bdo></b><th id='4XKrs'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4XKrs'><tfoot id='4XKrs'></tfoot><dl id='4XKrs'><fieldset id='4XKrs'></fieldset></dl></div>

          • <bdo id='4XKrs'></bdo><ul id='4XKrs'></ul>
              <tbody id='4XKrs'></tbody>
            <tfoot id='4XKrs'></tfoot>

            • <legend id='4XKrs'><style id='4XKrs'><dir id='4XKrs'><q id='4XKrs'></q></dir></style></legend>

                  本文介紹了在 ios 5 中的 MP 音樂播放器控制器中出現錯誤的播放狀態的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我在 MP 音樂播放器中的播放狀態錯誤.在播放歌曲時,我處于暫停狀態.我的應用程序在 ios 4 中運行良好.但我在 ios 5 中遇到了這個問題.誰能幫幫我??

                  i am getting wrong playback state in MP music player. while playing a song i am getting pause state. My app is working fine in ios 4.but i am having this issue in ios 5. can anybody Help me ??

                  我的代碼在這里.

                  [musicPlayer stop];
                  if (userMediaItemCollection)
                  {
                     userMediaItemCollection=nil; 
                  }
                  musicPlayer.nowPlayingItem=nil;
                  
                  userMediaItemCollection=[MPMediaItemCollection collectionWithItems:[mediaItemCollection    items]];
                  
                  [musicPlayer setQueueWithItemCollection:userMediaItemCollection];
                  [musicPlayer setNowPlayingItem:    
                  [[userMediaItemCollectionitems]objectAtIndex:indexOfCurrentObject]];
                  [self enablePrevAndNextButtons];
                  
                  [musicPlayer play];        
                  }
                  
                  -(void)playbackStateDidChanged:(NSNotification *)notification
                  {
                  
                   if (musicPlayer.playbackState!=MPMusicPlaybackStatePlaying)
                   {
                      [playPauseButton setBackgroundImage:[UIImage imageNamed:@"play_iPad.png"] forState:UIControlStateNormal];
                   }
                   else if(musicPlayer.playbackState==MPMusicPlaybackStatePlaying)
                   {
                      [playPauseButton setBackgroundImage:[UIImage imageNamed:@"pause_iPad.png"] forState:UIControlStateNormal];
                   }
                  

                  推薦答案

                  我也向 Apple 報告了這個錯誤.通過執行以下操作,我能夠 100% 地重現它:

                  I have also reported this bug to Apple. I was able to reproduce it 100% of the time by doing the following:

                  啟動使用 MPMusicPlayerController 的應用程序.啟動音樂"應用程序.點擊播放,跳過,跳過,暫停,播放,暫停打開原應用,MPMusicPlayerController的MPMusicPlaybackState會出錯.

                  Launch application that uses MPMusicPlayerController. Launch the "Music" App. Hit Play, Skip, Skip, Pause, Play, Pause Open the original application and the MPMusicPlaybackState of MPMusicPlayerController will be incorrect.

                  這里提出的解決方案都不適合我.有效的解決方案是跟蹤錯誤發生的時間并在這些情況下特別更新 UI.

                  None of the proposed solutions here worked for me. The solution that did work was to keep track of when the bug was occurring and updating the UI specially in these cases.

                  當收到 UIApplicationDidBecomeActiveNotification 通知時(有關這方面的更多詳細信息,請參閱 matbur 帖子),查看當 MPMusicPlaybackState 說它是時音頻是否實際上沒有播放:

                  When the UIApplicationDidBecomeActiveNotification notification is received (see matbur post for more details on this), see if audio is actually not playing when the MPMusicPlaybackState said it was:

                  -(BOOL) isPlaybackStateBugActive {
                      MPMusicPlaybackState playbackState = self.musicPlayer.playbackState;
                      if (playbackState == MPMusicPlaybackStatePlaying) {
                          AudioSessionInitialize (NULL, NULL, NULL, NULL);
                          UInt32 sessionCategory = kAudioSessionCategory_AmbientSound;
                          AudioSessionSetProperty (kAudioSessionProperty_AudioCategory, sizeof (sessionCategory), &sessionCategory);
                          AudioSessionSetActive (true);
                  
                          UInt32 audioIsPlaying;
                          UInt32 size = sizeof(audioIsPlaying);
                          AudioSessionGetProperty(kAudioSessionProperty_OtherAudioIsPlaying, &size, &audioIsPlaying);
                  
                          if (!audioIsPlaying){
                              NSLog(@"PlaybackState bug is active");
                              return YES;
                          }
                      }
                  
                      return NO;
                  }
                  

                  別忘了導入 AudioToolbox 框架.

                  Don't forget to import the AudioToolbox framework.

                  這篇關于在 ios 5 中的 MP 音樂播放器控制器中出現錯誤的播放狀態的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標已經包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))
                    <bdo id='M1Yf6'></bdo><ul id='M1Yf6'></ul>
                          <tbody id='M1Yf6'></tbody>

                      1. <small id='M1Yf6'></small><noframes id='M1Yf6'>

                        1. <tfoot id='M1Yf6'></tfoot>

                          <i id='M1Yf6'><tr id='M1Yf6'><dt id='M1Yf6'><q id='M1Yf6'><span id='M1Yf6'><b id='M1Yf6'><form id='M1Yf6'><ins id='M1Yf6'></ins><ul id='M1Yf6'></ul><sub id='M1Yf6'></sub></form><legend id='M1Yf6'></legend><bdo id='M1Yf6'><pre id='M1Yf6'><center id='M1Yf6'></center></pre></bdo></b><th id='M1Yf6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='M1Yf6'><tfoot id='M1Yf6'></tfoot><dl id='M1Yf6'><fieldset id='M1Yf6'></fieldset></dl></div>
                            <legend id='M1Yf6'><style id='M1Yf6'><dir id='M1Yf6'><q id='M1Yf6'></q></dir></style></legend>
                            主站蜘蛛池模板: 久久久精品网 | 福利视频一二区 | 欧美精品在线播放 | 精品三区 | 国产在线精品一区二区 | 国产日韩一区二区 | av天天看| 国产精品一区在线 | 91精品国产色综合久久不卡98口 | 亚洲 欧美 另类 日韩 | 国产午夜亚洲精品不卡 | 日韩高清一区二区 | 亚洲成在线观看 | 毛片网站在线观看视频 | 男女午夜免费视频 | 亚洲午夜视频在线观看 | 久久99精品国产99久久6男男 | 久久99久久99精品免视看婷婷 | 激情视频一区 | 日韩成人 | 国产美女精品 | 日本色高清 | 国产精品日韩高清伦字幕搜索 | 色.com| 亚洲黄色成人网 | 久久伊人青青草 | 狠狠亚洲| 一区二区在线观看免费视频 | 天天综合天天 | 国产一级一片免费播放 | 欧美精品成人一区二区三区四区 | 亚洲一区二区三区在线免费 | 欧美在线视频免费 | 黄色网址在线免费播放 | 亚洲91| 欧美一二三| 日本久久视频 | 超碰av在线 | av入口| 亚洲日韩中文字幕 | 一区二区三区国产精品 |