Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
Merge 2.0.3 into Main
Browse files Browse the repository at this point in the history
2.0.3
  • Loading branch information
jonafeucht committed Mar 29, 2021
2 parents ea57eb8 + 26e2151 commit 1a9552f
Show file tree
Hide file tree
Showing 17 changed files with 395 additions and 319 deletions.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: jonatadashi

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce:**
Steps to reproduce the behavior:

**Expected behavior:**

**Flutter Doctor:**

**Additional context**
Add any other context about the problem here.
23 changes: 23 additions & 0 deletions .github/issuecomplete.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configuration for Issue Check: https://github.com/stevenzeck/issue-check

# The name of the label to apply when an issue does not have all tasks checked
labelName: "status: needs-additional-info"

# The color of the label in hex format (without #). Will use the label color configured
# in Issues settings.
labelColor:

# The text of the comment to add to the issue in addition to the label
commentText: >
Hello! It doesn't seem like we have quite enough information to send this to
a human yet to help out. We would love if you could provide more details about
your issue by following the template without modifying any of the pre-filled
text.
# Whether or not to ensure all checkboxes are checked
checkCheckboxes: false

# Keywords to look for in the body of the issue
keywords:
- Bug
- Expected behavior
20 changes: 20 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 7
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
exemptAssignees: true
# Label to use when marking an issue as stale
staleLabel: "status: waiting-for-reply"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
# Limit to only `issues` or `pulls`
only: issues
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
## 2.0.3
- Fix `Unhandled Exception: MissingPluginException`.
- Fix [#18](https://github.com/jonatadashi/youtube_plyr_iframe/issues/18).
- Added `hideYoutubeLogo`.
- Added `hideEndScreen`.

## 2.0.2
- Added `useHybridComposition`.
- Added documentation on how to load thumbnails.

## 2.0.1
- Fix `Unhandled Exception: Null check operator used on a null value`
Added showTopMenu as requested in [#12](https://github.com/jonatadashi/youtube_plyr_iframe/issues/12).
- Added showTopMenu as requested in [#12](https://github.com/jonatadashi/youtube_plyr_iframe/issues/12).

## 2.0.0
- 💪 Running with sound null safety 💪
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ For more details see: [https://pub.dev/packages/youtube_plyr_iframe/install](htt

[Click here for WEB DEMO](https://jonatadashi.github.io/Web-Example/)

## Example App
[<img src="https://itsallwidgets.com/images/google.png" height="70px">](https://play.google.com/store/apps/details?id=space.starhelix.lore.christianity)[<img src="https://chroniken.starhelix.space/dist/images/applestore.svg" height="70px">](https://apps.apple.com/app/id1484833082#?platform=iphone)

## Salient Features
* Inline Playback
* Supports captions
Expand Down Expand Up @@ -54,7 +51,17 @@ Since *flutter_inappwebview* relies on Flutter's mechanism for embedding Android
## Setup

### Web
No Configuration Required.
No Configuration required, if developing without the need to load thumbnails. (Inline thumbnails will still load.)

To load thumbnails the HTML renderer is needed.

- Run: `flutter run -d chrome --web-renderer html`
- Build: `flutter build web --web-renderer html --profile`

Read for more information:
- [Web renderers](https://flutter.dev/docs/development/tools/web-renderers)
- [Displaying images on the web
](https://flutter.dev/docs/development/platform-integration/web-images)

### iOS
No Configuration Required.
Expand Down Expand Up @@ -155,6 +162,8 @@ onExitFullScreen() | Called when player exits f
invokeJavascript(function) | Invoke custom javascript function.
hideTopMenu() | Hides the title and share icons at the top of player (_May violate YouTube's TOS. Use at your own risk._)
hidePauseOverlay() | Hides the related videos overlay while player is paused (_May violate YouTube's TOS. Use at your own risk._)
hideYoutubeLogo() | Hides the Youtube Logo (_May violate YouTube's TOS. Use at your own risk._)
hideEndScreen() | Hides the Endscreen Overlay (_May violate YouTube's TOS. Use at your own risk._)

## Youtube Player Parameters
All the available parameters.
Expand Down Expand Up @@ -183,7 +192,7 @@ desktopMode | The controls will be alike Youtube Desktop's contro

## License
```
Copyright 2020 Sarbagya Dhaubanjar. All rights reserved.
Copyright 2021 Sarbagya Dhaubanjar & Jona T. Feucht. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand All @@ -194,9 +203,6 @@ are permitted provided that the following conditions are met:
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:name="io.flutter.app.FlutterApplication"
android:label="youtube_plyr_iframe_example"
android:label="Youtube Plyr IFrame Demo"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>youtube_player_iframe_example</string>
<string>Youtube Plyr IFrame Demo</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand Down
55 changes: 19 additions & 36 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:youtube_player_iframe_example/pages/oldDemo.dart';
import 'package:youtube_player_iframe_example/pages/thumbnailDemo.dart';
import 'package:youtube_plyr_iframe/youtube_plyr_iframe.dart';

import 'pages/oldDemo.dart';
import 'pages/thumbnailDemo.dart';

void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(YoutubeApp());
Expand Down Expand Up @@ -72,7 +73,7 @@ class _YoutubeAppDemoState extends State<YoutubeAppDemo> {
Row(
children: [
ElevatedButton(
child: Text("Old Demo"),
child: Text("Inline Demo"),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(builder: (context) => OldDemo()),
Expand Down Expand Up @@ -219,57 +220,40 @@ class YoutubeViewer extends StatefulWidget {

class _YoutubeViewerState extends State<YoutubeViewer> {
late YoutubePlayerController _controller;
@override
void dispose() {
_controller.showTopMenu();
super.dispose();
}

@override
void initState() {
super.initState();
_controller = YoutubePlayerController(
initialVideoId: widget.videoID!,
initialVideoId: widget.videoID!, // livestream example
params: YoutubePlayerParams(
//startAt: Duration(minutes: 1, seconds: 5),
showControls: true,
showFullscreenButton: true,
desktopMode: false, // false for platform design
autoPlay: false,
desktopMode: false,
autoPlay: true,
enableCaption: true,
showVideoAnnotations: false,
enableJavaScript: true,
privacyEnhanced: true,
playsInline: false, // iOS only
useHybridComposition: true,
playsInline: false,
),
)..listen((value) {
if (value.isReady && !value.hasPlayed) {
_controller
..hidePauseOverlay()

// Uncomment below to stop Autoplay
// ..play()
..play()
..hideTopMenu();
}
if (value.hasPlayed) {
_controller..hideEndScreen();
}
});

// Uncomment below for device orientation
// _controller!.onEnterFullscreen = () {
// SystemChrome.setPreferredOrientations([
// DeviceOrientation.landscapeLeft,
// DeviceOrientation.landscapeRight,
// ]);
// log('Entered Fullscreen');
// };
// _controller!.onExitFullscreen = () {
// SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
// Future.delayed(const Duration(seconds: 1), () {
// _controller!.play();
// });
// Future.delayed(const Duration(seconds: 5), () {
// SystemChrome.setPreferredOrientations(DeviceOrientation.values);
// });
// log('Exited Fullscreen');
// };
_controller.onExitFullscreen = () {
_controller.close();
Navigator.of(context).pop();
};
}

@override
Expand Down Expand Up @@ -339,8 +323,7 @@ class _YoutubePlayerState extends State<YoutubePlayer> {
YoutubePlayerController.getThumbnail(
videoId: widget.videoID,
// todo: get thumbnail quality from list
quality: ThumbnailQuality.max,
webp: false),
quality: ThumbnailQuality.max),
fit: BoxFit.fill,
),
),
Expand Down

0 comments on commit 1a9552f

Please sign in to comment.