Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GamesFragment extends Fragment {
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- View rootView = inflater.inflate(R.layout.fragment_games, container, false);
- final VideoView vidView = (VideoView)rootView.findViewById(R.id.myVideo);
- MediaController vidControl = new MediaController(getActivity());
- vidControl.setAnchorView(vidView);
- vidView.setMediaController(vidControl);
- String vidAddress = "rtsp://192.168.1.67:8080/test.mp4";
- Uri vidUri = Uri.parse(vidAddress);
- vidView.setVideoURI(vidUri);
- return rootView;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement