|
| 1 | +# VideoLayout :chicken: |
| 2 | + |
| 3 | +[](https://app.codacy.com/app/AsynctaskCoffee/VideoLayout?utm_source=github.com&utm_medium=referral&utm_content=AsynctaskCoffee/VideoLayout&utm_campaign=Badge_Grade_Dashboard) [](https://opensource.org/licenses/Apache-2.0)  [](https://gitter.im/VideoLayout/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) |
| 4 | + |
| 5 | + |
| 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 | +``` |
0 commit comments