youtube_iframe_interop

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

youtube iframe interop

Dart Youtube iframe interop #
JS interop for Youtube Iframe API
Exemple #
import 'package:youtube_iframe_interop/youtube_iframe_interop.dart' as youtube;
import 'package:js/js.dart';

Future<void> main() async {
await youtube.loadYoutubeIframeApi();

youtube.onYouTubeIframeAPIReady = allowInterop(iframeReady);
}

void iframeReady() {
final onReady = (youtube.PlayerEvent e) {
e.target.playVideo();
};

youtube.Player(
'player',
youtube.PlayerOptions(
height: 390,
width: 640,
videoId: 'M7lc1UVf-VE',
events: youtube.Events(
onReady: allowInterop(onReady),
),
),
);
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.