Let's break down this code. First we create a
let player = DacastPlayer(contentIdStr: "104301_f_506288", adUrl: "https://cdn.theoplayer.com/demos/preroll.xml") player.frame = CGRect(x: 0, y: 0, width: 400, height: 400) player.addAsSubview(of: self.view)
DacastPlayerobject with 2 arguments: the contentId and an adUrl.
frameproperty and add the player to the current view with
addAsSubview(you can also use
player.getTHEOplayer()and refer to the official THEOplayer documentation.