Search in sources :

Example 1 with BaseVideoView

use of com.brightcove.player.view.BaseVideoView in project android-player-samples by BrightcoveOS.

the class MainActivity method initButtons.

private void initButtons(final BaseVideoView brightcoveVideoView) {
    Typeface font = Typeface.createFromAsset(this.getAssets(), FONT_AWESOME);
    Button thumbsUp = (Button) brightcoveVideoView.findViewById(R.id.thumbs_up);
    if (thumbsUp != null) {
        // By setting this type face, we can use the symbols(icons) present in the font awesome file.
        thumbsUp.setTypeface(font);
    }
    thumbsUp.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(MainActivity.this, "TEST", Toast.LENGTH_SHORT).show();
        }
    });
}
Also used : Typeface(android.graphics.Typeface) Button(android.widget.Button) BaseVideoView(com.brightcove.player.view.BaseVideoView) BrightcoveExoPlayerVideoView(com.brightcove.player.view.BrightcoveExoPlayerVideoView) View(android.view.View)

Example 2 with BaseVideoView

use of com.brightcove.player.view.BaseVideoView 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)

Aggregations

View (android.view.View)2 BaseVideoView (com.brightcove.player.view.BaseVideoView)2 Typeface (android.graphics.Typeface)1 Button (android.widget.Button)1 Video (com.brightcove.player.model.Video)1 BrightcoveExoPlayerVideoView (com.brightcove.player.view.BrightcoveExoPlayerVideoView)1