Java Code Examples for org.videolan.libvlc.IVLCVout#areViewsAttached()
The following examples show how to use
org.videolan.libvlc.IVLCVout#areViewsAttached() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VLCPlayerView.java From react-native-vlc-player with MIT License | 5 votes |
private void setMedia(String filePath) { // Set up video output final IVLCVout vout = mMediaPlayer.getVLCVout(); if (!vout.areViewsAttached()) { vout.setVideoView(mSurface); vout.addCallback(this); vout.attachViews(); } Uri uri = Uri.parse(filePath); media = new Media(libvlc, uri); mMediaPlayer.setMedia(media); if (autoPlay) { mMediaPlayer.play(); } }
Example 2
Source File: VideoPlayerActivity.java From VCL-Android with Apache License 2.0 | 5 votes |
private void handleVout(int voutCount) { final IVLCVout vlcVout = mService.getVLCVout(); if (vlcVout.areViewsAttached() && voutCount == 0 && !mEndReached) { /* Video track lost, open in audio mode */ Log.i(TAG, "Video track lost, switching to audio"); mSwitchingView = true; exit(RESULT_VIDEO_TRACK_LOST); } }