I have created android application in which I have m3u8
streaming links. Now I want the user to record the video at any stage during
video play and can stop also where I want. yet I googled it and no solution is available on stack overflow, and other android helping
sites. I am New in this section Please help me as soon as
possible. Now I am Stuck in this section. One Link I get but not helpful
How to record the http live streaming from an IP Cam
I made it a custom mediaplayer which is following and I just give m3u8
link to that media player and it play using default media player of android
<FrameLayout
android:id="@+id/videoSurfaceContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/videoplayer_title">
<SurfaceView
android:id="@+id/videoSurface"
android:background="@android:color/transparent"
android:layout_width="match_parent"
android:layout_below="@+id/videoplayer_title"
android:layout_height="200dp"
/>
<ImageView
android:id="@+id/videoplayer_icon"
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@android:color/transparent"
android:visibility="gone"
/>
<ProgressBar
android:id="@+id/progressbar"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_below="@+id/videoplayer_title"
android:background="@android:color/transparent"
android:visibility="gone"
/>
<LinearLayout
android:id="@+id/ll_controls_layout"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/media_controls_bg"
android:orientation="vertical"
android:layout_gravity="bottom"
android:visibility="visible">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp"
>
<ImageButton
android:id="@+id/pause"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:background="@android:color/transparent"
android:src="@drawable/pause_btn" />
<SeekBar
android:id="@+id/mediacontroller_progress"
android:layout_width="match_parent"
android:minHeight="6dip"
android:layout_toRightOf="@+id/pause"
android:maxHeight="6dip"
android:thumb="@drawable/abc_switch_thumb_material"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:progressDrawable="@drawable/styled_progress"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:layout_toLeftOf="@+id/time_current"
android:layout_marginLeft="3dp"
android:indeterminate="false"
android:visibility="visible"/>
<TextView
android:id="@+id/time_current"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textColor="@android:color/white"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/time"
android:paddingRight="3dp"
android:gravity="right"
android:textSize="10dp"
android:visibility="gone" />
<TextView
android:id="@+id/time"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:gravity="left"
android:layout_toLeftOf="@+id/recording_btn"
android:layout_centerVertical="true"
android:textSize="10dp"
android:visibility="gone" />
<ImageButton
android:id="@+id/recording_btn"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:background="@android:color/transparent"
android:layout_toLeftOf="@+id/fullscreen"
android:src="@drawable/startrecording_btn" />
<ImageButton
android:id="@+id/fullscreen"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:layout_marginLeft="4dp"
android:layout_marginRight="5dp"
android:layout_alignParentRight="true"
android:background="@android:color/transparent"
android:src="@drawable/ic_media_fullscreen_stretch" />
</RelativeLayout>
</LinearLayout>
</FrameLayout>