Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
longdt57 authored Jul 6, 2022
1 parent aa291a3 commit 18a03e1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Background-VideoView
[![Version](https://jitpack.io/v/longdt57/Background-VideoView.svg)](https://github.com/longdt57/Background-VideoView/releases)

Set Video as a Background.
Set Video as a Background. The video ratio should be as mobile ratio (ie: 1920x1080)

Example:
<video src="https://user-images.githubusercontent.com/106943585/177454594-746cf8e0-2296-4368-a70b-ce751dd8db3b.mp4" />
| Origin(1080x1920) | RawVideoView|
|-|-|
| <video src="https://user-images.githubusercontent.com/106943585/177454594-746cf8e0-2296-4368-a70b-ce751dd8db3b.mp4" width=300 /> | <video src="https://user-images.githubusercontent.com/8809113/177455631-92817a0a-dd0b-41cc-b5fb-3ef453bebf1d.mp4" width=300 /> |

## Implementation
build.gradle
Expand All @@ -13,6 +14,7 @@ repositories {
maven { url "https://jitpack.io" }
}
dependencies {
implementation 'com.github.longdt57:Background-VideoView:{version}'
}
Expand All @@ -24,4 +26,4 @@ XML
app:video_loop="true"
app:video_raw_res="@raw/sample_raw_video" />
```
Kotlin: `lifecycle.addObserver(RawVideoView)`
Kotlin: `lifecycle.addObserver(RawVideoView)`

0 comments on commit 18a03e1

Please sign in to comment.