1

UIWebView で動画を再生しました。

私はこのコードを使用しました

 NSString *Str = @"<video controls width=458 height=202 poster=Image.png> 
                   <source   src=\"http://Path of the video/Video.mp4\"> </video>";

 NSString *path = [[NSBundle mainBundle] pathForResource:@"Image"
                  ofType:@"png"];
 [web loadHTMLString:Str baseURL:[NSURL fileURLWithPath:path]];

一時停止ボタンをタップせずに一時停止またはビデオを停止できますか?

解決策はありますか?

4

1 に答える 1

1

次のようにビデオを停止できます:-

-(void)viewWillDisappear:(BOOL)animated
    {
        [YourWebView loadHTMLString:nil baseURL:nil];
        [super viewWillDisappear:animated];
    }
于 2012-11-07T05:06:40.163 に答える