这是swift的代码,在xcode工程中能正常运行,
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
let player = BDAlphaPlayerMetalView.init()
self.view.addSubview(player)
if let bundlePath = Bundle.main.path(forResource: "TestResource", ofType: nil) {
let directory = (bundlePath as NSString).appendingPathComponent("heartbeats")
let configuration = BDAlphaPlayerMetalConfiguration.default();
configuration.directory = directory;
configuration.renderSuperViewFrame = self.view.frame;
configuration.orientation = BDAlphaPlayerOrientation.portrait;
player.play(with: configuration);
}
}
开发uts插件,执行 let player = BDAlphaPlayerMetalView.init()这个就崩溃。。。
2 个回复
52yaoer (作者)
我 let player = new BDAlphaPlayerMetalView(); 这样也会崩溃。
我用原生工程开发的插件变异能正常使用,转uts就不行,
52yaoer (作者)
已解决。应该是和其他插件冲突了。