Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

video streaming + android

Featured Replies

Posté(e)

bonjour pour tous le monde

je suis entrain de developper une application android pour un club sportif

le problem c'est que le video streaming ne marche plus

voila mon code

package com.google.android.AppEST;

import java.io.File;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.InputStream;

import java.net.URL;

import java.net.URLConnection;

import android.app.Activity;

import android.content.Intent;

import android.os.Bundle;

import android.util.Log;

import android.view.View;

import android.view.View.OnClickListener;

import android.webkit.URLUtil;

import android.widget.Button;

import android.widget.EditText;

import android.widget.ImageButton;

import android.widget.ImageView;

import android.widget.TextView;

import android.widget.Toast;

import android.widget.VideoView;

public class Video extends Activity implements View.OnClickListener{

private static final String TAG = "Video";

private VideoView mVideoView;

private EditText mPath;

private ImageButton mPlay;

private ImageButton mPause;

private ImageButton mReset;

private ImageButton mStop;

private String current;

private int val;

private String titre;

static String stitre;

videoClub vc;

public void onCreate(Bundle icicle) {

super.onCreate(icicle);

setContentView(R.layout.video);

mVideoView = (VideoView) findViewById(R.id.surface_view);

mPlay = (ImageButton) findViewById(R.id.play);

mPause = (ImageButton) findViewById(R.id.pause);

mStop = (ImageButton) findViewById(R.id.stop);

ImageView entete = (ImageView)this.findViewById(R.id.entete_img);

TetePied tp=new TetePied(entete);

Button ret=(Button)this.findViewById(R.id.retour);

ret.setOnClickListener(this);

final TextView texthaut = (TextView) findViewById(R.id.text);

Bundle objetbunble = this.getIntent().getExtras();

if (objetbunble != null && objetbunble.containsKey("id"))

val=this.getIntent().getIntExtra("id",0);

titre = new String (vc.titreChant[val]);

mPlay.setOnClickListener(new OnClickListener() {

public void onClick(View view) {

playVideo(titre);

}

});

mPause.setOnClickListener(new OnClickListener() {

public void onClick(View view) {

if (mVideoView != null) {

mVideoView.pause();

}

}

});

mStop.setOnClickListener(new OnClickListener() {

public void onClick(View view) {

if (mVideoView != null) {

current = null;

mVideoView.stopPlayback();

}

}

});

}

private void playVideo(String titre) {

try {

//final String path = "http://192.168.1.90:8084/AppIPhone/xml/test2.mp4";

//lecture video

final String path = "http://www.ysnky.com/downloads/test.3gp"+titre;

mVideoView.setVideoPath(path);

mVideoView.start();

mVideoView.requestFocus();

} catch (Exception e) {

Log.e(TAG, "error: " + e.getMessage(), e);

if (mVideoView != null) {

mVideoView.stopPlayback();

}

}

}

@Override

public void onClick(View arg0) {

// TODO Auto-generated method stub

mVideoView.stopPlayback();

finish();

Intent intent = new Intent(Video.this, videoClub.class);

startActivity(intent);

}

}

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.