diff --git a/README.md b/README.md index 8f7c058..1e512d6 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Where to Download ----------------- ```groovy dependencies { - implementation 'com.xlythe:camera-view:1.3' + implementation 'com.xlythe:camera-view:2.0' } ``` @@ -134,6 +134,7 @@ maxVideoDuration [milliseconds], and maxVideoSize [bytes]. android:layout_width="match_parent" android:layout_height="match_parent" camera:quality="high" + camera:lensFacing="back" camera:maxVideoDuration="10000" camera:maxVideoSize="10000000" /> ``` @@ -153,6 +154,10 @@ Stops recording ```java mCameraView.stopRecording(); ``` +Returns a stream of bytes for both audio and video channels. These bytes can then be played with VideoView. +```java +mCameraView.stream(); +``` Toggles between the various cameras on the device (typically the front and back cameras) ```java mCameraView.toggleCamera(); @@ -178,6 +183,11 @@ mVideoView.setFile(file); mVideoView.play(); mVideoView.pause(); ``` +```java +mVideoView.setStream(new VideoStream.Builder().withAudioStream(...).withVideoStream(...).build()); +mVideoView.play(); +mVideoView.pause(); +``` License ------- diff --git a/gradle.properties b/gradle.properties index 08d80df..89e83ca 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ bintray.libraryName=CameraView bintray.groupId=com.xlythe bintray.artifact=camera-view -bintray.libraryVersion=1.3 +bintray.libraryVersion=2.0 bintray.libraryDescription='An Android View that displays the camera'