我已经在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]];

是否可以在不点击暂停按钮的情况下停止暂停或停止视频?

有什么办法吗?

最佳答案

您可以停止以下视频:-

-(void)viewWillDisappear:(BOOL)animated
    {
        [YourWebView loadHTMLString:nil baseURL:nil];
        [super viewWillDisappear:animated];
    }

10-08 06:27
查看更多