Search in sources :

Example 6 with Video

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();
}
Also used : ViewGroup(android.view.ViewGroup) Video(com.brightcove.player.model.Video) BrightcoveVideoView(com.brightcove.player.view.BrightcoveVideoView) View(android.view.View) VideoView(android.widget.VideoView) VMAPComponent(com.brightcove.vmap.VMAPComponent)

Example 7 with Video

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();
}
Also used : Video(com.brightcove.player.model.Video)

Example 8 with Video

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;
}
Also used : Video(com.brightcove.player.model.Video) BaseVideoView(com.brightcove.player.view.BaseVideoView) View(android.view.View)

Example 9 with Video

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();
        }
    });
}
Also used : EventEmitter(com.brightcove.player.event.EventEmitter) Video(com.brightcove.player.model.Video) VideoListener(com.brightcove.player.edge.VideoListener) Catalog(com.brightcove.player.edge.Catalog)

Example 10 with Video

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();
}
Also used : Video(com.brightcove.player.model.Video)

Aggregations

Video (com.brightcove.player.model.Video)26 Catalog (com.brightcove.player.edge.Catalog)8 VideoListener (com.brightcove.player.edge.VideoListener)8 Catalog (com.brightcove.player.media.Catalog)7 VideoListener (com.brightcove.player.media.VideoListener)7 ViewGroup (android.view.ViewGroup)6 Event (com.brightcove.player.event.Event)6 EventListener (com.brightcove.player.event.EventListener)6 List (java.util.List)6 EventEmitter (com.brightcove.player.event.EventEmitter)5 FreeWheelController (com.brightcove.freewheel.controller.FreeWheelController)4 IAdContext (tv.freewheel.ad.interfaces.IAdContext)4 IConstants (tv.freewheel.ad.interfaces.IConstants)4 ISlot (tv.freewheel.ad.interfaces.ISlot)4 View (android.view.View)3 VideoView (android.widget.VideoView)2 VMAPComponent (com.brightcove.vmap.VMAPComponent)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 WidevinePlugin (com.brightcove.drm.widevine.WidevinePlugin)1