ABMaterial can use three types of Video containers: HTML5 videos, Youtube videos and Vimeo videos. They have their own Initialize method.
Youtube videos
For Youtube videos you have to specify if it has controls, a frameborder, if it allows to go full screen and the initial volume.
// add Youtube video Dim video1 As ABMVideo video1.InitializeIframe(page, "video1", "//www.youtube.com/embed/Q8TXgCzxEnw", "http://localhost:51042", True, False, True, 100) page.Cell(2,1).AddComponent(video1)
If you disable the youtube controls, you have to write your own play, pause, stop etc controls.
HTML videos
For HTML5 videos you have to specify if it has controls and what video type is used.
// add HTML5 video Dim video2 As ABMVideo video2.InitializeHTML5(page, "video2", "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4", false, "video/mp4") page.Cell(9,1).AddComponent(video2)
Vimeo videos
For Vimeo videos you have to specify frameborder and if it allows to go full screen. The vimeo API is very limited and does not allow custom controls.
// add Vimeo video Dim video4 As ABMVideo video4.InitializeVimeo(page, "video4", "https://player.vimeo.com/video/76979871",False, True) page.Cell(13,1).AddComponent(video4)
Video Size
By default the videos are responsive and they will be sized automatically. You can overrule this by specifying a fixed size.
// add HTML5 video Dim video3 As ABMVideo video3.InitializeHTML5(page, "video3", "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4", True, "video/mp4") video3.SetFixedSize(320, 200) page.Cell(13,1).AddComponent(video3)