Skip to content

Commit bd4d137

Browse files
authored
Update README.md
1 parent 7078c43 commit bd4d137

File tree

1 file changed

+97
-1
lines changed

1 file changed

+97
-1
lines changed

README.md

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,98 @@
1-
# video-record-button
1+
# Circle Video Record
22
Simple video recorder component for android
3+
4+
## Demo
5+
<p align="center">
6+
<img src="art/demo.gif" height="500" alt="video record android" />
7+
</p>
8+
9+
## Install
10+
Add the dependecy
11+
12+
```gradle
13+
allprojects {
14+
repositories {
15+
...
16+
maven { url 'https://jitpack.io' }
17+
}
18+
}
19+
20+
dependencies {
21+
compile 'com.github.safetysystemtechnology:circle-video-record:v1.0'
22+
}
23+
24+
```
25+
26+
## Usage
27+
28+
### XML
29+
30+
```xml
31+
<br.com.netodevel.circle_video_record.CircleVideoRecord
32+
android:id="@+id/circle_video_record"
33+
android:layout_width="wrap_content"
34+
android:layout_height="wrap_content"
35+
android:layout_centerInParent="true"
36+
app:circle_width="280dp"
37+
app:circle_height="280dp"
38+
app:play_button_image="@drawable/ic_play_circle"
39+
app:close_button_image="@drawable/ic_stop"
40+
app:max_time_message="Max time!!">
41+
</br.com.netodevel.circle_video_record.CircleVideoRecord>
42+
```
43+
### Kotlin
44+
```kotlin
45+
var mStatus: Boolean? = false
46+
47+
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN)
48+
override fun onCreate(savedInstanceState: Bundle?) {
49+
super.onCreate(savedInstanceState)
50+
setContentView(R.layout.activity_main)
51+
52+
circle_video_record.setup(root_layout)
53+
button_record.setOnClickListener {
54+
mStatus = !mStatus!!;
55+
56+
if (mStatus == true) {
57+
circle_video_record.show()
58+
} else {
59+
circle_video_record.hide()
60+
}
61+
62+
circle_video_record.setVideoListener {
63+
Log.d("video_path", it.absolutePath)
64+
}
65+
}
66+
}
67+
68+
override fun onResume() {
69+
super.onResume()
70+
circle_video_record.camera.start()
71+
}
72+
73+
override fun onPause() {
74+
circle_video_record.camera.stop()
75+
super.onPause()
76+
}
77+
```
78+
79+
## License
80+
The MIT License (MIT)
81+
82+
Copyright (c) Safety System Technology
83+
84+
Permission is hereby granted, free of charge, to any person obtaining a
85+
copy of this software and associated documentation files (the "Software"),
86+
to deal in the Software without restriction, including without limitation
87+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
88+
and/or sell copies of the Software, and to permit persons to whom the Software is
89+
furnished to do so, subject to the following conditions:
90+
91+
The above copyright notice and this permission notice shall be included
92+
in all copies or substantial portions of the Software.
93+
94+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
95+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
96+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
97+
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
98+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)