All Projects → Pulimet → Exoplayer Wrapper

Pulimet / Exoplayer Wrapper

Licence: apache-2.0
📺 Android library, ExoPlayer wrapper (2017)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Exoplayer Wrapper

Dailymotion Swift Player Sdk Ios
Dailymotion Player SDK for iOS in Swift
Stars: ✭ 29 (-62.34%)
Mutual labels:  video-player
Ngx Videogular
The HTML5 video player for Angular 2 and successor to videogular2
Stars: ✭ 50 (-35.06%)
Mutual labels:  video-player
Ice Video
🎬Wonderful Html5 danmuku video player,using React library.
Stars: ✭ 64 (-16.88%)
Mutual labels:  video-player
Videojscustomization
HTML5 视频播放器 自定制: React + video.js 详细讲解
Stars: ✭ 32 (-58.44%)
Mutual labels:  video-player
Media player
An flutter media player to make media streaming apps effortlessly! read getting started tutorial on https://medium.com/@tamhanekar.siddhesh95/integrate-media-player-into-your-flutter-application-23040213f0c9
Stars: ✭ 45 (-41.56%)
Mutual labels:  video-player
Scriptplayer
ScriptPlayer is a video player that controls the Fleshlight Launch, The Handy and lots of other toys in sync with videos.
Stars: ✭ 59 (-23.38%)
Mutual labels:  video-player
React Itinerary
Render react components based on time sequences such as video or audio files.
Stars: ✭ 13 (-83.12%)
Mutual labels:  video-player
React Native True Sight
📱 A cross-platform (Android / iOS) video player with customizable controls for React Native.
Stars: ✭ 73 (-5.19%)
Mutual labels:  video-player
Unity Videoplayer Helper
Simple helper for the Video Player in Unity
Stars: ✭ 49 (-36.36%)
Mutual labels:  video-player
Monocle
🕶 Snapchat Spectacles video player
Stars: ✭ 61 (-20.78%)
Mutual labels:  video-player
Rn Floating Video Widget
React Native Module for Floating/Popup video player on Android.
Stars: ✭ 35 (-54.55%)
Mutual labels:  video-player
Pano.gl
Equirectangular video/image viewer based on WebGL.
Stars: ✭ 42 (-45.45%)
Mutual labels:  video-player
Kjplayerdemo
视频播放壳子:动态切换内核,支持边下边播边缓存的播放器方案,视频支持格式:mp4、m3u8、wav、avi,音频支持格式:midi、mp3
Stars: ✭ 60 (-22.08%)
Mutual labels:  video-player
Better Chrome Native Video
Add keyboard support to Chrome's native HTML5 video player.
Stars: ✭ 31 (-59.74%)
Mutual labels:  video-player
Chewie
The video player for Flutter with a heart of gold
Stars: ✭ 1,153 (+1397.4%)
Mutual labels:  video-player
Fijkplayer
ijkplayer for flutter. ijkplayer 的 flutter 封装。 Flutter video/audio player. Flutter media player plugin for android/iOS based on ijkplayer. fijkplayer 是基于 ijkplayer 封装的 flutter 媒体播放器,开箱即用,无需编译 ijkplayer
Stars: ✭ 943 (+1124.68%)
Mutual labels:  video-player
Vynchronize
Watch videos with friends online with the new real time video synchronization platform
Stars: ✭ 1,072 (+1292.21%)
Mutual labels:  video-player
Nexplayer unity plugin
Stream videos in HLS & DASH with Widevine DRM using NexPlayer Video Streaming Player SDK for Unity on Android & iOS devices
Stars: ✭ 73 (-5.19%)
Mutual labels:  video-player
Indigo Player
Highly extensible, modern, JavaScript video player. Handles MPEG-Dash / HLS / MPEG-4 and is built on top of the HTML5 video element.
Stars: ✭ 1,173 (+1423.38%)
Mutual labels:  video-player
Avplayeroverlay
AVPlayer with custom controls, full screen mode, subtitles (.srt), Picture-In-Picture and AirPlay features.
Stars: ✭ 59 (-23.38%)
Mutual labels:  video-player

Download License Android Arsenal

ExoPlayer-Wrapper

Simple ExoPlayer

Installation

  • Add the dependency from jCenter to your app's (not project) build.gradle file:
repositories {
    jcenter()
}

dependencies {
    implementation 'net.alexandroid.utils:exoplayerhelper:2.20'
}

How to use it

Add view:

    <com.google.android.exoplayer2.ui.SimpleExoPlayerView
        android:id="@+id/exoPlayerView"
        android:layout_width="match_parent"
        android:layout_height="200dp"/>

And in your code:

