use of com.brightcove.player.model.Video in project android-player-samples by BrightcoveOS.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
brightcoveVideoView = (BrightcoveVideoView) findViewById(R.id.brightcove_video_view);
super.onCreate(savedInstanceState);
vmapComponent = new VMAPComponent(brightcoveVideoView);
View view = findViewById(R.id.ad_frame);
if ((view != null) && (view instanceof ViewGroup)) {
vmapComponent.addCompanionContainer((ViewGroup) view);
} else {
Log.e(TAG, "Companion container must be an instance of a ViewGroup");
}
Video video = Video.createVideo("http://media.w3.org/2010/05/sintel/trailer.mp4", DeliveryType.MP4);
video.getProperties().put(VMAPComponent.VMAP_URL, "http://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator=");
brightcoveVideoView.add(video);
brightcoveVideoView.start();
}
use of com.brightcove.player.model.Video in project android-player-samples by BrightcoveOS.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Video video = Video.createVideo("http://media.w3.org/2010/05/sintel/trailer.mp4", DeliveryType.MP4);
baseVideoView.add(video);
baseVideoView.start();
}
use of com.brightcove.player.model.Video in project android-player-samples by BrightcoveOS.
the class MainFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View result = inflater.inflate(R.layout.fragment_main, container, false);
baseVideoView = (BaseVideoView) result.findViewById(R.id.brightcove_video_view);
super.onCreateView(inflater, container, savedInstanceState);
Video video = Video.createVideo("http://media.w3.org/2010/05/sintel/trailer.mp4", DeliveryType.MP4);
baseVideoView.add(video);
baseVideoView.start();
return result;
}
use of com.brightcove.player.model.Video in project android-player-samples by BrightcoveOS.
the class MainActivity method onCreate.
@Override
protected 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. Establish the video object and use it's event emitter to get important
// notifications and to control logging.
setContentView(R.layout.default_activity_main);
brightcoveVideoView = (BrightcoveExoPlayerVideoView) findViewById(R.id.brightcove_video_view);
super.onCreate(savedInstanceState);
EventEmitter eventEmitter = brightcoveVideoView.getEventEmitter();
Catalog catalog = new Catalog(eventEmitter, getString(R.string.account), getString(R.string.policy));
catalog.findVideoByID(getString(R.string.videoId), new VideoListener() {
// Add the video found to the queue with add().
// Start playback of the video with start().
@Override
public void onVideo(Video video) {
Log.v(TAG, "onVideo: video = " + video);
brightcoveVideoView.add(video);
brightcoveVideoView.start();
}
});
}
use of com.brightcove.player.model.Video in project android-player-samples by BrightcoveOS.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
brightcoveVideoView = (BrightcoveTextureVideoView) findViewById(R.id.brightcove_video_view);
super.onCreate(savedInstanceState);
Video video = Video.createVideo("http://media.w3.org/2010/05/sintel/trailer.mp4", DeliveryType.MP4);
brightcoveVideoView.add(video);
brightcoveVideoView.start();
}
Aggregations