0

当我用媒体播放器播放视频时,它可以正常工作,因为我改变了方向,我的媒体播放器抛出错误(260,-2147483648)。我已经搜索过这个错误但没有结果。那是什么?

这是我改变方向时的logcat:

04-15 15:23:04.371: E/androidEx2 = VideoSample(6358): surfaceDestroyed
04-15 15:23:04.391: E/androidEx2 = VideoSample(6358): onTrackPause
04-15 15:23:04.575: E/androidEx2 = VideoSample(6358): surfaceCreated
04-15 15:23:04.576: E/androidEx2 = VideoSample(6358): onTrackStart
04-15 15:23:04.576: E/androidEx2 = VideoSample(6358): VIDEO SIZES: W: 640 H: 360 PROP: 1.7777778
04-15 15:24:43.643: E/androidEx2 = VideoSample(6358): VIDEO SIZES: W: 800 H: 480 PROP: 1.6666666
04-15 15:24:43.678: E/MediaPlayer(6358): error (260, -2147483648)
04-15 15:24:43.801: E/MediaPlayer(6358): Error (260,-2147483648)
04-15 15:24:44.301: E/MediaPlayer(6358): stop called in state 0
04-15 15:24:44.301: E/MediaPlayer(6358): error (-38, 0)
04-15 15:24:44.341: E/androidEx2 = VideoSample(6358): onTrackStop
4

1 回答 1

0

使用此属性注册您的活动

<activity
    android:configChange="orientation|screenSize"
/>

AndroidManifest.xml

如果您只想将屏幕设置为特定方向(例如横向),请在<activity>

<activity
    android:screenOrientation="landscape"
/>
于 2013-04-15T08:22:19.077 回答