Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple stream #9

Open
catafestaxx opened this issue Oct 20, 2017 · 7 comments
Open

multiple stream #9

catafestaxx opened this issue Oct 20, 2017 · 7 comments

Comments

@catafestaxx
Copy link

I'm testing the system but I'm in doubt as I make the player run more than one stream I want to test it with 5 stream could give me a hint: ???

@ivan-petrov
Copy link
Collaborator

Hello,
You have to create 5 different instances with 5 separate views.

@catafestaxx
Copy link
Author

catafestaxx commented Oct 25, 2017

have some example in viblast source how to do

I'm lost in this part.
I want to put 3 url m3u as I do ??

EX:

public class MainActivity extends Activity {
private ViblastPlayer viblastPlayer;
private ViblastView viblastView;

@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);
	viblastView = (ViblastView)findViewById(R.id.viblast_view);
	
	final ViblastConfig vbConfig = new ViblastConfig();
	
	// start faster, using the lowest resolution:
	vbConfig.advancedConfig.put("initial-abr-index", "0");
	vbConfig.setCdnStream("http://url/port/index.m3u8");

	
	vbConfig.advancedConfig.put("enable-pdn", "true");
	vbConfig.advancedConfig.put("enable-realtime-loggger", "true");
	vbConfig.advancedConfig.put("realtime-logger-server", "wss://cs.viblast.com/rt");
	vbConfig.advancedConfig.put("key", "f87aa9ad-113a-4435-bb27-db4c7c2d9ace");

// if you want to see Viblast logs:
// vbConfig.advancedConfig.put("log", "verbose");

	viblastPlayer = new ViblastPlayer(viblastView, vbConfig);

@ivan-petrov
Copy link
Collaborator

You can try with something like this:
...

final ViblastConfig vbConfig = new ViblastConfig();
	
	// start faster, using the lowest resolution:
	vbConfig.advancedConfig.put("initial-abr-index", "0");
	vbConfig.setCdnStream("http://url/port/index.m3u8");

	
	vbConfig.advancedConfig.put("enable-pdn", "true");
	vbConfig.advancedConfig.put("enable-realtime-loggger", "true");
	vbConfig.advancedConfig.put("realtime-logger-server", "wss://cs.viblast.com/rt");
	vbConfig.advancedConfig.put("key", "f87aa9ad-113a-4435-bb27-db4c7c2d9ace");

viblastView1 = (ViblastView)findViewById(R.id.viblast_view1);
vbConfig.setCdnStream("http://url/port/index1.m3u8");
viblastPlayer1 = new ViblastPlayer(viblastView1, vbConfig);

viblastView2 = (ViblastView)findViewById(R.id.viblast_view2);
vbConfig.setCdnStream("http://url/port/index2.m3u8");
viblastPlayer2 = new ViblastPlayer(viblastView2, vbConfig);
//etc...

@catafestaxx
Copy link
Author

catafestaxx commented Oct 25, 2017 via email

@ivan-petrov
Copy link
Collaborator

The code above is "pseudo". You have to define the additional resources and instances needed by your app. With the demo application only one view and single player instance is supported.

@catafestaxx
Copy link
Author

catafestaxx commented Oct 26, 2017 via email

@eletriccharger
Copy link

Ik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants