我可以使用 let mapsbut = cell.viewWithTag(912) as! UIButton
mapsbut.addTarget(self, action: "mapsHit:", forControlEvents: UIControlEvents.TouchUpInside)
func mapsHit(sender: UIButton!){
passBuild = buildings[indexPath.row]
performSegueWithIdentifier("mapSegue2", sender: self)
}
return cell
或VideoView#setVideoPath
设置视频。我怎么设置它?将其设置为VideoView#setVideoURI
或""
会使其显示为null
。
答案 0 :(得分:1)
像这样使用
mVideoView.setVideoPath(""); // mVideoView.setVideoPath(null);
或
mVideoView.setVideoURI(""); // mVideoView.setVideoURI(null);
然后它显示“无法播放此视频提醒”消息。我们可以使用视频视图监听器来处理
以下听众就是这样,
mVideoView.setOnErrorListener(new OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
Log.d("video", "setOnErrorListener ");
return true;
}
});
有关详细信息,请参阅Android Document about Media Player