Skip to content

Commit f887181

Browse files
committed
change setOptions
1 parent 4efa0ae commit f887181

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ allprojects {
2020
}
2121
}
2222
dependencies {
23-
compile 'com.github.pedroSG94.vlc-example-streamplayer:pedrovlc:2.5.14'
23+
compile 'com.github.pedroSG94.vlc-example-streamplayer:pedrovlc:2.5.14v3'
2424
}
2525
```
2626

@@ -33,6 +33,6 @@ allprojects {
3333
}
3434
}
3535
dependencies {
36-
compile 'com.github.pedroSG94.vlc-example-streamplayer:libvlc:2.5.14'
36+
compile 'com.github.pedroSG94.vlc-example-streamplayer:libvlc:2.5.14v3'
3737
}
3838
```

app/src/main/java/com/pedro/vlctestapp/MainActivity.java

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import android.widget.Toast;
1111
import com.pedro.vlc.VlcListener;
1212
import com.pedro.vlc.VlcVideoLibrary;
13+
import java.util.Arrays;
1314

1415
/**
1516
* Created by pedro on 25/06/17.
@@ -20,6 +21,8 @@ public class MainActivity extends AppCompatActivity implements VlcListener, View
2021
private Button bStartStop;
2122
private EditText etEndpoint;
2223

24+
private String[] options = new String[]{":fullscreen"};
25+
2326
@Override
2427
protected void onCreate(Bundle savedInstanceState) {
2528
super.onCreate(savedInstanceState);
@@ -30,6 +33,7 @@ protected void onCreate(Bundle savedInstanceState) {
3033
bStartStop.setOnClickListener(this);
3134
etEndpoint = (EditText) findViewById(R.id.et_endpoint);
3235
vlcVideoLibrary = new VlcVideoLibrary(this, this, surfaceView);
36+
vlcVideoLibrary.setOptions(Arrays.asList(options));
3337
}
3438

3539
@Override

pedrovlc/src/main/java/com/pedro/vlc/VlcVideoLibrary.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import android.view.SurfaceView;
99
import android.view.TextureView;
1010
import java.util.ArrayList;
11+
import java.util.List;
1112
import org.videolan.libvlc.IVLCVout;
1213
import org.videolan.libvlc.LibVLC;
1314
import org.videolan.libvlc.Media;
@@ -29,7 +30,7 @@ public class VlcVideoLibrary implements MediaPlayer.EventListener {
2930
private SurfaceTexture surfaceTexture;
3031
private Surface surface;
3132
private SurfaceHolder surfaceHolder;
32-
private ArrayList<String> options = new ArrayList<>();
33+
private List<String> options = new ArrayList<>();
3334

3435
public VlcVideoLibrary(Context context, VlcListener vlcListener, SurfaceView surfaceView) {
3536
this.vlcListener = vlcListener;
@@ -91,7 +92,12 @@ public VlcVideoLibrary(Context context, VlcListener vlcListener, Surface surface
9192
options.add(":fullscreen");
9293
}
9394

94-
public void setOptions(ArrayList<String> options) {
95+
/**
96+
* This method should be called after constructor and before play methods.
97+
*
98+
* @param options seeted to VLC player.
99+
*/
100+
public void setOptions(List<String> options) {
95101
this.options = options;
96102
}
97103

0 commit comments

Comments
 (0)