Kotlin

코틀린 안드로이드 videoView 사용하기

Machine_웅 2019. 1. 28. 14:35
728x90
반응형

<VideoView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:id="@+id/media_content_video_View"
android:visibility="gone"/>

 

var videoAdd = ipAdd + "oneRoomVideoDIR/"+ msUri
media_content_video_View.setVideoPath(videoAdd)


var mediaController : MediaController = MediaController(this)
media_content_video_View.setMediaController(mediaController)
media_content_video_View.start()

 

<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
728x90
반응형