<legend id='kKyYp'><style id='kKyYp'><dir id='kKyYp'><q id='kKyYp'></q></dir></style></legend>

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

  • <small id='kKyYp'></small><noframes id='kKyYp'>

          <bdo id='kKyYp'></bdo><ul id='kKyYp'></ul>

        iOS 中流畅的视频循环播放

        时间:2023-05-31
      1. <small id='Zlca3'></small><noframes id='Zlca3'>

        <legend id='Zlca3'><style id='Zlca3'><dir id='Zlca3'><q id='Zlca3'></q></dir></style></legend>
        • <bdo id='Zlca3'></bdo><ul id='Zlca3'></ul>
          <tfoot id='Zlca3'></tfoot>
              <tbody id='Zlca3'></tbody>
            <i id='Zlca3'><tr id='Zlca3'><dt id='Zlca3'><q id='Zlca3'><span id='Zlca3'><b id='Zlca3'><form id='Zlca3'><ins id='Zlca3'></ins><ul id='Zlca3'></ul><sub id='Zlca3'></sub></form><legend id='Zlca3'></legend><bdo id='Zlca3'><pre id='Zlca3'><center id='Zlca3'></center></pre></bdo></b><th id='Zlca3'></th></span></q></dt></tr></i><div id='Zlca3'><tfoot id='Zlca3'></tfoot><dl id='Zlca3'><fieldset id='Zlca3'></fieldset></dl></div>

                  本文介绍了iOS 中流畅的视频循环播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  谁能推荐一种方法来在 iOS 中实现视频剪辑的完全流畅和无缝循环?我尝试了两种方法,当视频循环播放时,这两种方法都会产生短暂的停顿

                  Can anyone suggest a method by which you can achieve a completely smooth and seamless looping of a video clip in iOS? I have tried two methods, both of which produce a small pause when the video loops

                  1) AVPlayerLayer 与 playerItemDidReachEnd 通知设置为 seekToTime:kCMTimeZero

                  1) AVPlayerLayer with the playerItemDidReachEnd notification setting off seekToTime:kCMTimeZero

                  我更喜欢使用 AVPlayerLayer(出于其他原因),但这种方法会在循环之间产生大约一秒的明显停顿.

                  I prefer to use an AVPlayerLayer (for other reasons), but this method produces a noticeable pause of around a second between loops.

                  2) 带有 setRepeatMode:MPMovieRepeatModeOne 的 MPMoviePlayerController

                  2) MPMoviePlayerController with setRepeatMode:MPMovieRepeatModeOne

                  这会导致较小的停顿,但仍不完美.

                  This results in a smaller pause, but it is still not perfect.

                  我不知道从这里去哪里.谁能推荐一个灵魂?

                  I'm not sure where to go from here. Can anyone suggest a soultion?

                  推荐答案

                  我同意@SamBrodkin 的发现.

                  I can concur @SamBrodkin's findings.

                  [[NSNotificationCenter defaultCenter]
                      addObserver: self
                      selector: @selector(myMovieFinishedCallback:)
                      name: MPMoviePlayerPlaybackStateDidChangeNotification
                      object: m_player];
                  

                  -(void) myMovieFinishedCallback: (NSNotification*) aNotification
                  {
                      NSLog( @"myMovieFinishedCallback: %@", aNotification );
                      MPMoviePlayerController *movieController = aNotification.object;
                      NSLog( @"player.playbackState = %d", movieController.playbackState );
                  }
                  

                  也为我修复了 iOS 5 上的非循环问题.

                  fixed the non-looping issue on iOS 5 for me too.

                  这篇关于iOS 中流畅的视频循环播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:是否可以为 UIImage 设置动画? 下一篇:如何将数据从一个视图传回IOS中的另一个视图?

                  相关文章

                  最新文章

                • <small id='C3Ti8'></small><noframes id='C3Ti8'>

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

                      <bdo id='C3Ti8'></bdo><ul id='C3Ti8'></ul>
                      <tfoot id='C3Ti8'></tfoot><legend id='C3Ti8'><style id='C3Ti8'><dir id='C3Ti8'><q id='C3Ti8'></q></dir></style></legend>