https://github.com/rxlabz/youtube_player_interop
Youtube iFrame wrapper for Dart web apps
https://github.com/rxlabz/youtube_player_interop
dart interop js video youtube-player
Last synced: 2 months ago
JSON representation
Youtube iFrame wrapper for Dart web apps
- Host: GitHub
- URL: https://github.com/rxlabz/youtube_player_interop
- Owner: rxlabz
- License: bsd-3-clause
- Created: 2017-10-10T13:56:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-12T09:50:32.000Z (almost 9 years ago)
- Last Synced: 2025-03-09T15:08:49.844Z (over 1 year ago)
- Topics: dart, interop, js, video, youtube-player
- Language: Dart
- Homepage: https://pub.dartlang.org/packages/youtube_player_interop
- Size: 47.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# youtube_player_interop
A [Youtube iFrame API](https://developers.google.com/youtube/player_parameters) wrapper for Dart web apps
For Angular Dart apps see the [Youtube iFrame Component](https://github.com/rxlabz/angular_youtube_iframe)
## Example
[Example](https://rxlabz.github.io/youtube_player_interop)
The simplest example
### HTML
```html
youtube iframe interop
```
### Dart
```dart
import 'package:youtube_player_interop/youtube_player_interop.dart' as yt;
void main(){
yt.initYoutubeFrame(onYouTubeIframeAPIReady);
}
void onYouTubeIframeAPIReady() {
final options = new yt.PlayerOptions(
height: '360',
width: '480',
videoId: 'JXcNqXbCa0E',
);
final player = new yt.Player('video', options);
}
```
## API
- [player](https://developers.google.com/youtube/iframe_api_reference)
- [playerVars](https://developers.google.com/youtube/player_parameters)
### Events
- onReady
- onStateChange
- onPlaybackQualityChange
- onPlaybackRateChange
- onError