public class MainActivity extends AppCompatActivity 
        implements ExoPlayerListener, ExoAdListener{
        
    public static final String SAMPLE_1 = "http://...video.m3u8";
    public static final String TEST_TAG_URL = "https://pubads.g.doubleclick.net/...";
    private ExoPlayerHelper mExoPlayerHelper;

...

 
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

        SimpleExoPlayerView exoPlayerView = findViewById(R.id.exoPlayerView);

        mExoPlayerHelper = new ExoPlayerHelper.Builder(this, exoPlayerView)
                .addMuteButton(false, false)
                .setUiControllersVisibility(false)
                .setRepeatModeOn(true)
                .setAutoPlayOn(false)
                .setVideoUrls(SAMPLE_1)
                .setTagUrl(TEST_TAG_URL)
                .setExoPlayerEventsListener(this)
                .setExoAdEventsListener(this)
                .addSavedInstanceState(savedInstanceState)
                .setThumbImageViewEnabled(this)
                .enableLiveStreamSupport()
                .addProgressBarWithColor(getResources().getColor(R.color.colorAccent))
                .setFullScreenBtnVisible()
                .setMuteBtnVisible()
                .createAndPrepare();
}


// Lifecycle events

@Override
protected void onSaveInstanceState(Bundle outState) {
    mExoPlayerHelper.onSaveInstanceState(outState);
    super.onSaveInstanceState(outState);
}

@Override
protected void onStart() {
    super.onStart();
    mExoPlayerHelper.onActivityStart();
}

@Override
protected void onResume() {
    super.onResume();
    mExoPlayerHelper.onActivityResume();
}

@Override
protected void onPause() {
    super.onPause();
    mExoPlayerHelper.onActivityPause();
}

@Override
protected void onStop() {
    super.onStop();
    mExoPlayerHelper.onActivityStop();
}

@Override
protected void onDestroy() {
    super.onDestroy();
    mExoPlayerHelper.onActivityDestroy();
}

// ExoPlayerListener methods

@Override
public void onThumbImageViewReady(ImageView imageView) {
    Picasso.with(this)
            .load(THUMB_IMG_URL)
            .placeholder(R.drawable.place_holder)
            .error(R.drawable.error_image)
            .into(imageView);
}
@Override
public void onLoadingStatusChanged(boolean isLoading, long bufferedPosition, int bufferedPercentage) {
    MyLog.w("onLoadingStatusChanged, isLoading: " + isLoading +
            "   Buffered Position: " + bufferedPosition +
            "   Buffered Percentage: " + bufferedPercentage);
}
@Override
public void onPlayerPlaying(int currentWindowIndex) {
    MyLog.d("onPlayerPlaying, currentWindowIndex: " + currentWindowIndex);
}
@Override
public void onPlayerPaused(int currentWindowIndex) {
    MyLog.d("onPlayerPaused, currentWindowIndex: " + currentWindowIndex);
}
@Override
public void onPlayerBuffering(int currentWindowIndex) {
    MyLog.d("onPlayerBuffering, currentWindowIndex: " + currentWindowIndex);
}
@Override
public void onPlayerStateEnded(int currentWindowIndex) {
    MyLog.d("onPlayerStateEnded, currentWindowIndex: " + currentWindowIndex);
}
@Override
public void onPlayerStateIdle(int currentWindowIndex) {
    MyLog.d("onPlayerStateIdle, currentWindowIndex: " + currentWindowIndex);
}
@Override
public void onPlayerError(String errorString) {
    MyLog.e("onPlayerError: " + errorString);
}
@Override
public void createExoPlayerCalled(boolean isToPrepare) {
    MyLog.d("createExoPlayerCalled, isToPrepare: " + isToPrepare);
}
@Override
public void releaseExoPlayerCalled() {
    MyLog.d("releaseExoPlayerCalled");
}
@Override
public void onVideoResumeDataLoaded(int window, long position, boolean isResumeWhenReady) {
    MyLog.d("window: " + window + "  position: " + position + " autoPlay: " + isResumeWhenReady);
}
@Override
public void onVideoTapped() {
    MyLog.d("onVideoTapped");
}
@Override
public boolean onPlayBtnTap() {
    MyLog.d("onPlayBtnTap");
    return false;
}
@Override
public boolean onPauseBtnTap() {
    MyLog.d("onPauseBtnTap");
    return false;
}
@Override
public void onTracksChanged(int currentWindowIndex, int nextWindowIndex, boolean isPlayBackStateReady) {
    MyLog.d("currentWindowIndex: " + currentWindowIndex + "  nextWindowIndex: " + nextWindowIndex + " isPlayBackStateReady: " + isPlayBackStateReady);
}
@Override
public void onMuteStateChanged(boolean isMuted) {
}
/**
 * ExoAdListener
 */
@Override
public void onAdPlay() {
    MyLog.d("onAdPlay");
}
@Override
public void onAdPause() {
    MyLog.d("onAdPause");
}
@Override
public void onAdResume() {
    MyLog.d("onAdResume");
}
@Override
public void onAdEnded() {
    MyLog.d("onAdEnded");
}
@Override
public void onAdError() {
    MyLog.d("onAdError");
}
@Override
public void onAdClicked() {
    MyLog.d("onAdClicked");
}
@Override
public void onAdTapped() {
    MyLog.d("onAdTapped");
}




License

Copyright 2017 Alexey Korolev

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].