Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public class GamesFragment extends Fragment {
  2. @Override
  3. public View onCreateView(LayoutInflater inflater, ViewGroup container,
  4. Bundle savedInstanceState) {
  5. super.onCreate(savedInstanceState);
  6. View rootView = inflater.inflate(R.layout.fragment_games, container, false);
  7.  
  8.  
  9. final VideoView vidView = (VideoView)rootView.findViewById(R.id.myVideo);
  10. MediaController vidControl = new MediaController(getActivity());
  11. vidControl.setAnchorView(vidView);
  12. vidView.setMediaController(vidControl);
  13. String vidAddress = "rtsp://192.168.1.67:8080/test.mp4";
  14. Uri vidUri = Uri.parse(vidAddress);
  15. vidView.setVideoURI(vidUri);
  16. return rootView;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement