I need to play YouTube movies utilizing youtube_player_iframe(5.1.2).
Android could be performed on each emulators and units with none issues. Nevertheless, iOS doesn’t show the participant.
What are the causes and options? Thanks.
predominant.dart
import 'bundle:flutter/materials.dart';
import 'bundle:youtube_player_iframe/youtube_player_iframe.dart';
void predominant() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({tremendous.key});
@override
Widget construct(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colours.deepPurple),
useMaterial3: true,
),
dwelling: const MyHomePage(title: 'Flutter Demo Web page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({tremendous.key, required this.title});
closing String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget construct(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Textual content(widget.title),
),
physique: Heart(
youngster: Column(
mainAxisAlignment: MainAxisAlignment.heart,
kids: <Widget>[
YoutubePlayerScaffold(
controller: YoutubePlayerController.fromVideoId(
videoId: 'jNQXAC9IVRw',
autoPlay: true,
params: const YoutubePlayerParams(
showVideoAnnotations: false,
strictRelatedVideos: true,
color: 'red',
)
),
builder: (context, player) {
return player;
},
),
],
),
),
);
}
}
flutter physician -v
[✓] Flutter (Channel secure, 3.19.5, on macOS 14.5 23F79 darwin-arm64, locale ja-JP)
• Flutter model 3.19.5 on channel secure at /Customers/adverts/growth/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (4 months in the past), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart model 3.3.3
• DevTools model 2.31.1
[✓] Android toolchain – develop for Android units (Android SDK model 34.0.0)
• Android SDK at /Customers/adverts/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Functions/Android Studio.app/Contents/jbr/Contents/Residence/bin/java
• Java model OpenJDK Runtime Setting (construct 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[✓] Xcode – develop for iOS and macOS (Xcode 15.4)
• Xcode at /Functions/Xcode.app/Contents/Developer
• Construct 15F31d
• CocoaPods model 1.13.0
[✓] Chrome – develop for the net
• Chrome at /Functions/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (model 2023.2)
• Android Studio at /Functions/Android Studio.app/Contents
• Flutter plugin could be put in from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin could be put in from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java model OpenJDK Runtime Setting (construct 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (model 1.91.1)
• VS Code at /Functions/Visible Studio Code.app/Contents
• Flutter extension model 3.92.0
[✓] Linked gadget (5 obtainable)
• sdk gphone64 arm64 (cellular) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator)
• iPhone 15 (cellular) • 00000000-0000000000000000 • ios • iOS 17.4.1 21E236
• iPhone 15 Professional Max (cellular) • EC6C90A9-8693-4F2B-9708-D40B7AF0C483 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.5 23F79 darwin-arm64
• Chrome (internet) • chrome • web-javascript • Google Chrome 126.0.6478.127
[✓] Community assets
• All anticipated community assets can be found.
• No points discovered!