From 4f5effaacae04ca0e122c5b8333fa83198445d2a Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Tue, 5 Jun 2018 15:55:33 -0700 Subject: [PATCH 1/9] Basic bug report template --- .github/ISSUE_TEMPLATE/bug_report.md | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..778a4f02 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Platform:** +Which player are you using? +iOS, Android ExoPlayer, Android MediaPlayer, Windows UWP, or Windows WPF + +**Video:** +If possible, provide a URL or download for the video that causes the issue. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Additional context** +Add any other context about the problem here. From a80bcbb83f6fa2212d749cbe6f7f77e2a29799df Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Tue, 5 Jun 2018 15:56:54 -0700 Subject: [PATCH 2/9] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 31 ---------------------------- .github/ISSUE_TEMPLATE/custom.md | 7 +++++++ 2 files changed, 7 insertions(+), 31 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/custom.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 778a4f02..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Platform:** -Which player are you using? -iOS, Android ExoPlayer, Android MediaPlayer, Windows UWP, or Windows WPF - -**Video:** -If possible, provide a URL or download for the video that causes the issue. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 00000000..befe3586 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,7 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. + +--- + +Test From 792d617bbad9a9ba47d5b610ab2f908e19333040 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Tue, 5 Jun 2018 16:02:04 -0700 Subject: [PATCH 3/9] Create ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..b0312b30 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ +### Current behavior +Describe what happens when you encounter this issue. + +### Reproduction steps +A 1, 2, 3, etc. list of what's needed to see the issue happen. + +### Expected behavior +Describe what you wanted to happen + +### Platform +Which player are you experiencing the problem on: +* iOS +* Android ExoPlayer +* Android MediaPlayer +* Windows UWP +* Windows WPF + +### Video sample +If possible, include a link to the video that has the problem that can be streamed or downloaded from. From 586cd70f68960e5faf5612e6f2d945dc88e5431e Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Tue, 5 Jun 2018 16:02:17 -0700 Subject: [PATCH 4/9] Delete custom.md --- .github/ISSUE_TEMPLATE/custom.md | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/custom.md diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md deleted file mode 100644 index befe3586..00000000 --- a/.github/ISSUE_TEMPLATE/custom.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: Custom issue template -about: Describe this issue template's purpose here. - ---- - -Test From c097c7d38558ea035c27ac091ed7b30b7971643a Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Tue, 5 Jun 2018 17:27:19 -0700 Subject: [PATCH 5/9] Begin expanding props docs --- README.md | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/README.md b/README.md index 312e5ae0..78e72fa9 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,88 @@ var styles = StyleSheet.create({ }, }); ``` + +### Props +* [ignoreSilentSwitch](#ignoreSilentSwitch) +* [muted](#muted) +* [paused](#paused) +* [progressUpdateInterval](#progressUpdateInterval) +* [rate](#rate) +* [resizeMode](#resizeMode) + +#### ignoreSilentSwitch +Controls the iOS silent switch behavior +* **"ignore"** - Play audio even if the silent switch is set +* **"inherit"** - Use the default AVPlayer behavior +* **"obey"** - Don't play audio if the silent switch is set + +Type | Default | Platforms +--- | --- | --- +string | "inherit" | iOS + +#### muted +If true, mutes the audio + +Type | Default | Platforms +--- | --- | --- +boolean | false | all + +#### paused +If true, pauses the media + +Type | Default | Platforms +--- | --- | --- +boolean | false | all + +#### progressUpdateInterval +Delay between onProgress events in milliseconds + +Type | Default | Platforms +--- | --- | --- +number | 250.0 | all + +#### rate +Speed at which the media should play. +* **0.0** - Pauses the video +* **1.0** - Play at normal speed +* **Other values** - Slow down or speed up playback + +Type | Default | Platforms +--- | --- | --- +number | 1.0 | all + +Note: On Android MediaPlayer, rate is only supported on Android 6.0 and higher devices. + +#### resizeMode +Determines how to resize the video when the frame doesn't match the raw video dimensions. +* **"contain"** - Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding). +* **"cover"** - Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). +* **"none"** - Don't apply resize +* **"stretch"** - Scale width and height independently, This may change the aspect ratio of the src. + +Type | Default | Platforms +--- | --- | --- +string | "none" | Android ExoPlayer, Android MediaPlayer, iOS, Windows UWP + +#### volume +Adjust the volume. +* **0.0** - Mute the audio +* **Other values** - Reduce volume +* **1.0** - Play at full volume + + + +Name | Type | Default | Platforms | Description +--- | --- | --- | --- | --- +ignoreSilentSwitch | string | "obey" | iOS | **"ignore"** Play audio even if the silent switch is set
**inherit** - Use the default behavior
**"obey"** - Don't play audio if the silent switch is set +muted | boolean | false | all | When true, mutes the audio +paused | boolean | false | all | When true, pauses the video +progressUpdateInterval | number | 250.0 | all | Delay between onProgress events in milliseconds +rate | number | 1.0 | all | normal rate to speed up or slow down playback
Note: For Android MediaPlayer, only works on Android 6.0+ +repeat | boolean | false | all | When true, once the end is reached the video will replay from the start +resizeMode | string | "none" | AMP
Exo
iOS
UWP | **"contain"** - Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
**"cover"** - Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).
"none" Don't apply resize
**"stretch"** - Scale width and height independently, This may change the aspect ratio of the src.
+volume | number | 1.0 | all | + To see the full list of available props, you can check the [propTypes](https://github.com/react-native-community/react-native-video/blob/master/Video.js#L246) of the Video.js component. - By default, iOS 9+ will only load encrypted HTTPS urls. If you need to load content from a webserver that only supports HTTP, you will need to modify your Info.plist file and add the following entry: From 87c1b87a391a8a984a05ac2e34d03f064f3ebebd Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Tue, 5 Jun 2018 18:03:14 -0700 Subject: [PATCH 6/9] Add docs for most configurable props Add individual sections for each of the common configurable props --- README.md | 95 ++++++++++++++++++++++++------------------------------- 1 file changed, 41 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 78e72fa9..6d248cb0 100644 --- a/README.md +++ b/README.md @@ -181,21 +181,11 @@ using System.Collections.Generic; // on a single screen if you like.