Vidsta


Source link: https://github.com/JakeSteam/Vidsta

Vidsta

An easily implementable and customisable Android video player. Try out the sample app!


Feature List:

  • Plays local and remote files
  • Send custom headers
  • Customise play / pause / fullscreen etc button images
  • Apply colour tint to play / pause / fullscreen images to quickly theme the player
  • Customise text colour
  • Autoplay
  • Autoloop
  • Listeners for video play / pause / buffering / error
  • Easy to implement
  • Min SDK Version: 14

Setup

1. Import library:

Add compile 'uk.co.jakelee:vidsta:1.0.0' to your build.gradle dependencies.

2. Create view to display video in:
<uk.co.jakelee.vidsta.VidstaPlayer

android:id="@+id/player"

android:layout_width="match_parent"

android:layout_height="match_parent" />
3. Configure video source, and other options:

  VidstaPlayer player = (VidstaPlayer) findViewById(R.id.player);

player.setVideoSource("http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4");

player.setAutoLoop(true);

player.setAutoPlay(true);
4. That's it! You're done!

Adding custom listeners, customising the UI, and other configuration options are detailed below, but you're ready to go!


Changelog

V1.0.0: Initial release, forked from Exposure Video Player.

Customisation

Via XML:
 <uk.co.jakelee.vidsta.VidstaPlayer

android:id="@+id/player"

android:layout_width="match_parent"

android:layout_height="match_parent"

app:videoSource = "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4" <!-- Setting a remote video source -->

app:textColor = "@color/colorPrimary" <!-- Setting colour for duration / progress text -->

app:playVideoDrawable = "@drawable/custom_video_play" <!-- Setting drawable for play button -->

app:pauseVideoDrawable = "@drawable/custom_video_pause" <!-- Setting drawable for pause button -->

app:retryVideoDrawable = "@drawable/custom_video_retry" <!-- Setting drawable for retry button -->

app:nextVideoDrawable = "@drawable/custom_video_next" <!-- Setting drawable for next button -->

app:previousVideoDrawable = "@drawable/custom_video_previous" <!-- Setting drawable for previous button -->

app:buttonTintColor = "@color/colorAccent" <!-- Setting tint colour for above buttons -->

app:autoPlay = "true" <!-- Enabling autoplay -->

app:autoLoop = "true" <!-- Enablimg looping once video is finished -->

app:setFullScreen = "true" <!-- Enabling fullscreen -->

app:fullScreenButtonEnabled = "true" <!-- Making fullscreen button clickable -->

app:fullScreenButtonVisible = "true" <!-- Making fullscreen button visible -->/>
Programmatically:
# Setting video source to a remote video player.setVideoSource("http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4");
  # Enabling fullscreen mode player.setFullScreen(true);
 player.setFullScreenButtonVisible(true);
  # Adding coloured tint to text / buttons player.setTextColor(intent.getIntExtra("textColour", Color.WHITE));
 player.setButtonTintColor(intent.getIntExtra("iconTint", Color.WHITE));
  # Setting new drawables player.setPlayButtonDrawable(R.drawable.custom_video_play);
 player.setPauseButtonDrawable(R.drawable.custom_video_pause);
 player.setRetryButtonDrawable(R.drawable.custom_video_retry);
 player.setFullscreenEnterDrawable(R.drawable.custom_video_screen_fullscreen_enter);
 player.setFullscreenExitDrawable(R.drawable.custom_video_screen_fullscreen_exit);
 player.setPreviousButtonDrawable(R.drawable.custom_video_previous);
 player.setNextButtonDrawable(R.drawable.custom_video_next);
  # Setting up autoloop & autoplay player.setAutoLoop(true);
 player.setAutoPlay(true);
  # Setting up custom listeners for events player.setOnVideoBufferingListener(new VideoStateListeners.OnVideoBufferingListener());
 player.setOnVideoErrorListener(new VideoStateListeners.OnVideoErrorListener());
 player.setOnVideoFinishedListener(new VideoStateListeners.OnVideoFinishedListener());
 player.setOnVideoPausedListener(new VideoStateListeners.OnVideoPausedListener());
 player.setOnVideoRestartListener(new VideoStateListeners.OnVideoRestartListener());
 player.setOnVideoStartedListener(new VideoStateListeners.OnVideoStartedListener());
 player.setOnVideoStoppedListener(new VideoStateListeners.OnVideoStoppedListener());
  # Setting a fullscreen listener. Note that starting a new fullscreen activity must be handled in your application for now player.setOnFullScreenClickListener(new FullScreenClickListener());

Resources

Android view with both path from constructed path or from SVG.

Selendroid is a test automation framework which drives of the UI of Android native and hybrid applications (apps) and the mobile web with Selendroid. Tests are written using the Selenium 2 client API and for testing the application under test must not be modified.

Selendroid can be used on emulators and real devices and can be integrated as a node into the Selenium Grid for scaling and parallel testing.

SwipyRefreshLayout is a SwipeRefreshLayout extension that allows to swipe in both directions.

Drag and Drop adapter implementation for RecyclerView. Targeted to support any LayoutManager and ItemAnimator.

A Lollipop material design styled android pin-code library.

A Lollipop material design styled CircularBarPager library.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes