locked
How to play video? RRS feed

  • Question

  • User46375 posted

    I need to play video in my app, and I use the VideoView control, the app can play mp4, but when i playing the video, I rotate the phone, the video will be stop. So, how can I control the videoview to play video correctory? Or how can I pop up a window to select a app to play the local video or remote video? thanks a lot.

    Tuesday, April 29, 2014 1:02 PM

Answers

  • User25759 posted

    When a device is rotated Android will kill your activity so you would have to re-start it in the correct place by saving out the position and restart ing. You can additionally lock the rotation as well by adding this to the [Activity] on top:

    ScreenOrientation = ScreenOrientation.Landscape

    such as:

    [Activity (Label = "Video", ScreenOrientation = ScreenOrientation.Landscape)]

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, April 29, 2014 8:40 PM

All replies

  • User25759 posted

    When a device is rotated Android will kill your activity so you would have to re-start it in the correct place by saving out the position and restart ing. You can additionally lock the rotation as well by adding this to the [Activity] on top:

    ScreenOrientation = ScreenOrientation.Landscape

    such as:

    [Activity (Label = "Video", ScreenOrientation = ScreenOrientation.Landscape)]

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, April 29, 2014 8:40 PM
  • User46375 posted

    thank you James :)

    Wednesday, April 30, 2014 12:53 AM