protected internal override void onCreate(Bundle savedInstanceState) { // When extending the BrightcovePlayer, we must assign the BrightcoveVideoView before // entering the superclass. This allows for some stock video player lifecycle // management. ContentView = R.layout.onceux_activity_main; brightcoveVideoView = (BrightcoveVideoView)findViewById(R.id.brightcove_video_view); base.onCreate(savedInstanceState); // Setup the event handlers for the OnceUX plugin, set the companion ad container, // register the VMAP data URL inside the plugin and start the video. The plugin will // detect that the video has been started and pause it until the ad data is ready or an // error condition is detected. On either event the plugin will continue playing the // video. registerEventHandlers(); plugin = new OnceUxComponent(this, brightcoveVideoView); View view = findViewById(R.id.ad_frame); if (view != null && view is ViewGroup) { plugin.addCompanionContainer((ViewGroup)view); } plugin.processVideo(onceUxAdDataUrl); }
protected internal override void onCreate(Bundle savedInstanceState) { // When extending the BrightcovePlayer, we must assign the BrightcoveVideoView before // entering the superclass. This allows for some stock video player lifecycle // management. ContentView = R.layout.onceux_activity_main; brightcoveVideoView = (BrightcoveVideoView) findViewById(R.id.brightcove_video_view); base.onCreate(savedInstanceState); // Setup the event handlers for the OnceUX plugin, set the companion ad container, // register the VMAP data URL inside the plugin and start the video. The plugin will // detect that the video has been started and pause it until the ad data is ready or an // error condition is detected. On either event the plugin will continue playing the // video. registerEventHandlers(); plugin = new OnceUxComponent(this, brightcoveVideoView); View view = findViewById(R.id.ad_frame); if (view != null && view is ViewGroup) { plugin.addCompanionContainer((ViewGroup) view); } plugin.processVideo(onceUxAdDataUrl); }