Skip to content

Commit e551095

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 6511d5c + 1cf496d commit e551095

4 files changed

Lines changed: 361 additions & 4 deletions

File tree

README.cn.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# VideoLayout :chicken:
2+
3+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ea90e5f54edc468eb5e6246f9fc806ed)](https://app.codacy.com/app/AsynctaskCoffee/VideoLayout?utm_source=github.com&utm_medium=referral&utm_content=AsynctaskCoffee/VideoLayout&utm_campaign=Badge_Grade_Dashboard) [![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0) ![version](https://img.shields.io/badge/version-1.3-blue) [![Gitter](https://badges.gitter.im/VideoLayout/community.svg)](https://gitter.im/VideoLayout/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4+
5+
![Preview](/previews/git.gif)
6+
7+
> 更时尚的背景设计
8+
9+
> 性能友好且可扩展
10+
11+
## 为什么这个项目存在
12+
就性能而言,Android上的普通-videoview-成本很高。 另外,由于视频分辨率和apk大小,大多数开发人员都不希望在项目中包含视频。 有了这个库,开发人员将拥有几行代码的性能友好的视频背景。
13+
14+
## 功能与用法
15+
16+
### 易于实施
17+
18+
```java
19+
frameLayout = findViewById(R.id.frameLayout)
20+
videoLayout = VideoLayout(this)
21+
videoLayout.setGravity(VideoLayout.VGravity.centerCrop)
22+
videoLayout.setIsLoop(true)
23+
videoLayout.setSound(true)
24+
videoLayout.setPathOrUrl("loginvideotype3.mp4") // 可以是任何视频网址
25+
frameLayout.addView(videoLayout)
26+
```
27+
28+
```xml
29+
<egolabsapps.basicodemine.videolayout.VideoLayout
30+
android:id="@+id/videoLayout"
31+
android:layout_width="match_parent"
32+
android:layout_height="match_parent"
33+
android:layout_gravity="center"
34+
app:sound="true"
35+
app:video_gravity="centerCrop"
36+
app:path_or_url="loginvideotype3.mp4"
37+
app:loop="true"/>
38+
```
39+
40+
###### 您应该将mp4文件放入资产文件夹,如果使用URL,则应在AndroidManifest中声明互联网权限
41+
42+
```xml
43+
<uses-permission android:name="android.permission.INTERNET"/>
44+
```
45+
46+
## 图书馆实施
47+
48+
###### 将其添加到存储库末尾的root build.gradle中
49+
50+
```groovy
51+
repositories {
52+
maven { url 'https://jitpack.io' }
53+
}
54+
```
55+
56+
###### 添加依赖项
57+
58+
```groovy
59+
dependencies {
60+
implementation 'com.github.AsynctaskCoffee:VideoLayout:1.3'
61+
}
62+
```
63+
64+
## 实施Maven
65+
66+
###### 将JitPack存储库添加到您的构建文件中
67+
68+
```groovy
69+
<repositories>
70+
<repository>
71+
<id>jitpack.io</id>
72+
<url>https://jitpack.io</url>
73+
</repository>
74+
</repositories>
75+
```
76+
77+
###### 添加依赖项
78+
79+
```groovy
80+
<dependency>
81+
<groupId>com.github.AsynctaskCoffee</groupId>
82+
<artifactId>VideoLayout</artifactId>
83+
<version>1.3</version>
84+
</dependency>
85+
```
86+
87+
### 更新
88+
89+
> 14.07.2020 - AndroidX迁移和代码重构
90+
91+
> 21.09.2020 - 声音支持和新的预览设计实现已添加
92+
93+
> 02.12.2020 - 修正
94+
95+
## 执照
96+
97+
```
98+
Copyright 2020 Egemen ÖZOGUL
99+
100+
Licensed under the Apache License, Version 2.0 (the "License");
101+
you may not use this file except in compliance with the License.
102+
You may obtain a copy of the License at
103+
104+
http://www.apache.org/licenses/LICENSE-2.0
105+
106+
Unless required by applicable law or agreed to in writing, software
107+
distributed under the License is distributed on an "AS IS" BASIS,
108+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
109+
See the License for the specific language governing permissions and
110+
limitations under the License.
111+
```

README.kr.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# VideoLayout :chicken:
2+
3+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ea90e5f54edc468eb5e6246f9fc806ed)](https://app.codacy.com/app/AsynctaskCoffee/VideoLayout?utm_source=github.com&utm_medium=referral&utm_content=AsynctaskCoffee/VideoLayout&utm_campaign=Badge_Grade_Dashboard) [![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0) ![version](https://img.shields.io/badge/version-1.3-blue) [![Gitter](https://badges.gitter.im/VideoLayout/community.svg)](https://gitter.im/VideoLayout/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4+
5+
![Preview](/previews/git.gif)
6+
7+
> 더욱 세련된 배경 디자인
8+
9+
> 성능 친화적이고 확장 가능
10+
11+
## 이 프로젝트가 존재하는 이유
12+
Android의 일반적인 videoview는 성능 측면에서 매우 비쌉니다. 또한 비디오 해상도 비율과 APK 크기로 인해 대부분의 개발자는 프로젝트에 비디오를 포함하고 싶지 않습니다. 이 라이브러리를 통해 개발자는 몇 줄의 코드로 성능 친화적 인 비디오 배경을 갖게됩니다.
13+
## 특징 및 사용법
14+
15+
### 간편한 구현
16+
17+
```java
18+
frameLayout = findViewById(R.id.frameLayout)
19+
videoLayout = VideoLayout(this)
20+
videoLayout.setGravity(VideoLayout.VGravity.centerCrop)
21+
videoLayout.setIsLoop(true)
22+
videoLayout.setSound(true)
23+
videoLayout.setPathOrUrl("loginvideotype3.mp4") // 모든 동영상 URL이 될 수 있습니다.
24+
frameLayout.addView(videoLayout)
25+
```
26+
27+
```xml
28+
<egolabsapps.basicodemine.videolayout.VideoLayout
29+
android:id="@+id/videoLayout"
30+
android:layout_width="match_parent"
31+
android:layout_height="match_parent"
32+
android:layout_gravity="center"
33+
app:sound="true"
34+
app:video_gravity="centerCrop"
35+
app:path_or_url="loginvideotype3.mp4"
36+
app:loop="true"/>
37+
```
38+
39+
###### mp4 파일을 assets 폴더에 넣어야하며, URL을 사용하는 경우 인터넷 권한을 선언해야합니다.
40+
41+
```xml
42+
<uses-permission android:name="android.permission.INTERNET"/>
43+
```
44+
45+
## 구현 Gradle
46+
47+
###### 저장소 끝의 루트 build.gradle에 추가하십시오.
48+
49+
```groovy
50+
repositories {
51+
maven { url 'https://jitpack.io' }
52+
}
53+
```
54+
55+
###### 종속성 추가
56+
57+
```groovy
58+
dependencies {
59+
implementation 'com.github.AsynctaskCoffee:VideoLayout:1.3'
60+
}
61+
```
62+
63+
## 구현 Maven
64+
65+
###### 빌드 파일에 JitPack 저장소 추가
66+
67+
```groovy
68+
<repositories>
69+
<repository>
70+
<id>jitpack.io</id>
71+
<url>https://jitpack.io</url>
72+
</repository>
73+
</repositories>
74+
```
75+
76+
###### 종속성 추가
77+
78+
```groovy
79+
<dependency>
80+
<groupId>com.github.AsynctaskCoffee</groupId>
81+
<artifactId>VideoLayout</artifactId>
82+
<version>1.3</version>
83+
</dependency>
84+
```
85+
86+
### 업데이트
87+
88+
> 14.07.2020 - AndroidX 마이그레이션 및 코드 리팩터링
89+
90+
> 21.09.2020 - 사운드 지원 및 새로운 미리보기 디자인 구현 추가
91+
92+
> 02.12.2020 - 수정
93+
94+
## 특허
95+
96+
```
97+
Copyright 2020 Egemen ÖZOGUL
98+
99+
Licensed under the Apache License, Version 2.0 (the "License");
100+
you may not use this file except in compliance with the License.
101+
You may obtain a copy of the License at
102+
103+
http://www.apache.org/licenses/LICENSE-2.0
104+
105+
Unless required by applicable law or agreed to in writing, software
106+
distributed under the License is distributed on an "AS IS" BASIS,
107+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
108+
See the License for the specific language governing permissions and
109+
limitations under the License.
110+
```

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
# VideoLayout :chicken:
1+
# VideoLayout :chicken:
2+
3+
4+
5+
| [:cn: 中文](https://github.com/AsynctaskCoffee/VideoLayout/blob/master/README.cn.md) | [:kr: 한국어](https://github.com/AsynctaskCoffee/VideoLayout/blob/master/README.kr.md) | [:gb: English](https://github.com/AsynctaskCoffee/VideoLayout/blob/master/README.md) | [:tr: Türkçe](https://github.com/AsynctaskCoffee/VideoLayout/blob/master/README.tr.md) |
6+
|-------------------------------------------------------------------------------------:|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
7+
8+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ea90e5f54edc468eb5e6246f9fc806ed)](https://app.codacy.com/app/AsynctaskCoffee/VideoLayout?utm_source=github.com&utm_medium=referral&utm_content=AsynctaskCoffee/VideoLayout&utm_campaign=Badge_Grade_Dashboard) [![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0) ![version](https://img.shields.io/badge/version-1.3-blue) [![Gitter](https://badges.gitter.im/VideoLayout/community.svg)](https://gitter.im/VideoLayout/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
29

3-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ea90e5f54edc468eb5e6246f9fc806ed)](https://app.codacy.com/app/AsynctaskCoffee/VideoLayout?utm_source=github.com&utm_medium=referral&utm_content=AsynctaskCoffee/VideoLayout&utm_campaign=Badge_Grade_Dashboard) [![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0) ![version](https://img.shields.io/badge/version-1.2-blue) [![Gitter](https://badges.gitter.im/VideoLayout/community.svg)](https://gitter.im/VideoLayout/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
410

511
![Preview](/previews/git.gif)
612

@@ -37,6 +43,25 @@ The normal videoview on Android is very costly in terms of performance. Also, du
3743
app:loop="true"/>
3844
```
3945

46+
###### Recommended :collision:
47+
48+
```kotlin
49+
override fun onDestroy() {
50+
super.onDestroy()
51+
videoLayout.onDestroyVideoLayout()
52+
}
53+
54+
override fun onPause() {
55+
super.onPause()
56+
videoLayout.onPauseVideoLayout()
57+
}
58+
59+
override fun onResume() {
60+
super.onResume()
61+
videoLayout.onResumeVideoLayout()
62+
}
63+
```
64+
4065
###### You should put your mp4 files into assets folder, If you use URL you should declare
4166

4267
```xml
@@ -57,7 +82,7 @@ The normal videoview on Android is very costly in terms of performance. Also, du
5782

5883
```groovy
5984
dependencies {
60-
implementation 'com.github.AsynctaskCoffee:VideoLayout:1.2'
85+
implementation 'com.github.AsynctaskCoffee:VideoLayout:1.3'
6186
}
6287
```
6388

@@ -80,7 +105,7 @@ The normal videoview on Android is very costly in terms of performance. Also, du
80105
<dependency>
81106
<groupId>com.github.AsynctaskCoffee</groupId>
82107
<artifactId>VideoLayout</artifactId>
83-
<version>1.2</version>
108+
<version>1.3</version>
84109
</dependency>
85110
```
86111

@@ -90,6 +115,8 @@ The normal videoview on Android is very costly in terms of performance. Also, du
90115
91116
> 21.09.2020 - Sound support and new preview design implementation added
92117
118+
> 02.12.2020 - Fix
119+
93120
## License
94121

95122
```

0 commit comments

Comments
 (0)