├── brightcove_ios ├── ios │ ├── Assets │ │ └── .gitkeep │ ├── .gitignore │ ├── brightcove_ios.podspec │ └── Classes │ │ ├── BrightcoveIosPlugin.h │ │ └── SwiftBrightcoveIosPlugin.swift ├── LICENSE ├── CHANGELOG.md ├── example │ ├── ios │ │ ├── Runner │ │ │ ├── Runner-Bridging-Header.h │ │ │ ├── Assets.xcassets │ │ │ │ ├── LaunchImage.imageset │ │ │ │ │ ├── LaunchImage.png │ │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ │ ├── README.md │ │ │ │ │ └── Contents.json │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ │ └── Contents.json │ │ │ ├── AppDelegate.swift │ │ │ ├── Base.lproj │ │ │ │ ├── Main.storyboard │ │ │ │ └── LaunchScreen.storyboard │ │ │ └── Info.plist │ │ ├── Flutter │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── AppFrameworkInfo.plist │ │ ├── Runner.xcodeproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── swiftpm │ │ │ │ └── Package.resolved │ │ ├── .gitignore │ │ ├── Podfile.lock │ │ └── Podfile │ ├── README.md │ ├── .gitignore │ ├── test │ │ └── widget_test.dart │ ├── analysis_options.yaml │ ├── lib │ │ └── main.dart │ ├── pubspec.yaml │ └── pubspec.lock ├── analysis_options.yaml ├── .gitignore ├── README.md ├── pubspec.yaml ├── .metadata ├── pigeons │ └── messages.dart └── lib │ └── brightcove_ios.dart ├── brightcove_android ├── LICENSE ├── CHANGELOG.md ├── android │ ├── settings.gradle │ ├── libs │ │ ├── android-sdk-7.1.1.aar │ │ └── android-appcompat-plugin-7.1.1.aar │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── kotlin │ │ │ └── com │ │ │ └── monstarlab │ │ │ └── brightcove_android │ │ │ ├── BrightcoveAndroidPlugin.kt │ │ │ └── BrightcoveVideoPlayerFlutter.kt │ ├── proguard-rules.pro │ └── build.gradle ├── lib │ ├── brightcove_android.dart │ └── src │ │ └── android_brightcove_impl.dart ├── example │ ├── android │ │ ├── gradle.properties │ │ ├── app │ │ │ ├── src │ │ │ │ ├── main │ │ │ │ │ ├── res │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── drawable │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ │ ├── values │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ └── values-night │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── kotlin │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── monstarlab │ │ │ │ │ │ │ └── brightcove_android │ │ │ │ │ │ │ └── brightcove_android_example │ │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── debug │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── profile │ │ │ │ │ └── AndroidManifest.xml │ │ │ └── build.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── .gitignore │ │ ├── settings.gradle │ │ └── build.gradle │ ├── README.md │ ├── .gitignore │ ├── test │ │ └── widget_test.dart │ ├── analysis_options.yaml │ ├── lib │ │ └── main.dart │ ├── pubspec.yaml │ └── pubspec.lock ├── analysis_options.yaml ├── README.md ├── .gitignore ├── test │ ├── brightcove_android_method_channel_test.dart │ └── brightcove_android_test.dart ├── .metadata ├── pubspec.yaml └── pigeons │ └── messages.dart ├── brightcove_flutter ├── LICENSE ├── CHANGELOG.md ├── example │ ├── ios │ │ ├── Runner │ │ │ ├── Runner-Bridging-Header.h │ │ │ ├── Assets.xcassets │ │ │ │ ├── LaunchImage.imageset │ │ │ │ │ ├── LaunchImage.png │ │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ │ ├── README.md │ │ │ │ │ └── Contents.json │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ │ └── Contents.json │ │ │ ├── AppDelegate.swift │ │ │ ├── Base.lproj │ │ │ │ ├── Main.storyboard │ │ │ │ └── LaunchScreen.storyboard │ │ │ └── Info.plist │ │ ├── Flutter │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── AppFrameworkInfo.plist │ │ ├── Runner.xcodeproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── .gitignore │ │ ├── Podfile.lock │ │ └── Podfile │ ├── android │ │ ├── gradle.properties │ │ ├── app │ │ │ ├── src │ │ │ │ ├── main │ │ │ │ │ ├── res │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── drawable │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ │ ├── values │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ └── values-night │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── kotlin │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── debug │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── profile │ │ │ │ │ └── AndroidManifest.xml │ │ │ └── build.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── .gitignore │ │ ├── settings.gradle │ │ └── build.gradle │ ├── README.md │ ├── .gitignore │ ├── analysis_options.yaml │ ├── .metadata │ ├── lib │ │ └── main.dart │ ├── pubspec.yaml │ └── pubspec.lock ├── test │ └── brightcove_flutter_test.dart ├── analysis_options.yaml ├── .metadata ├── .gitignore ├── pubspec.yaml └── README.md ├── .idea ├── .gitignore ├── vcs.xml └── git_toolbox_prj.xml ├── brightcove_flutter_platform_interface ├── LICENSE ├── CHANGELOG.md ├── .metadata ├── test │ └── brightcove_flutter_platform_interface_test.dart ├── pubspec.yaml ├── .gitignore ├── README.md └── lib │ └── brightcove_flutter_platform_interface.dart └── .DS_Store /brightcove_ios/ios/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /brightcove_ios/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /brightcove_android/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /brightcove_flutter/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /brightcove_flutter_platform_interface/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/.DS_Store -------------------------------------------------------------------------------- /brightcove_ios/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /brightcove_android/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /brightcove_android/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'brightcove_android' 2 | -------------------------------------------------------------------------------- /brightcove_flutter/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /brightcove_android/lib/brightcove_android.dart: -------------------------------------------------------------------------------- 1 | 2 | export 'src/android_brightcove_impl.dart'; -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /brightcove_flutter_platform_interface/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /brightcove_android/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /brightcove_android/android/libs/android-sdk-7.1.1.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_android/android/libs/android-sdk-7.1.1.aar -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /brightcove_android/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .cxx 10 | -------------------------------------------------------------------------------- /brightcove_flutter/test/brightcove_flutter_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | 3 | void main() { 4 | test('adds one to input values', () { 5 | }); 6 | } 7 | -------------------------------------------------------------------------------- /brightcove_android/android/libs/android-appcompat-plugin-7.1.1.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_android/android/libs/android-appcompat-plugin-7.1.1.aar -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /brightcove_ios/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /brightcove_android/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /brightcove_flutter/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ml-archive/brightcove_flutter/main/brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /brightcove_android/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /brightcove_android/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 6 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 6 | -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/kotlin/com/monstarlab/brightcove_android/brightcove_android_example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.monstarlab.brightcove_android.brightcove_android_example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_flutter/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /brightcove_android/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /brightcove_flutter_platform_interface/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "brightcove-player-sdk-ios", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/brightcove/brightcove-player-sdk-ios.git", 7 | "state" : { 8 | "branch" : "master", 9 | "revision" : "6c74f5c8c63c871b322fbde54463bda2cf462bd9" 10 | } 11 | } 12 | ], 13 | "version" : 2 14 | } 15 | -------------------------------------------------------------------------------- /brightcove_android/android/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -dontwarn com.google.** 2 | -dontwarn android.media.** 3 | -keep class android.media.** { *; } 4 | -keep class com.google.** { *; } 5 | -keep interface com.google.** { *; } 6 | -keep class com.google.ads.interactivemedia.** { *; } 7 | -keep interface com.google.ads.interactivemedia.** { *; } 8 | 9 | -keep class com.brightcove.player.analytics.Models.** { *; } 10 | -keep class com.brightcove.player.event.EventEmitterImpl.** { *; } 11 | 12 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brightcove_android/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /.idea/git_toolbox_prj.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /brightcove_android/README.md: -------------------------------------------------------------------------------- 1 | # brightcove_android 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter 8 | [plug-in package](https://flutter.dev/developing-packages/), 9 | a specialized package that includes platform-specific implementation code for 10 | Android and/or iOS. 11 | 12 | For help getting started with Flutter development, view the 13 | [online documentation](https://flutter.dev/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | 16 | -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /brightcove_flutter_platform_interface/test/brightcove_flutter_platform_interface_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:brightcove_flutter_platform_interface/brightcove_flutter_platform_interface.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | // Store the initial instance before any tests change it. 6 | final BrightcoveFlutterPlatform initialInstance = BrightcoveFlutterPlatform.instance; 7 | 8 | test('default implementation throws uninimpletemented', () async { 9 | await expectLater(() => initialInstance.init(), throwsUnimplementedError); 10 | }); 11 | } -------------------------------------------------------------------------------- /brightcove_ios/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/ephemeral/ 38 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /brightcove_flutter_platform_interface/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: brightcove_flutter_platform_interface 2 | description: Interface implementation for the Brightcove plugin 3 | version: 0.0.2 4 | repository: https://github.com/Genieology/brightcove_flutter/tree/main/brightcove_flutter_platform_interface 5 | homepage: https://github.com/Genieology/brightcove_flutter/tree/main/brightcove_flutter_platform_interface 6 | publish_to: none 7 | 8 | environment: 9 | sdk: '>=2.18.0 <3.0.0' 10 | flutter: ">=1.17.0" 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | flutter_test: 16 | sdk: flutter 17 | plugin_platform_interface: ^2.1.0 -------------------------------------------------------------------------------- /brightcove_flutter/example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /brightcove_ios/example/README.md: -------------------------------------------------------------------------------- 1 | # brightcove_ios_example 2 | 3 | Demonstrates how to use the brightcove_ios plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /brightcove_android/example/README.md: -------------------------------------------------------------------------------- 1 | # brightcove_android_example 2 | 3 | Demonstrates how to use the brightcove_android plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /brightcove_ios/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /brightcove_android/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /brightcove_flutter/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /brightcove_flutter_platform_interface/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /brightcove_android/test/brightcove_android_method_channel_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | /* MethodChannelBrightcoveAndroid platform = MethodChannelBrightcoveAndroid(); 6 | const MethodChannel channel = MethodChannel('brightcove_android'); 7 | 8 | TestWidgetsFlutterBinding.ensureInitialized(); 9 | 10 | setUp(() { 11 | channel.setMockMethodCallHandler((MethodCall methodCall) async { 12 | return '42'; 13 | }); 14 | }); 15 | 16 | tearDown(() { 17 | channel.setMockMethodCallHandler(null); 18 | }); 19 | 20 | test('getPlatformVersion', () async { 21 | expect(await platform.getPlatformVersion(), '42'); 22 | });*/ 23 | } 24 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /brightcove_ios/README.md: -------------------------------------------------------------------------------- 1 | # brightcove_ios 2 | 3 | A new Flutter plugin project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter 8 | [plug-in package](https://flutter.dev/developing-packages/), 9 | a specialized package that includes platform-specific implementation code for 10 | Android and/or iOS. 11 | 12 | For help getting started with Flutter development, view the 13 | [online documentation](https://flutter.dev/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | 16 | flutter pub run pigeon \ 17 | --input pigeons/messages.dart \ 18 | --dart_out lib/messages.dart \ 19 | --objc_header_out ios/Classes/BrightcoveIosPlugin.h \ 20 | --objc_source_out ios/Classes/BrightcoveIosPlugin.m \ 21 | --experimental_swift_out ios/Classes/BrightcoveIosPlugin.swift 22 | 23 | -------------------------------------------------------------------------------- /brightcove_flutter_platform_interface/README.md: -------------------------------------------------------------------------------- 1 | # brightcove_flutter_platform_interface 2 | TODO: Put a short description of the package here that helps potential users 3 | know whether this package might be useful for them. 4 | 5 | ## Features 6 | 7 | TODO: List what your package can do. Maybe include images, gifs, or videos. 8 | 9 | ## Getting started 10 | 11 | TODO: List prerequisites and provide or point to information on how to 12 | start using the package. 13 | 14 | ## Usage 15 | 16 | TODO: Include short and useful examples for package users. Add longer examples 17 | to `/example` folder. 18 | 19 | ```dart 20 | const like = 'sample'; 21 | ``` 22 | 23 | ## Additional information 24 | 25 | TODO: Tell users more about the package: where to find more information, how to 26 | contribute to the package, how to file issues, what response they can expect 27 | from the package authors, and more. 28 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Brightcove-Player-Core/XCFramework (6.11.0) 3 | - brightcove_ios (0.0.1): 4 | - Brightcove-Player-Core/XCFramework 5 | - Flutter 6 | - Flutter (1.0.0) 7 | 8 | DEPENDENCIES: 9 | - brightcove_ios (from `.symlinks/plugins/brightcove_ios/ios`) 10 | - Flutter (from `Flutter`) 11 | 12 | SPEC REPOS: 13 | https://github.com/brightcove/BrightcoveSpecs.git: 14 | - Brightcove-Player-Core 15 | 16 | EXTERNAL SOURCES: 17 | brightcove_ios: 18 | :path: ".symlinks/plugins/brightcove_ios/ios" 19 | Flutter: 20 | :path: Flutter 21 | 22 | SPEC CHECKSUMS: 23 | Brightcove-Player-Core: a72f016a40f5c17491017883e843a5a09c825fa9 24 | brightcove_ios: f9fa91182f10caeef7b0e2ce34f9591e2fae6984 25 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 26 | 27 | PODFILE CHECKSUM: 4b8d00c9baa99c4da9aa9f923e7eb14d3de817c1 28 | 29 | COCOAPODS: 1.11.3 30 | -------------------------------------------------------------------------------- /brightcove_ios/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: brightcove_ios 2 | description: A new Flutter plugin project. 3 | version: 0.1.0 4 | homepage: 5 | publish_to: none 6 | 7 | environment: 8 | sdk: '>=2.18.2 <3.0.0' 9 | flutter: ">=2.5.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | brightcove_flutter_platform_interface: 15 | # path: ../brightcove_flutter_platform_interface 16 | git: 17 | url: https://github.com/Genieology/brightcove_flutter.git 18 | path: brightcove_flutter_platform_interface 19 | 20 | dev_dependencies: 21 | flutter_test: 22 | sdk: flutter 23 | flutter_lints: ^2.0.0 24 | pigeon: ^4.0.2 25 | 26 | # The following section is specific to Flutter packages. 27 | flutter: 28 | plugin: 29 | implements: brightcove_flutter 30 | platforms: 31 | ios: 32 | dartPluginClass: BrightcoveIosPlatform 33 | pluginClass: SwiftBrightcoveIosPlugin -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Brightcove-Player-Core/XCFramework (6.11.0) 3 | - brightcove_ios (0.0.1): 4 | - Brightcove-Player-Core/XCFramework 5 | - Flutter 6 | - Flutter (1.0.0) 7 | 8 | DEPENDENCIES: 9 | - brightcove_ios (from `.symlinks/plugins/brightcove_ios/ios`) 10 | - Flutter (from `Flutter`) 11 | 12 | SPEC REPOS: 13 | https://github.com/brightcove/BrightcoveSpecs.git: 14 | - Brightcove-Player-Core 15 | 16 | EXTERNAL SOURCES: 17 | brightcove_ios: 18 | :path: ".symlinks/plugins/brightcove_ios/ios" 19 | Flutter: 20 | :path: Flutter 21 | 22 | SPEC CHECKSUMS: 23 | Brightcove-Player-Core: a72f016a40f5c17491017883e843a5a09c825fa9 24 | brightcove_ios: f9fa91182f10caeef7b0e2ce34f9591e2fae6984 25 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 26 | 27 | PODFILE CHECKSUM: e73aa6f8a65d0a732ec667d972e57d7023b3a4bd 28 | 29 | COCOAPODS: 1.11.3 30 | -------------------------------------------------------------------------------- /brightcove_ios/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /brightcove_android/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /brightcove_flutter/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /brightcove_android/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | maven { 7 | url 'https://repo.brightcove.com/releases' 8 | } 9 | } 10 | 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:7.2.2' 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | maven { 22 | url 'https://repo.brightcove.com/releases' 23 | } 24 | } 25 | } 26 | 27 | rootProject.buildDir = '../build' 28 | subprojects { 29 | project.buildDir = "${rootProject.buildDir}/${project.name}" 30 | } 31 | subprojects { 32 | project.evaluationDependsOn(':app') 33 | } 34 | 35 | task clean(type: Delete) { 36 | delete rootProject.buildDir 37 | } 38 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | maven { 7 | url 'https://repo.brightcove.com/releases' 8 | } 9 | } 10 | 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:7.1.2' 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | maven { 22 | url 'https://repo.brightcove.com/releases' 23 | } 24 | } 25 | } 26 | 27 | rootProject.buildDir = '../build' 28 | subprojects { 29 | project.buildDir = "${rootProject.buildDir}/${project.name}" 30 | } 31 | subprojects { 32 | project.evaluationDependsOn(':app') 33 | } 34 | 35 | task clean(type: Delete) { 36 | delete rootProject.buildDir 37 | } 38 | -------------------------------------------------------------------------------- /brightcove_ios/ios/brightcove_ios.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run `pod lib lint brightcove_ios.podspec` to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'brightcove_ios' 7 | s.version = '0.0.1' 8 | s.summary = 'A new Flutter plugin project.' 9 | s.description = 'Brightcove flutter genieology bridge.' 10 | s.homepage = 'http://blinx.com' 11 | s.license = 'MIT' 12 | s.author = { 'Your Company' => 'email@example.com' } 13 | s.source = { :path => '.' } 14 | s.source_files = 'Classes/**/*' 15 | s.dependency 'Flutter' 16 | s.dependency 'Brightcove-Player-Core/XCFramework' 17 | s.platform = :ios, '11.0' 18 | 19 | # Flutter.framework does not contain a i386 slice. 20 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } 21 | s.swift_version = '5.0' 22 | end 23 | -------------------------------------------------------------------------------- /brightcove_ios/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: eb6d86ee27deecba4a83536aa20f366a6044895c 8 | channel: stable 9 | 10 | project_type: plugin 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c 17 | base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c 18 | - platform: ios 19 | create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c 20 | base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c 21 | 22 | # User provided section 23 | 24 | # List of Local paths (relative to this file) that should be 25 | # ignored by the migrate tool. 26 | # 27 | # Files that are not part of the templates will be ignored by default. 28 | unmanaged_files: 29 | - 'lib/main.dart' 30 | - 'ios/Runner.xcodeproj/project.pbxproj' 31 | -------------------------------------------------------------------------------- /brightcove_android/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 8 | channel: stable 9 | 10 | project_type: plugin 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 17 | base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 18 | - platform: android 19 | create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 20 | base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 21 | 22 | # User provided section 23 | 24 | # List of Local paths (relative to this file) that should be 25 | # ignored by the migrate tool. 26 | # 27 | # Files that are not part of the templates will be ignored by default. 28 | unmanaged_files: 29 | - 'lib/main.dart' 30 | - 'ios/Runner.xcodeproj/project.pbxproj' 31 | -------------------------------------------------------------------------------- /brightcove_ios/example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:brightcove_ios_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Platform version', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | //await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that platform version is retrieved. 19 | expect( 20 | find.byWidgetPredicate( 21 | (Widget widget) => widget is Text && 22 | widget.data!.startsWith('Running on:'), 23 | ), 24 | findsOneWidget, 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /brightcove_android/example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:brightcove_android_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Platform version', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | //await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that platform version is retrieved. 19 | expect( 20 | find.byWidgetPredicate( 21 | (Widget widget) => widget is Text && 22 | widget.data!.startsWith('Running on:'), 23 | ), 24 | findsOneWidget, 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /brightcove_android/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: brightcove_android 2 | description: A new Flutter project. 3 | version: 0.1.0 4 | homepage: 5 | publish_to: none 6 | 7 | environment: 8 | sdk: '>=2.18.0 <3.0.0' 9 | flutter: ">=2.5.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | brightcove_flutter_platform_interface: 15 | # path: ../brightcove_flutter_platform_interface 16 | git: 17 | url: https://github.com/Genieology/brightcove_flutter.git 18 | path: brightcove_flutter_platform_interface 19 | 20 | dev_dependencies: 21 | flutter_test: 22 | sdk: flutter 23 | flutter_lints: ^2.0.0 24 | pigeon: ^4.0.2 25 | 26 | # For information on the generic Dart part of this file, see the 27 | # following page: https://dart.dev/tools/pub/pubspec 28 | 29 | # The following section is specific to Flutter packages. 30 | flutter: 31 | plugin: 32 | implements: brightcove_flutter 33 | platforms: 34 | android: 35 | dartPluginClass: BrightcoveAndroidPlatform 36 | package: com.monstarlab.brightcove_android 37 | pluginClass: BrightcoveAndroidPlugin -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /brightcove_flutter/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: brightcove_flutter 2 | description: A new Flutter project. 3 | version: 0.1.0 4 | homepage: 5 | publish_to: none 6 | environment: 7 | sdk: '>=2.18.0 <3.0.0' 8 | flutter: ">=1.17.0" 9 | 10 | flutter: 11 | plugin: 12 | platforms: 13 | android: 14 | default_package: brightcove_android 15 | ios: 16 | default_package: brightcove_ios 17 | 18 | dependencies: 19 | flutter: 20 | sdk: flutter 21 | brightcove_android: 22 | # path: ../brightcove_android 23 | git: 24 | url: https://github.com/Genieology/brightcove_flutter.git 25 | path: brightcove_android 26 | ref: v0.2.0 27 | brightcove_ios: 28 | # path: ../brightcove_ios 29 | git: 30 | url: https://github.com/Genieology/brightcove_flutter.git 31 | path: brightcove_ios 32 | ref: v0.2.0 33 | 34 | dependency_overrides: 35 | brightcove_flutter_platform_interface: 36 | # path: ../brightcove_flutter_platform_interface 37 | git: 38 | url: https://github.com/Genieology/brightcove_flutter.git 39 | path: brightcove_flutter_platform_interface 40 | 41 | dev_dependencies: 42 | flutter_test: 43 | sdk: flutter 44 | flutter_lints: ^2.0.0 45 | -------------------------------------------------------------------------------- /brightcove_android/test/brightcove_android_test.dart: -------------------------------------------------------------------------------- 1 | /*import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:brightcove_android/brightcove_android.dart'; 3 | import 'package:brightcove_android/android_brightcove_impl.dart'; 4 | import 'package:brightcove_android/src/brightcove_android_method_channel.dart'; 5 | import 'package:plugin_platform_interface/plugin_platform_interface.dart'; 6 | 7 | class MockBrightcoveAndroidPlatform 8 | with MockPlatformInterfaceMixin 9 | implements BrightcoveAndroidPlatform { 10 | 11 | @override 12 | Future getPlatformVersion() => Future.value('42'); 13 | } 14 | 15 | void main() { 16 | final BrightcoveAndroidPlatform initialPlatform = BrightcoveAndroidPlatform.instance; 17 | 18 | test('$MethodChannelBrightcoveAndroid is the default instance', () { 19 | expect(initialPlatform, isInstanceOf()); 20 | }); 21 | 22 | test('getPlatformVersion', () async { 23 | BrightcoveAndroid brightcoveAndroidPlugin = BrightcoveAndroid(); 24 | MockBrightcoveAndroidPlatform fakePlatform = MockBrightcoveAndroidPlatform(); 25 | BrightcoveAndroidPlatform.instance = fakePlatform; 26 | 27 | expect(await brightcoveAndroidPlugin.getPlatformVersion(), '42'); 28 | }); 29 | }*/ 30 | -------------------------------------------------------------------------------- /brightcove_flutter/README.md: -------------------------------------------------------------------------------- 1 | 13 | 14 | TODO: Put a short description of the package here that helps potential users 15 | know whether this package might be useful for them. 16 | 17 | ## Features 18 | 19 | TODO: List what your package can do. Maybe include images, gifs, or videos. 20 | 21 | ## Getting started 22 | 23 | TODO: List prerequisites and provide or point to information on how to 24 | start using the package. 25 | 26 | ## Usage 27 | 28 | TODO: Include short and useful examples for package users. Add longer examples 29 | to `/example` folder. 30 | 31 | ```dart 32 | const like = 'sample'; 33 | ``` 34 | 35 | ## Additional information 36 | 37 | TODO: Tell users more about the package: where to find more information, how to 38 | contribute to the package, how to file issues, what response they can expect 39 | from the package authors, and more. 40 | -------------------------------------------------------------------------------- /brightcove_ios/example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /brightcove_android/example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /brightcove_flutter/example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | source 'https://github.com/brightcove/BrightcoveSpecs.git' 7 | 8 | project 'Runner', { 9 | 'Debug' => :debug, 10 | 'Profile' => :release, 11 | 'Release' => :release, 12 | } 13 | 14 | def flutter_root 15 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 16 | unless File.exist?(generated_xcode_build_settings_path) 17 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 18 | end 19 | 20 | File.foreach(generated_xcode_build_settings_path) do |line| 21 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 22 | return matches[1].strip if matches 23 | end 24 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 25 | end 26 | 27 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 28 | 29 | flutter_ios_podfile_setup 30 | 31 | target 'Runner' do 32 | use_frameworks! 33 | use_modular_headers! 34 | 35 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 36 | end 37 | 38 | post_install do |installer| 39 | installer.pods_project.targets.each do |target| 40 | flutter_additional_ios_build_settings(target) 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | source 'https://github.com/brightcove/BrightcoveSpecs.git' 8 | 9 | project 'Runner', { 10 | 'Debug' => :debug, 11 | 'Profile' => :release, 12 | 'Release' => :release, 13 | } 14 | 15 | def flutter_root 16 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 17 | unless File.exist?(generated_xcode_build_settings_path) 18 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 19 | end 20 | 21 | File.foreach(generated_xcode_build_settings_path) do |line| 22 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 23 | return matches[1].strip if matches 24 | end 25 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 26 | end 27 | 28 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 29 | 30 | flutter_ios_podfile_setup 31 | 32 | target 'Runner' do 33 | use_frameworks! 34 | use_modular_headers! 35 | 36 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_ios_build_settings(target) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /brightcove_android/android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.monstarlab.brightcove_android' 2 | version '1.0-SNAPSHOT' 3 | 4 | buildscript { 5 | ext.kotlin_version = '1.6.10' 6 | repositories { 7 | google() 8 | mavenCentral() 9 | maven { 10 | url 'https://repo.brightcove.com/releases' 11 | } 12 | } 13 | 14 | dependencies { 15 | classpath 'com.android.tools.build:gradle:7.2.2' 16 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 17 | } 18 | } 19 | 20 | allprojects { 21 | repositories { 22 | google() 23 | mavenCentral() 24 | maven { 25 | url 'https://repo.brightcove.com/releases' 26 | } 27 | } 28 | } 29 | 30 | apply plugin: 'com.android.library' 31 | apply plugin: 'kotlin-android' 32 | 33 | android { 34 | compileSdkVersion 31 35 | 36 | compileOptions { 37 | sourceCompatibility JavaVersion.VERSION_11 38 | targetCompatibility JavaVersion.VERSION_11 39 | } 40 | 41 | kotlinOptions { 42 | jvmTarget = '11' 43 | } 44 | 45 | sourceSets { 46 | main.java.srcDirs += 'src/main/kotlin' 47 | main.java.srcDirs += 'libs' 48 | } 49 | 50 | defaultConfig { 51 | minSdkVersion 19 52 | multiDexEnabled true 53 | } 54 | 55 | lintOptions { 56 | disable 'InvalidPackage' 57 | disable 'GradleDependency' 58 | } 59 | 60 | dependencies { 61 | implementation 'androidx.multidex:multidex:2.0.1' 62 | implementation 'com.google.code.gson:gson:2.8.9' 63 | //implementation "com.brightcove.player:android-sdk:7.1.1" 64 | implementation 'com.brightcove.player:exoplayer2:7.1.1' 65 | 66 | //implementation fileTree(dir:'libs', includes: ['*.jar', '*.aar']) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 9 | 17 | 21 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /brightcove_flutter/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 17 | base_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 18 | - platform: android 19 | create_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 20 | base_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 21 | - platform: ios 22 | create_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 23 | base_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 24 | - platform: linux 25 | create_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 26 | base_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 27 | - platform: macos 28 | create_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 29 | base_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 30 | - platform: web 31 | create_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 32 | base_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 33 | - platform: windows 34 | create_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 35 | base_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /brightcove_android/example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | example 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Brightcove Ios 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | brightcove_ios_example 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /brightcove_ios/pigeons/messages.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:pigeon/pigeon.dart'; 6 | 7 | @ConfigurePigeon(PigeonOptions( 8 | dartOut: 'lib/src/messages.g.dart', 9 | //dartTestOut: 'test/test_api.dart', 10 | //copyrightHeader: 'pigeons/copyright.txt', 11 | )) 12 | class TextureMessage { 13 | TextureMessage(this.playerId); 14 | 15 | String playerId; 16 | } 17 | 18 | class LoopingMessage { 19 | LoopingMessage(this.playerId, this.isLooping); 20 | 21 | String playerId; 22 | bool isLooping; 23 | } 24 | 25 | class VolumeMessage { 26 | VolumeMessage(this.playerId, this.volume); 27 | 28 | String playerId; 29 | double volume; 30 | } 31 | 32 | class PlaybackSpeedMessage { 33 | PlaybackSpeedMessage(this.playerId, this.speed); 34 | 35 | String playerId; 36 | double speed; 37 | } 38 | 39 | class PositionMessage { 40 | PositionMessage(this.playerId, this.position); 41 | 42 | String playerId; 43 | int position; 44 | } 45 | 46 | class PictureInPictureMessage { 47 | PictureInPictureMessage(this.enabled); 48 | 49 | bool enabled; 50 | } 51 | 52 | enum DataSourceType {videoById, playlistById} 53 | 54 | class PlayMessage { 55 | PlayMessage(this.dataSource, this.dataSourceType, this.account, this.catalogBaseUrl, this.policy); 56 | 57 | String account; 58 | String policy; 59 | String dataSource; 60 | String? catalogBaseUrl; 61 | DataSourceType dataSourceType; 62 | } 63 | 64 | @HostApi(dartHostTestHandler: 'TestHostBrightcoveVideoPlayerApi') 65 | abstract class BrightcoveVideoPlayerApi { 66 | void initialize(); 67 | 68 | TextureMessage create(PlayMessage msg); 69 | 70 | void dispose(TextureMessage msg); 71 | 72 | void setVolume(VolumeMessage msg); 73 | 74 | void enterPictureInPictureMode(TextureMessage msg); 75 | 76 | void play(TextureMessage msg); 77 | 78 | void pause(TextureMessage msg); 79 | 80 | void seekTo(PositionMessage msg); 81 | } 82 | -------------------------------------------------------------------------------- /brightcove_android/pigeons/messages.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:pigeon/pigeon.dart'; 6 | 7 | @ConfigurePigeon(PigeonOptions( 8 | dartOut: 'lib/src/messages.g.dart', 9 | //dartTestOut: 'test/test_api.dart', 10 | javaOut: 11 | 'android/src/main/kotlin/com/monstarlab/brightcove_android//Messages.java', 12 | javaOptions: JavaOptions( 13 | package: 'com.monstarlab.brightcove_android', 14 | ), 15 | //copyrightHeader: 'pigeons/copyright.txt', 16 | )) 17 | class TextureMessage { 18 | TextureMessage(this.playerId); 19 | 20 | String playerId; 21 | } 22 | 23 | class LoopingMessage { 24 | LoopingMessage(this.playerId, this.isLooping); 25 | 26 | String playerId; 27 | bool isLooping; 28 | } 29 | 30 | class VolumeMessage { 31 | VolumeMessage(this.playerId, this.volume); 32 | 33 | String playerId; 34 | double volume; 35 | } 36 | 37 | class PlaybackSpeedMessage { 38 | PlaybackSpeedMessage(this.playerId, this.speed); 39 | 40 | String playerId; 41 | double speed; 42 | } 43 | 44 | class PositionMessage { 45 | PositionMessage(this.playerId, this.position); 46 | 47 | String playerId; 48 | int position; 49 | } 50 | 51 | class PictureInPictureMessage { 52 | PictureInPictureMessage(this.enabled); 53 | 54 | bool enabled; 55 | } 56 | 57 | enum DataSourceType {videoById, playlistById} 58 | 59 | class PlayMessage { 60 | PlayMessage(this.dataSource, this.dataSourceType, this.account, this.catalogBaseUrl, this.policy); 61 | 62 | String account; 63 | String policy; 64 | String dataSource; 65 | String? catalogBaseUrl; 66 | DataSourceType dataSourceType; 67 | } 68 | 69 | @HostApi(dartHostTestHandler: 'TestHostBrightcoveVideoPlayerApi') 70 | abstract class BrightcoveVideoPlayerApi { 71 | void initialize(); 72 | 73 | TextureMessage create(PlayMessage msg); 74 | 75 | void dispose(TextureMessage msg); 76 | 77 | void setVolume(VolumeMessage msg); 78 | 79 | void enterPictureInPictureMode(TextureMessage msg); 80 | 81 | void play(TextureMessage msg); 82 | 83 | void pause(TextureMessage msg); 84 | 85 | void seekTo(PositionMessage msg); 86 | } 87 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /brightcove_flutter/example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_11 34 | targetCompatibility JavaVersion.VERSION_11 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '11' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.example" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion 19 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | multiDexEnabled true 55 | 56 | } 57 | 58 | buildTypes { 59 | release { 60 | // TODO: Add your own signing config for the release build. 61 | // Signing with the debug keys for now, so `flutter run --release` works. 62 | signingConfig signingConfigs.debug 63 | } 64 | } 65 | } 66 | 67 | flutter { 68 | source '../..' 69 | } 70 | 71 | dependencies { 72 | implementation 'androidx.multidex:multidex:2.0.1' 73 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 74 | } 75 | -------------------------------------------------------------------------------- /brightcove_android/example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_11 34 | targetCompatibility JavaVersion.VERSION_11 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '11' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.monstarlab.brightcove_android.brightcove_android_example" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion 19 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | multiDexEnabled true 55 | } 56 | 57 | buildTypes { 58 | release { 59 | // TODO: Add your own signing config for the release build. 60 | // Signing with the debug keys for now, so `flutter run --release` works. 61 | signingConfig signingConfigs.debug 62 | } 63 | } 64 | } 65 | 66 | flutter { 67 | source '../..' 68 | } 69 | 70 | dependencies { 71 | implementation 'androidx.multidex:multidex:2.0.1' 72 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 73 | } 74 | -------------------------------------------------------------------------------- /brightcove_ios/example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:brightcove_flutter/brightcove_flutter.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | void main() { 5 | runApp(MaterialApp( 6 | title: 'Flutter Demo', 7 | theme: ThemeData( 8 | primarySwatch: Colors.blue, 9 | ), 10 | home: const MyHomePage(title: 'Flutter Demo Home Page'), 11 | )); 12 | } 13 | 14 | class MyHomePage extends StatefulWidget { 15 | const MyHomePage({super.key, required this.title}); 16 | 17 | final String title; 18 | 19 | @override 20 | State createState() => _MyHomePageState(); 21 | } 22 | 23 | class _MyHomePageState extends State { 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | appBar: AppBar( 28 | title: Text(widget.title), 29 | ), 30 | body: ListView( 31 | children: [ 32 | PlayerWidget( 33 | key: UniqueKey(), 34 | ), 35 | PlayerWidget( 36 | key: UniqueKey(), 37 | ), 38 | ], 39 | ), // This trailing comma makes auto-formatting nicer for build methods. 40 | ); 41 | } 42 | } 43 | 44 | class PlayerWidget extends StatefulWidget { 45 | const PlayerWidget({Key? key, this.videoId}) : super(key: key); 46 | 47 | final String? videoId; 48 | 49 | @override 50 | State createState() => _PlayerWidgetState(); 51 | } 52 | 53 | class _PlayerWidgetState extends State { 54 | late final BrightcoveVideoPlayerController _controller = 55 | BrightcoveVideoPlayerController.playVideoById( 56 | widget.videoId ?? '6311532572112', 57 | options: BrightcoveOptions( 58 | account: "6314458267001", 59 | policy: 60 | "BCpkADawqM3B3oh6cCokobfYe88EwiIADRJ0_8IuKI4GbwP4LN-MzKbgX40HDjJvBEon1ZRmX6krlKOjum8CfTjHuYMUebWTcPKlAZgxlp8H7JJJRNaqGJ9SAy-tTpV_qXAKrYHONp8PQ0m5", 61 | ), 62 | ); 63 | 64 | @override 65 | void dispose() { 66 | _controller.dispose(); 67 | super.dispose(); 68 | } 69 | 70 | @override 71 | Widget build(BuildContext context) { 72 | return SizedBox( 73 | height: 250, 74 | child: Column( 75 | children: [ 76 | Expanded( 77 | child: BrightcoveVideoPlayer(_controller), 78 | ), 79 | Row( 80 | mainAxisAlignment: MainAxisAlignment.spaceAround, 81 | children: [ 82 | IconButton( 83 | onPressed: _controller.play, 84 | icon: const Icon(Icons.play_arrow_outlined)), 85 | Padding( 86 | padding: const EdgeInsets.all(8.0), 87 | child: Container( 88 | width: 1, 89 | height: 24, 90 | color: Colors.black, 91 | ), 92 | ), 93 | IconButton( 94 | onPressed: _controller.pause, icon: const Icon(Icons.pause)), 95 | ], 96 | ) 97 | ], 98 | ), 99 | ); 100 | } 101 | } -------------------------------------------------------------------------------- /brightcove_android/example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:brightcove_flutter/brightcove_flutter.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | void main() { 5 | runApp(MaterialApp( 6 | title: 'Flutter Demo', 7 | theme: ThemeData( 8 | primarySwatch: Colors.blue, 9 | ), 10 | home: const MyHomePage(title: 'Flutter Demo Home Page'), 11 | )); 12 | } 13 | 14 | class MyHomePage extends StatefulWidget { 15 | const MyHomePage({super.key, required this.title}); 16 | 17 | final String title; 18 | 19 | @override 20 | State createState() => _MyHomePageState(); 21 | } 22 | 23 | class _MyHomePageState extends State { 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | appBar: AppBar( 28 | title: Text(widget.title), 29 | ), 30 | body: ListView( 31 | children: [ 32 | PlayerWidget( 33 | key: UniqueKey(), 34 | ), 35 | PlayerWidget( 36 | key: UniqueKey(), 37 | ), 38 | ], 39 | ), // This trailing comma makes auto-formatting nicer for build methods. 40 | ); 41 | } 42 | } 43 | 44 | class PlayerWidget extends StatefulWidget { 45 | const PlayerWidget({Key? key, this.videoId}) : super(key: key); 46 | 47 | final String? videoId; 48 | 49 | @override 50 | State createState() => _PlayerWidgetState(); 51 | } 52 | 53 | class _PlayerWidgetState extends State { 54 | late final BrightcoveVideoPlayerController _controller = 55 | BrightcoveVideoPlayerController.playVideoById( 56 | widget.videoId ?? '6311532572112', 57 | options: BrightcoveOptions( 58 | account: "6314458267001", 59 | policy: 60 | "BCpkADawqM3B3oh6cCokobfYe88EwiIADRJ0_8IuKI4GbwP4LN-MzKbgX40HDjJvBEon1ZRmX6krlKOjum8CfTjHuYMUebWTcPKlAZgxlp8H7JJJRNaqGJ9SAy-tTpV_qXAKrYHONp8PQ0m5", 61 | ), 62 | ); 63 | 64 | @override 65 | void dispose() { 66 | _controller.dispose(); 67 | super.dispose(); 68 | } 69 | 70 | @override 71 | Widget build(BuildContext context) { 72 | return SizedBox( 73 | height: 250, 74 | child: Column( 75 | children: [ 76 | Expanded( 77 | child: BrightcoveVideoPlayer(_controller), 78 | ), 79 | Row( 80 | mainAxisAlignment: MainAxisAlignment.spaceAround, 81 | children: [ 82 | IconButton( 83 | onPressed: _controller.play, 84 | icon: const Icon(Icons.play_arrow_outlined)), 85 | Padding( 86 | padding: const EdgeInsets.all(8.0), 87 | child: Container( 88 | width: 1, 89 | height: 24, 90 | color: Colors.black, 91 | ), 92 | ), 93 | IconButton( 94 | onPressed: _controller.pause, icon: const Icon(Icons.pause)), 95 | ], 96 | ) 97 | ], 98 | ), 99 | ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /brightcove_flutter/example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:brightcove_flutter/brightcove_flutter.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | void main() { 5 | runApp(MaterialApp( 6 | title: 'Flutter Demo', 7 | theme: ThemeData( 8 | primarySwatch: Colors.blue, 9 | ), 10 | home: const MyHomePage(title: 'Flutter Demo Home Page'), 11 | )); 12 | } 13 | 14 | class MyHomePage extends StatefulWidget { 15 | const MyHomePage({super.key, required this.title}); 16 | 17 | final String title; 18 | 19 | @override 20 | State createState() => _MyHomePageState(); 21 | } 22 | 23 | class _MyHomePageState extends State { 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | appBar: AppBar( 28 | title: Text(widget.title), 29 | ), 30 | body: ListView( 31 | children: [ 32 | PlayerWidget( 33 | key: UniqueKey(), 34 | ), 35 | // PlayerWidget( 36 | // key: UniqueKey(), 37 | // ), 38 | ], 39 | ), // This trailing comma makes auto-formatting nicer for build methods. 40 | ); 41 | } 42 | } 43 | 44 | class PlayerWidget extends StatefulWidget { 45 | const PlayerWidget({Key? key, this.videoId}) : super(key: key); 46 | 47 | final String? videoId; 48 | 49 | @override 50 | State createState() => _PlayerWidgetState(); 51 | } 52 | 53 | class _PlayerWidgetState extends State { 54 | late final BrightcoveVideoPlayerController _controller = 55 | BrightcoveVideoPlayerController.playVideoById( 56 | widget.videoId ?? '6311532572112', 57 | options: BrightcoveOptions( 58 | account: "6314458267001", 59 | policy: 60 | "BCpkADawqM3B3oh6cCokobfYe88EwiIADRJ0_8IuKI4GbwP4LN-MzKbgX40HDjJvBEon1ZRmX6krlKOjum8CfTjHuYMUebWTcPKlAZgxlp8H7JJJRNaqGJ9SAy-tTpV_qXAKrYHONp8PQ0m5", 61 | ), 62 | ); 63 | 64 | @override 65 | void dispose() { 66 | _controller.dispose(); 67 | super.dispose(); 68 | } 69 | 70 | @override 71 | Widget build(BuildContext context) { 72 | return SizedBox( 73 | height: 250, 74 | child: Column( 75 | children: [ 76 | Expanded( 77 | child: BrightcoveVideoPlayer(_controller), 78 | ), 79 | Row( 80 | mainAxisAlignment: MainAxisAlignment.spaceAround, 81 | children: [ 82 | IconButton( 83 | onPressed: _controller.play, 84 | icon: const Icon(Icons.play_arrow_outlined)), 85 | Padding( 86 | padding: const EdgeInsets.all(8.0), 87 | child: Container( 88 | width: 1, 89 | height: 24, 90 | color: Colors.black, 91 | ), 92 | ), 93 | IconButton( 94 | onPressed: _controller.pause, icon: const Icon(Icons.pause)), 95 | ], 96 | ) 97 | ], 98 | ), 99 | ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /brightcove_ios/ios/Classes/BrightcoveIosPlugin.h: -------------------------------------------------------------------------------- 1 | // Autogenerated from Pigeon (v4.2.5), do not edit directly. 2 | // See also: https://pub.dev/packages/pigeon 3 | #import 4 | @protocol FlutterBinaryMessenger; 5 | @protocol FlutterMessageCodec; 6 | @class FlutterError; 7 | @class FlutterStandardTypedData; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | typedef NS_ENUM(NSUInteger, DataSourceType) { 12 | DataSourceTypeVideoById = 0, 13 | DataSourceTypePlaylistById = 1, 14 | }; 15 | 16 | @class TextureMessage; 17 | @class VolumeMessage; 18 | @class PositionMessage; 19 | @class PlayMessage; 20 | 21 | @interface TextureMessage : NSObject 22 | /// `init` unavailable to enforce nonnull fields, see the `make` class method. 23 | - (instancetype)init NS_UNAVAILABLE; 24 | + (instancetype)makeWithPlayerId:(NSString *)playerId; 25 | @property(nonatomic, copy) NSString * playerId; 26 | @end 27 | 28 | @interface VolumeMessage : NSObject 29 | /// `init` unavailable to enforce nonnull fields, see the `make` class method. 30 | - (instancetype)init NS_UNAVAILABLE; 31 | + (instancetype)makeWithPlayerId:(NSString *)playerId 32 | volume:(NSNumber *)volume; 33 | @property(nonatomic, copy) NSString * playerId; 34 | @property(nonatomic, strong) NSNumber * volume; 35 | @end 36 | 37 | @interface PositionMessage : NSObject 38 | /// `init` unavailable to enforce nonnull fields, see the `make` class method. 39 | - (instancetype)init NS_UNAVAILABLE; 40 | + (instancetype)makeWithPlayerId:(NSString *)playerId 41 | position:(NSNumber *)position; 42 | @property(nonatomic, copy) NSString * playerId; 43 | @property(nonatomic, strong) NSNumber * position; 44 | @end 45 | 46 | @interface PlayMessage : NSObject 47 | /// `init` unavailable to enforce nonnull fields, see the `make` class method. 48 | - (instancetype)init NS_UNAVAILABLE; 49 | + (instancetype)makeWithAccount:(NSString *)account 50 | policy:(NSString *)policy 51 | dataSource:(NSString *)dataSource 52 | catalogBaseUrl:(nullable NSString *)catalogBaseUrl 53 | dataSourceType:(DataSourceType)dataSourceType; 54 | @property(nonatomic, copy) NSString * account; 55 | @property(nonatomic, copy) NSString * policy; 56 | @property(nonatomic, copy) NSString * dataSource; 57 | @property(nonatomic, copy, nullable) NSString * catalogBaseUrl; 58 | @property(nonatomic, assign) DataSourceType dataSourceType; 59 | @end 60 | 61 | /// The codec used by BrightcoveVideoPlayerApi. 62 | NSObject *BrightcoveVideoPlayerApiGetCodec(void); 63 | 64 | @protocol BrightcoveVideoPlayerApi 65 | - (void)initializeWithError:(FlutterError *_Nullable *_Nonnull)error; 66 | /// @return `nil` only when `error != nil`. 67 | - (nullable TextureMessage *)createMsg:(PlayMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error; 68 | - (void)disposeMsg:(TextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error; 69 | - (void)setVolumeMsg:(VolumeMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error; 70 | - (void)enterPictureInPictureModeMsg:(TextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error; 71 | - (void)playMsg:(TextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error; 72 | - (void)pauseMsg:(TextureMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error; 73 | - (void)seekToMsg:(PositionMessage *)msg error:(FlutterError *_Nullable *_Nonnull)error; 74 | @end 75 | 76 | extern void BrightcoveVideoPlayerApiSetup(id binaryMessenger, NSObject *_Nullable api); 77 | 78 | NS_ASSUME_NONNULL_END 79 | -------------------------------------------------------------------------------- /brightcove_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /brightcove_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /brightcove_ios/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: brightcove_ios_example 2 | description: Demonstrates how to use the brightcove_ios plugin. 3 | version: 0.0.1 4 | 5 | # The following line prevents the package from being accidentally published to 6 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 7 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 8 | 9 | environment: 10 | sdk: '>=2.18.2 <3.0.0' 11 | 12 | # Dependencies specify other packages that your package needs in order to work. 13 | # To automatically upgrade your package dependencies to the latest versions 14 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 15 | # dependencies can be manually updated by changing the version numbers below to 16 | # the latest version available on pub.dev. To see which dependencies have newer 17 | # versions available, run `flutter pub outdated`. 18 | dependencies: 19 | flutter: 20 | sdk: flutter 21 | 22 | brightcove_flutter: 23 | path: ../../brightcove_flutter 24 | brightcove_ios: 25 | # When depending on this package from a real application you should use: 26 | # brightcove_ios: ^x.y.z 27 | # See https://dart.dev/tools/pub/dependencies#version-constraints 28 | # The example app is bundled with the plugin so we use a path dependency on 29 | # the parent directory to use the current plugin's version. 30 | path: ../ 31 | 32 | # The following adds the Cupertino Icons font to your application. 33 | # Use with the CupertinoIcons class for iOS style icons. 34 | cupertino_icons: ^1.0.2 35 | 36 | dev_dependencies: 37 | flutter_test: 38 | sdk: flutter 39 | 40 | # The "flutter_lints" package below contains a set of recommended lints to 41 | # encourage good coding practices. The lint set provided by the package is 42 | # activated in the `analysis_options.yaml` file located at the root of your 43 | # package. See that file for information about deactivating specific lint 44 | # rules and activating additional ones. 45 | flutter_lints: ^2.0.0 46 | 47 | # For information on the generic Dart part of this file, see the 48 | # following page: https://dart.dev/tools/pub/pubspec 49 | 50 | # The following section is specific to Flutter packages. 51 | flutter: 52 | 53 | # The following line ensures that the Material Icons font is 54 | # included with your application, so that you can use the icons in 55 | # the material Icons class. 56 | uses-material-design: true 57 | 58 | # To add assets to your application, add an assets section, like this: 59 | # assets: 60 | # - images/a_dot_burr.jpeg 61 | # - images/a_dot_ham.jpeg 62 | 63 | # An image asset can refer to one or more resolution-specific "variants", see 64 | # https://flutter.dev/assets-and-images/#resolution-aware 65 | 66 | # For details regarding adding assets from package dependencies, see 67 | # https://flutter.dev/assets-and-images/#from-packages 68 | 69 | # To add custom fonts to your application, add a fonts section here, 70 | # in this "flutter" section. Each entry in this list should have a 71 | # "family" key with the font family name, and a "fonts" key with a 72 | # list giving the asset and other descriptors for the font. For 73 | # example: 74 | # fonts: 75 | # - family: Schyler 76 | # fonts: 77 | # - asset: fonts/Schyler-Regular.ttf 78 | # - asset: fonts/Schyler-Italic.ttf 79 | # style: italic 80 | # - family: Trajan Pro 81 | # fonts: 82 | # - asset: fonts/TrajanPro.ttf 83 | # - asset: fonts/TrajanPro_Bold.ttf 84 | # weight: 700 85 | # 86 | # For details regarding fonts from package dependencies, 87 | # see https://flutter.dev/custom-fonts/#from-packages 88 | -------------------------------------------------------------------------------- /brightcove_android/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: brightcove_android_example 2 | description: Demonstrates how to use the brightcove_android plugin. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | environment: 9 | sdk: '>=2.18.0 <3.0.0' 10 | 11 | # Dependencies specify other packages that your package needs in order to work. 12 | # To automatically upgrade your package dependencies to the latest versions 13 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 14 | # dependencies can be manually updated by changing the version numbers below to 15 | # the latest version available on pub.dev. To see which dependencies have newer 16 | # versions available, run `flutter pub outdated`. 17 | dependencies: 18 | flutter: 19 | sdk: flutter 20 | 21 | brightcove_flutter: 22 | path: ../../brightcove_flutter 23 | brightcove_android: 24 | 25 | # When depending on this package from a real application you should use: 26 | # brightcove_android: ^x.y.z 27 | # See https://dart.dev/tools/pub/dependencies#version-constraints 28 | # The example app is bundled with the plugin so we use a path dependency on 29 | # the parent directory to use the current plugin's version. 30 | path: ../ 31 | 32 | # The following adds the Cupertino Icons font to your application. 33 | # Use with the CupertinoIcons class for iOS style icons. 34 | cupertino_icons: ^1.0.2 35 | 36 | dev_dependencies: 37 | flutter_test: 38 | sdk: flutter 39 | 40 | # The "flutter_lints" package below contains a set of recommended lints to 41 | # encourage good coding practices. The lint set provided by the package is 42 | # activated in the `analysis_options.yaml` file located at the root of your 43 | # package. See that file for information about deactivating specific lint 44 | # rules and activating additional ones. 45 | flutter_lints: ^2.0.0 46 | 47 | # For information on the generic Dart part of this file, see the 48 | # following page: https://dart.dev/tools/pub/pubspec 49 | 50 | # The following section is specific to Flutter packages. 51 | flutter: 52 | 53 | # The following line ensures that the Material Icons font is 54 | # included with your application, so that you can use the icons in 55 | # the material Icons class. 56 | uses-material-design: true 57 | 58 | # To add assets to your application, add an assets section, like this: 59 | # assets: 60 | # - images/a_dot_burr.jpeg 61 | # - images/a_dot_ham.jpeg 62 | 63 | # An image asset can refer to one or more resolution-specific "variants", see 64 | # https://flutter.dev/assets-and-images/#resolution-aware 65 | 66 | # For details regarding adding assets from package dependencies, see 67 | # https://flutter.dev/assets-and-images/#from-packages 68 | 69 | # To add custom fonts to your application, add a fonts section here, 70 | # in this "flutter" section. Each entry in this list should have a 71 | # "family" key with the font family name, and a "fonts" key with a 72 | # list giving the asset and other descriptors for the font. For 73 | # example: 74 | # fonts: 75 | # - family: Schyler 76 | # fonts: 77 | # - asset: fonts/Schyler-Regular.ttf 78 | # - asset: fonts/Schyler-Italic.ttf 79 | # style: italic 80 | # - family: Trajan Pro 81 | # fonts: 82 | # - asset: fonts/TrajanPro.ttf 83 | # - asset: fonts/TrajanPro_Bold.ttf 84 | # weight: 700 85 | # 86 | # For details regarding fonts from package dependencies, 87 | # see https://flutter.dev/custom-fonts/#from-packages 88 | -------------------------------------------------------------------------------- /brightcove_flutter/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | # In Windows, build-name is used as the major, minor, and patch parts 19 | # of the product and file versions while build-number is used as the build suffix. 20 | version: 1.0.0+1 21 | 22 | environment: 23 | sdk: '>=2.18.0 <3.0.0' 24 | 25 | # Dependencies specify other packages that your package needs in order to work. 26 | # To automatically upgrade your package dependencies to the latest versions 27 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 28 | # dependencies can be manually updated by changing the version numbers below to 29 | # the latest version available on pub.dev. To see which dependencies have newer 30 | # versions available, run `flutter pub outdated`. 31 | dependencies: 32 | flutter: 33 | sdk: flutter 34 | brightcove_flutter: 35 | path: ../ 36 | 37 | 38 | # The following adds the Cupertino Icons font to your application. 39 | # Use with the CupertinoIcons class for iOS style icons. 40 | cupertino_icons: ^1.0.2 41 | 42 | dev_dependencies: 43 | flutter_test: 44 | sdk: flutter 45 | 46 | # The "flutter_lints" package below contains a set of recommended lints to 47 | # encourage good coding practices. The lint set provided by the package is 48 | # activated in the `analysis_options.yaml` file located at the root of your 49 | # package. See that file for information about deactivating specific lint 50 | # rules and activating additional ones. 51 | flutter_lints: ^2.0.0 52 | 53 | # For information on the generic Dart part of this file, see the 54 | # following page: https://dart.dev/tools/pub/pubspec 55 | 56 | # The following section is specific to Flutter packages. 57 | flutter: 58 | 59 | # The following line ensures that the Material Icons font is 60 | # included with your application, so that you can use the icons in 61 | # the material Icons class. 62 | uses-material-design: true 63 | 64 | # To add assets to your application, add an assets section, like this: 65 | # assets: 66 | # - images/a_dot_burr.jpeg 67 | # - images/a_dot_ham.jpeg 68 | 69 | # An image asset can refer to one or more resolution-specific "variants", see 70 | # https://flutter.dev/assets-and-images/#resolution-aware 71 | 72 | # For details regarding adding assets from package dependencies, see 73 | # https://flutter.dev/assets-and-images/#from-packages 74 | 75 | # To add custom fonts to your application, add a fonts section here, 76 | # in this "flutter" section. Each entry in this list should have a 77 | # "family" key with the font family name, and a "fonts" key with a 78 | # list giving the asset and other descriptors for the font. For 79 | # example: 80 | # fonts: 81 | # - family: Schyler 82 | # fonts: 83 | # - asset: fonts/Schyler-Regular.ttf 84 | # - asset: fonts/Schyler-Italic.ttf 85 | # style: italic 86 | # - family: Trajan Pro 87 | # fonts: 88 | # - asset: fonts/TrajanPro.ttf 89 | # - asset: fonts/TrajanPro_Bold.ttf 90 | # weight: 700 91 | # 92 | # For details regarding fonts from package dependencies, 93 | # see https://flutter.dev/custom-fonts/#from-packages 94 | -------------------------------------------------------------------------------- /brightcove_android/example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.9.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.2.1" 25 | clock: 26 | dependency: transitive 27 | description: 28 | name: clock 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.1.1" 32 | collection: 33 | dependency: transitive 34 | description: 35 | name: collection 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.16.0" 39 | fake_async: 40 | dependency: transitive 41 | description: 42 | name: fake_async 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.3.1" 46 | flutter: 47 | dependency: transitive 48 | description: flutter 49 | source: sdk 50 | version: "0.0.0" 51 | flutter_lints: 52 | dependency: "direct dev" 53 | description: 54 | name: flutter_lints 55 | url: "https://pub.dartlang.org" 56 | source: hosted 57 | version: "2.0.1" 58 | flutter_test: 59 | dependency: "direct dev" 60 | description: flutter 61 | source: sdk 62 | version: "0.0.0" 63 | lints: 64 | dependency: transitive 65 | description: 66 | name: lints 67 | url: "https://pub.dartlang.org" 68 | source: hosted 69 | version: "2.0.0" 70 | matcher: 71 | dependency: transitive 72 | description: 73 | name: matcher 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "0.12.12" 77 | material_color_utilities: 78 | dependency: transitive 79 | description: 80 | name: material_color_utilities 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "0.1.5" 84 | meta: 85 | dependency: transitive 86 | description: 87 | name: meta 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "1.8.0" 91 | path: 92 | dependency: transitive 93 | description: 94 | name: path 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "1.8.2" 98 | sky_engine: 99 | dependency: transitive 100 | description: flutter 101 | source: sdk 102 | version: "0.0.99" 103 | source_span: 104 | dependency: transitive 105 | description: 106 | name: source_span 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "1.9.0" 110 | stack_trace: 111 | dependency: transitive 112 | description: 113 | name: stack_trace 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "1.10.0" 117 | stream_channel: 118 | dependency: transitive 119 | description: 120 | name: stream_channel 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "2.1.0" 124 | string_scanner: 125 | dependency: transitive 126 | description: 127 | name: string_scanner 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "1.1.1" 131 | term_glyph: 132 | dependency: transitive 133 | description: 134 | name: term_glyph 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.2.1" 138 | test_api: 139 | dependency: transitive 140 | description: 141 | name: test_api 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "0.4.12" 145 | vector_math: 146 | dependency: transitive 147 | description: 148 | name: vector_math 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.1.2" 152 | sdks: 153 | dart: ">=2.18.0 <3.0.0" 154 | -------------------------------------------------------------------------------- /brightcove_android/android/src/main/kotlin/com/monstarlab/brightcove_android/BrightcoveAndroidPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.monstarlab.brightcove_android 2 | 3 | import android.app.Activity 4 | import android.content.Context 5 | import io.flutter.embedding.engine.plugins.FlutterPlugin 6 | import io.flutter.embedding.engine.plugins.activity.ActivityAware 7 | import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding 8 | import io.flutter.plugin.common.BinaryMessenger 9 | import io.flutter.plugin.common.EventChannel 10 | import io.flutter.plugin.common.StandardMessageCodec 11 | import io.flutter.plugin.platform.PlatformView 12 | import io.flutter.plugin.platform.PlatformViewFactory 13 | import io.flutter.plugin.platform.PlatformViewRegistry 14 | import io.flutter.view.TextureRegistry 15 | import java.util.* 16 | 17 | /** BrightcovePlayerFlutterPlugin */ 18 | class BrightcoveAndroidPlugin : FlutterPlugin, ActivityAware, Messages.BrightcoveVideoPlayerApi { 19 | 20 | companion object { 21 | const val VIEW_TYPE = "brightcove_videoplayer" 22 | } 23 | 24 | private var pluginState: PluginState? = null 25 | private val players = mutableMapOf() 26 | 27 | override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) { 28 | Messages.BrightcoveVideoPlayerApi.setup(binding.binaryMessenger, this) 29 | this.pluginState = PluginState( 30 | binding.applicationContext, 31 | binding.binaryMessenger, 32 | binding.textureRegistry, 33 | binding.platformViewRegistry, 34 | ) 35 | } 36 | 37 | override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { 38 | for (p in players.values) { 39 | p.dispose() 40 | } 41 | pluginState = null 42 | } 43 | 44 | override fun onAttachedToActivity(binding: ActivityPluginBinding) { 45 | this.pluginState?.activity = binding.activity 46 | } 47 | 48 | override fun onDetachedFromActivityForConfigChanges() {} 49 | 50 | override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) {} 51 | 52 | override fun onDetachedFromActivity() { 53 | pluginState?.activity = null 54 | } 55 | 56 | override fun initialize() { 57 | disposeAllPlayers() 58 | } 59 | 60 | private fun disposeAllPlayers() { 61 | for (player in players.values) { 62 | player.dispose() 63 | } 64 | players.clear() 65 | } 66 | 67 | override fun create(msg: Messages.PlayMessage): Messages.TextureMessage { 68 | val id = Calendar.getInstance().timeInMillis.toString() 69 | val videoPlayer = BrightcoveVideoPlayerFlutter() 70 | val instanceChannel = EventChannel(pluginState!!.binaryMessenger,"brightcove_videoplayer/videoEvents$id") 71 | instanceChannel.setStreamHandler(videoPlayer) 72 | 73 | pluginState!!.platformViewRegistry.registerViewFactory( 74 | "$VIEW_TYPE#$id", 75 | object : PlatformViewFactory(StandardMessageCodec.INSTANCE) { 76 | override fun create(context: Context?, viewId: Int, args: Any?): PlatformView { 77 | videoPlayer.initialize(context!!, msg) 78 | return videoPlayer 79 | } 80 | }, 81 | ) 82 | players[id] = videoPlayer 83 | return Messages.TextureMessage.Builder() 84 | .setPlayerId(id) 85 | .build() 86 | } 87 | 88 | override fun dispose(msg: Messages.TextureMessage) { 89 | players[msg.playerId]?.dispose() 90 | } 91 | 92 | override fun setVolume(msg: Messages.VolumeMessage) { 93 | players[msg.playerId]?.setVolume(msg.volume.toLong()) 94 | } 95 | 96 | override fun play(msg: Messages.TextureMessage) = players[msg.playerId]!!.play() 97 | 98 | override fun pause(msg: Messages.TextureMessage) = players[msg.playerId]!!.pause() 99 | 100 | override fun seekTo(msg: Messages.PositionMessage) { 101 | players[msg.playerId]?.seekTo(msg.position) 102 | } 103 | 104 | override fun enterPictureInPictureMode(msg: Messages.TextureMessage) { 105 | players[msg.playerId]?.enterPiPMode(pluginState!!.activity) 106 | } 107 | } 108 | 109 | data class PluginState( 110 | val context: Context, 111 | val binaryMessenger: BinaryMessenger, 112 | val textureRegistry: TextureRegistry, 113 | val platformViewRegistry: PlatformViewRegistry, 114 | var activity: Activity? = null 115 | ) 116 | -------------------------------------------------------------------------------- /brightcove_android/lib/src/android_brightcove_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:brightcove_android/src/messages.g.dart'; 2 | import 'package:brightcove_flutter_platform_interface/brightcove_flutter_platform_interface.dart'; 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/gestures.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter/services.dart'; 7 | 8 | class BrightcoveAndroidPlatform extends BrightcoveFlutterPlatform { 9 | static const String viewTypeId = 'brightcove_videoplayer'; 10 | final BrightcoveVideoPlayerApi _api = BrightcoveVideoPlayerApi(); 11 | 12 | static void registerWith() { 13 | BrightcoveFlutterPlatform.instance = BrightcoveAndroidPlatform(); 14 | } 15 | 16 | DataSourceType _convertTypes(VideoSourceType type) { 17 | switch (type) { 18 | case VideoSourceType.videoById: 19 | return DataSourceType.videoById; 20 | case VideoSourceType.playlistById: 21 | return DataSourceType.playlistById; 22 | } 23 | } 24 | 25 | @override 26 | Future create(DataSource dataSource, BrightcoveOptions options) async { 27 | final msg = PlayMessage( 28 | dataSource: dataSource.dataSource, 29 | dataSourceType: _convertTypes(dataSource.sourceType), 30 | account: options.account, 31 | policy: options.policy, 32 | ); 33 | final playerId = (await _api.create(msg)).playerId; 34 | return playerId; 35 | } 36 | 37 | @override 38 | Stream videoEventsFor(String playerId) { 39 | return EventChannel("brightcove_videoplayer/videoEvents$playerId") 40 | .receiveBroadcastStream() 41 | .map((event) { 42 | final Map map = event as Map; 43 | switch (map['event']) { 44 | case 'bufferingStart': 45 | return VideoEvent(eventType: VideoEventType.bufferingStart); 46 | case 'bufferedUpdate': 47 | // TODO load missing properties 48 | return VideoEvent(eventType: VideoEventType.bufferingUpdate); 49 | case 'bufferingCompleted': 50 | return VideoEvent(eventType: VideoEventType.bufferingEnd); 51 | case 'initialized': 52 | return VideoEvent( 53 | eventType: VideoEventType.initialized, 54 | duration: Duration(milliseconds: map['duration'] as int), 55 | size: Size( 56 | (map['videoWidth'] as int).toDouble(), 57 | (map['videoHeight'] as int).toDouble(), 58 | ), 59 | ); 60 | case 'captionsAvailable': 61 | return VideoEvent( 62 | eventType: VideoEventType.captionsAvailable, 63 | captionLanguages: event['languages'] as List, 64 | ); 65 | case 'playProgress': 66 | return VideoEvent( 67 | eventType: VideoEventType.playProgress, 68 | currentPosition: map['position'] as int?, 69 | ); 70 | case 'completed': 71 | return VideoEvent(eventType: VideoEventType.completed); 72 | default: 73 | return VideoEvent(eventType: VideoEventType.unknown); 74 | } 75 | }); 76 | } 77 | 78 | @override 79 | Widget buildView(String playerId) { 80 | return AndroidView( 81 | viewType: '$viewTypeId#$playerId', 82 | creationParamsCodec: const StandardMessageCodec(), 83 | gestureRecognizers: >{ 84 | Factory( 85 | () => EagerGestureRecognizer(), 86 | ), 87 | }, 88 | ); 89 | } 90 | 91 | @override 92 | Future init() { 93 | return _api.initialize(); 94 | } 95 | 96 | @override 97 | Future dispose(String playerId) { 98 | return _api.dispose(TextureMessage(playerId: playerId)); 99 | } 100 | 101 | @override 102 | Future play(String playerId) { 103 | return _api.play(TextureMessage(playerId: playerId)); 104 | } 105 | 106 | @override 107 | Future pause(String playerId) { 108 | return _api.pause(TextureMessage(playerId: playerId)); 109 | } 110 | 111 | @override 112 | Future seekTo(String playerId, Duration position) { 113 | return _api.seekTo( 114 | PositionMessage(playerId: playerId, position: position.inMilliseconds)); 115 | } 116 | 117 | @override 118 | Future setVolume(String playerId, double volume) { 119 | return _api.setVolume(VolumeMessage(playerId: playerId, volume: volume)); 120 | } 121 | 122 | @override 123 | Future enterPiPMode(String playerId) { 124 | return _api.enterPictureInPictureMode(TextureMessage(playerId: playerId)); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /brightcove_ios/lib/brightcove_ios.dart: -------------------------------------------------------------------------------- 1 | import 'package:brightcove_ios/src/messages.g.dart'; 2 | import 'package:brightcove_flutter_platform_interface/brightcove_flutter_platform_interface.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/services.dart'; 5 | 6 | class BrightcoveIosPlatform extends BrightcoveFlutterPlatform { 7 | final BrightcoveVideoPlayerApi _api = BrightcoveVideoPlayerApi(); 8 | 9 | static void registerWith() { 10 | BrightcoveFlutterPlatform.instance = BrightcoveIosPlatform(); 11 | } 12 | 13 | DataSourceType _convertTypes(VideoSourceType type) { 14 | switch (type) { 15 | case VideoSourceType.videoById: 16 | return DataSourceType.videoById; 17 | case VideoSourceType.playlistById: 18 | return DataSourceType.playlistById; 19 | } 20 | } 21 | 22 | @override 23 | Future create(DataSource dataSource, BrightcoveOptions options) async { 24 | final msg = PlayMessage( 25 | dataSource: dataSource.dataSource, 26 | dataSourceType: _convertTypes(dataSource.sourceType), 27 | account: options.account, 28 | policy: options.policy, 29 | ); 30 | final playerId = (await _api.create(msg)).playerId; 31 | return playerId; 32 | } 33 | 34 | @override 35 | Widget buildView(String playerId) { 36 | return UiKitView( 37 | viewType: 'brightcove_videoplayer#$playerId', 38 | ); 39 | } 40 | 41 | @override 42 | Stream videoEventsFor(String playerId) { 43 | return EventChannel("brightcove_videoplayer/videoEvents$playerId") 44 | .receiveBroadcastStream() 45 | .map((event) { 46 | final Map map = event as Map; 47 | switch (map['event']) { 48 | case 'bufferingStart': 49 | return VideoEvent(eventType: VideoEventType.bufferingStart); 50 | case 'bufferedUpdate': 51 | // TODO load missing properties 52 | return VideoEvent(eventType: VideoEventType.bufferingUpdate); 53 | case 'bufferingCompleted': 54 | return VideoEvent(eventType: VideoEventType.bufferingEnd); 55 | case 'initialized': 56 | // Duration duration = Duration(milliseconds: 0); 57 | // if (map['duration'] is double) { 58 | // duration = 59 | // Duration(milliseconds: (map['duration'] as double).round()); 60 | // } else if (map['duration' is Duration]) { 61 | // duration = map['duration'] as Duration; 62 | // } 63 | return VideoEvent( 64 | eventType: VideoEventType.initialized, 65 | duration: // map['duration'] as Duration, 66 | Duration(milliseconds: (map['duration'] as int? ?? 0)), 67 | size: Size( 68 | (map['videoWidth'] as int?)?.toDouble() ?? 0, 69 | (map['videoHeight'] as int?)?.toDouble() ?? 0, 70 | ), 71 | ); 72 | case 'captionsAvailable': 73 | return VideoEvent( 74 | eventType: VideoEventType.captionsAvailable, 75 | captionLanguages: event['languages'] as List, 76 | ); 77 | case 'playProgress': 78 | return VideoEvent( 79 | eventType: VideoEventType.playProgress, 80 | currentPosition: //map['position'] ?? 81 | (map['position'] == null || 82 | map['position'] == double.negativeInfinity || 83 | map['position'] == double.infinity) 84 | ? (0 as int) 85 | : ((map['position'] as double) * 1000).toInt(), 86 | ); 87 | case 'completed': 88 | return VideoEvent(eventType: VideoEventType.completed); 89 | default: 90 | return VideoEvent(eventType: VideoEventType.unknown); 91 | } 92 | }); 93 | } 94 | 95 | @override 96 | Future init() async { 97 | return _api.initialize(); 98 | } 99 | 100 | @override 101 | Future dispose(String playerId) { 102 | return _api.dispose(TextureMessage(playerId: playerId)); 103 | } 104 | 105 | @override 106 | Future play(String playerId) { 107 | return _api.play(TextureMessage(playerId: playerId)); 108 | } 109 | 110 | @override 111 | Future seekTo(String playerId, Duration position) { 112 | return _api.seekTo( 113 | PositionMessage(playerId: playerId, position: position.inMilliseconds)); 114 | } 115 | 116 | @override 117 | Future pause(String playerId) { 118 | return _api.pause(TextureMessage(playerId: playerId)); 119 | } 120 | 121 | @override 122 | Future setVolume(String playerId, double volume) { 123 | return _api.setVolume(VolumeMessage(playerId: playerId, volume: volume)); 124 | } 125 | 126 | @override 127 | Future enterPiPMode(String playerId) { 128 | return _api.enterPictureInPictureMode(TextureMessage(playerId: playerId)); 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /brightcove_flutter/example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.9.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | brightcove_android: 19 | dependency: transitive 20 | description: 21 | path: "../../brightcove_android" 22 | relative: true 23 | source: path 24 | version: "0.1.0" 25 | brightcove_flutter: 26 | dependency: "direct main" 27 | description: 28 | path: ".." 29 | relative: true 30 | source: path 31 | version: "0.1.0" 32 | brightcove_flutter_platform_interface: 33 | dependency: transitive 34 | description: 35 | path: "../../brightcove_flutter_platform_interface" 36 | relative: true 37 | source: path 38 | version: "0.0.2" 39 | brightcove_ios: 40 | dependency: transitive 41 | description: 42 | path: "../../brightcove_ios" 43 | relative: true 44 | source: path 45 | version: "0.1.0" 46 | characters: 47 | dependency: transitive 48 | description: 49 | name: characters 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.2.1" 53 | clock: 54 | dependency: transitive 55 | description: 56 | name: clock 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.1" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.16.0" 67 | cupertino_icons: 68 | dependency: "direct main" 69 | description: 70 | name: cupertino_icons 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.0.5" 74 | fake_async: 75 | dependency: transitive 76 | description: 77 | name: fake_async 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.3.1" 81 | flutter: 82 | dependency: "direct main" 83 | description: flutter 84 | source: sdk 85 | version: "0.0.0" 86 | flutter_lints: 87 | dependency: "direct dev" 88 | description: 89 | name: flutter_lints 90 | url: "https://pub.dartlang.org" 91 | source: hosted 92 | version: "2.0.1" 93 | flutter_test: 94 | dependency: "direct dev" 95 | description: flutter 96 | source: sdk 97 | version: "0.0.0" 98 | lints: 99 | dependency: transitive 100 | description: 101 | name: lints 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "2.0.0" 105 | matcher: 106 | dependency: transitive 107 | description: 108 | name: matcher 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "0.12.12" 112 | material_color_utilities: 113 | dependency: transitive 114 | description: 115 | name: material_color_utilities 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "0.1.5" 119 | meta: 120 | dependency: transitive 121 | description: 122 | name: meta 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "1.8.0" 126 | path: 127 | dependency: transitive 128 | description: 129 | name: path 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "1.8.2" 133 | plugin_platform_interface: 134 | dependency: transitive 135 | description: 136 | name: plugin_platform_interface 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "2.1.2" 140 | sky_engine: 141 | dependency: transitive 142 | description: flutter 143 | source: sdk 144 | version: "0.0.99" 145 | source_span: 146 | dependency: transitive 147 | description: 148 | name: source_span 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.9.0" 152 | stack_trace: 153 | dependency: transitive 154 | description: 155 | name: stack_trace 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.10.0" 159 | stream_channel: 160 | dependency: transitive 161 | description: 162 | name: stream_channel 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.1.0" 166 | string_scanner: 167 | dependency: transitive 168 | description: 169 | name: string_scanner 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.1.1" 173 | term_glyph: 174 | dependency: transitive 175 | description: 176 | name: term_glyph 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.2.1" 180 | test_api: 181 | dependency: transitive 182 | description: 183 | name: test_api 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.4.12" 187 | vector_math: 188 | dependency: transitive 189 | description: 190 | name: vector_math 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "2.1.2" 194 | sdks: 195 | dart: ">=2.18.2 <3.0.0" 196 | flutter: ">=2.5.0" 197 | -------------------------------------------------------------------------------- /brightcove_ios/example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.9.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | brightcove_android: 19 | dependency: transitive 20 | description: 21 | path: "../../brightcove_android" 22 | relative: true 23 | source: path 24 | version: "0.1.0" 25 | brightcove_flutter: 26 | dependency: "direct main" 27 | description: 28 | path: "../../brightcove_flutter" 29 | relative: true 30 | source: path 31 | version: "0.1.0" 32 | brightcove_flutter_platform_interface: 33 | dependency: transitive 34 | description: 35 | path: "../../brightcove_flutter_platform_interface" 36 | relative: true 37 | source: path 38 | version: "0.0.2" 39 | brightcove_ios: 40 | dependency: "direct main" 41 | description: 42 | path: ".." 43 | relative: true 44 | source: path 45 | version: "0.1.0" 46 | characters: 47 | dependency: transitive 48 | description: 49 | name: characters 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.2.1" 53 | clock: 54 | dependency: transitive 55 | description: 56 | name: clock 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.1" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.16.0" 67 | cupertino_icons: 68 | dependency: "direct main" 69 | description: 70 | name: cupertino_icons 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.0.5" 74 | fake_async: 75 | dependency: transitive 76 | description: 77 | name: fake_async 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.3.1" 81 | flutter: 82 | dependency: "direct main" 83 | description: flutter 84 | source: sdk 85 | version: "0.0.0" 86 | flutter_lints: 87 | dependency: "direct dev" 88 | description: 89 | name: flutter_lints 90 | url: "https://pub.dartlang.org" 91 | source: hosted 92 | version: "2.0.1" 93 | flutter_test: 94 | dependency: "direct dev" 95 | description: flutter 96 | source: sdk 97 | version: "0.0.0" 98 | lints: 99 | dependency: transitive 100 | description: 101 | name: lints 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "2.0.1" 105 | matcher: 106 | dependency: transitive 107 | description: 108 | name: matcher 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "0.12.12" 112 | material_color_utilities: 113 | dependency: transitive 114 | description: 115 | name: material_color_utilities 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "0.1.5" 119 | meta: 120 | dependency: transitive 121 | description: 122 | name: meta 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "1.8.0" 126 | path: 127 | dependency: transitive 128 | description: 129 | name: path 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "1.8.2" 133 | plugin_platform_interface: 134 | dependency: transitive 135 | description: 136 | name: plugin_platform_interface 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "2.1.3" 140 | sky_engine: 141 | dependency: transitive 142 | description: flutter 143 | source: sdk 144 | version: "0.0.99" 145 | source_span: 146 | dependency: transitive 147 | description: 148 | name: source_span 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.9.0" 152 | stack_trace: 153 | dependency: transitive 154 | description: 155 | name: stack_trace 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.10.0" 159 | stream_channel: 160 | dependency: transitive 161 | description: 162 | name: stream_channel 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.1.0" 166 | string_scanner: 167 | dependency: transitive 168 | description: 169 | name: string_scanner 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.1.1" 173 | term_glyph: 174 | dependency: transitive 175 | description: 176 | name: term_glyph 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.2.1" 180 | test_api: 181 | dependency: transitive 182 | description: 183 | name: test_api 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.4.12" 187 | vector_math: 188 | dependency: transitive 189 | description: 190 | name: vector_math 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "2.1.2" 194 | sdks: 195 | dart: ">=2.18.2 <3.0.0" 196 | flutter: ">=2.5.0" 197 | -------------------------------------------------------------------------------- /brightcove_flutter_platform_interface/lib/brightcove_flutter_platform_interface.dart: -------------------------------------------------------------------------------- 1 | library brightcove_flutter_platform_interface; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:plugin_platform_interface/plugin_platform_interface.dart'; 6 | 7 | /// The interface that implementations of brightcove_flutter must implement. 8 | /// 9 | /// Platform implementations should extend this class rather than implement it as `video_player` 10 | /// does not consider newly added methods to be breaking changes. Extending this class 11 | /// (using `extends`) ensures that the subclass will get the default implementation, while 12 | /// platform implementations that `implements` this interface will be broken by newly added 13 | /// [BrightcoveFlutterPlatform] methods. 14 | abstract class BrightcoveFlutterPlatform extends PlatformInterface { 15 | /// Constructs a BrightcoveFlutterPlatform. 16 | BrightcoveFlutterPlatform() : super(token: _token); 17 | 18 | static final Object _token = Object(); 19 | 20 | static BrightcoveFlutterPlatform _instance = _PlaceholderImplementation(); 21 | 22 | /// The instance of [BrightcoveFlutterPlatform] to use. 23 | /// 24 | /// Defaults to a placeholder that does not override any methods, and thus 25 | /// throws `UnimplementedError` in most cases. 26 | static BrightcoveFlutterPlatform get instance => _instance; 27 | 28 | /// Platform-specific plugins should override this with their own 29 | /// platform-specific class that extends [BrightcoveFlutterPlatform] when they 30 | /// register themselves. 31 | static set instance(BrightcoveFlutterPlatform instance) { 32 | PlatformInterface.verify(instance, _token); 33 | _instance = instance; 34 | } 35 | 36 | Future create(DataSource dataSource, BrightcoveOptions options) { 37 | throw UnimplementedError(); 38 | } 39 | 40 | /// Initializes the platform interface and disposes all existing players. 41 | /// 42 | /// This method is called when the plugin is first initialized 43 | /// and on every full restart. 44 | Future init() { 45 | throw UnimplementedError('init() has not been implemented.'); 46 | } 47 | 48 | /// Clears one video. 49 | Future dispose(String playerId) { 50 | throw UnimplementedError('dispose() has not been implemented.'); 51 | } 52 | 53 | /// Sets the looping attribute of the video. 54 | Future setLooping(int playerId, bool looping) { 55 | throw UnimplementedError('setLooping() has not been implemented.'); 56 | } 57 | 58 | /// Returns a Stream of [VideoEventType]s. 59 | Stream videoEventsFor(String playerId) { 60 | throw UnimplementedError('videoEventsFor() has not been implemented.'); 61 | } 62 | 63 | /// Starts the video playback. 64 | Future play(String playerId) { 65 | throw UnimplementedError('play() has not been implemented.'); 66 | } 67 | 68 | /// Stops the video playback. 69 | Future pause(String playerId) { 70 | throw UnimplementedError('pause() has not been implemented.'); 71 | } 72 | 73 | /// Sets the volume to a range between 0.0 and 1.0. 74 | Future setVolume(String playerId, double volume) { 75 | throw UnimplementedError('setVolume() has not been implemented.'); 76 | } 77 | 78 | /// Sets the video position to a [Duration] from the start. 79 | Future seekTo(String playerId, Duration position) { 80 | throw UnimplementedError('seekTo() has not been implemented.'); 81 | } 82 | 83 | /// Sets the playback speed to a [speed] value indicating the playback rate. 84 | Future setPlaybackSpeed(String playerId, double speed) { 85 | throw UnimplementedError('setPlaybackSpeed() has not been implemented.'); 86 | } 87 | 88 | /// Gets the video position as [Duration] from the start. 89 | Future getPosition(int playerId) { 90 | throw UnimplementedError('getPosition() has not been implemented.'); 91 | } 92 | 93 | /// Plays in Picture in Picture mode if supported. 94 | Future enterPiPMode(String playerId) { 95 | throw UnimplementedError('getPosition() has not been implemented.'); 96 | } 97 | 98 | /// Returns a widget displaying the video with a given playerId. 99 | Widget buildView(String playerId) { 100 | throw UnimplementedError('buildView() has not been implemented.'); 101 | } 102 | } 103 | 104 | class _PlaceholderImplementation extends BrightcoveFlutterPlatform {} 105 | 106 | enum VideoSourceType { 107 | videoById, 108 | playlistById, 109 | } 110 | 111 | @immutable 112 | class BrightcoveOptions { 113 | BrightcoveOptions({ 114 | required this.account, 115 | required this.policy, 116 | this.catalogBaseUrl, 117 | }); 118 | 119 | /// Your Brightcove's account id. 120 | final String account; 121 | 122 | /// The catalog's base url. 123 | /// 124 | /// Use the default if this field is null. 125 | final String? catalogBaseUrl; 126 | 127 | /// The policy key usedd to get the videos from your Brightcove account. 128 | final String policy; 129 | } 130 | 131 | class DataSource { 132 | /// Constructs a video with the given values. Only [duration] is required. The 133 | /// rest will initialize with default values when unset. 134 | DataSource({ 135 | required this.dataSource, 136 | required this.sourceType, 137 | }); 138 | 139 | final String dataSource; 140 | final VideoSourceType sourceType; 141 | 142 | /// Returns a new instance that has the same values as this current instance, 143 | /// except for any overrides passed in as arguments to [copyWith]. 144 | DataSource copyWith({ 145 | String? dataSource, 146 | VideoSourceType? sourceType, 147 | }) { 148 | return DataSource( 149 | sourceType: sourceType ?? this.sourceType, 150 | dataSource: dataSource ?? this.dataSource, 151 | ); 152 | } 153 | 154 | @override 155 | String toString() { 156 | return '${objectRuntimeType(this, 'VideoPlayerValue')}(' 157 | 'dataSource: $dataSource, ' 158 | 'sourceType: $sourceType)'; 159 | } 160 | } 161 | 162 | enum VideoEventType { 163 | /// The video has been initialized. 164 | initialized, 165 | 166 | /// The playback has ended. 167 | completed, 168 | 169 | /// Updated information on the buffering state. 170 | bufferingUpdate, 171 | 172 | /// The video started to buffer. 173 | bufferingStart, 174 | 175 | /// The video stopped to buffer. 176 | bufferingEnd, 177 | 178 | /// The video is being played. 179 | playProgress, 180 | 181 | /// There are some captions available 182 | captionsAvailable, 183 | 184 | /// An unknown event has been received. 185 | unknown, 186 | } 187 | 188 | /// Event emitted from the platform implementation. 189 | @immutable 190 | class VideoEvent { 191 | /// Creates an instance of [VideoEvent]. 192 | /// 193 | /// The [eventType] argument is required. 194 | /// 195 | /// Depending on the [eventType], the [duration], [size], 196 | /// [rotationCorrection], and [buffered] arguments can be null. 197 | // ignore: prefer_const_constructors_in_immutables 198 | VideoEvent({ 199 | required this.eventType, 200 | this.duration, 201 | this.size, 202 | this.currentPosition, 203 | this.captionLanguages, 204 | this.rotationCorrection, 205 | }); 206 | 207 | /// The type of the event. 208 | final VideoEventType eventType; 209 | 210 | /// Duration of the video. 211 | /// 212 | /// Only used if [eventType] is [VideoEventType.initialized]. 213 | final Duration? duration; 214 | 215 | /// The current playback position (in time). 216 | /// 217 | /// Only used if [eventType] is [VideoEventType.playProgress]. 218 | final int? currentPosition; 219 | 220 | /// Size of the video. 221 | /// 222 | /// Only used if [eventType] is [VideoEventType.initialized]. 223 | final Size? size; 224 | 225 | /// Degrees to rotate the video (clockwise) so it is displayed correctly. 226 | /// 227 | /// Only used if [eventType] is [VideoEventType.initialized]. 228 | final int? rotationCorrection; 229 | 230 | /// The list of languages available for captions (if available). 231 | final List? captionLanguages; 232 | 233 | bool get isCaptionsAvailable => 234 | captionLanguages != null && captionLanguages!.isNotEmpty; 235 | 236 | @override 237 | bool operator ==(Object other) { 238 | return identical(this, other) || 239 | other is VideoEvent && 240 | runtimeType == other.runtimeType && 241 | eventType == other.eventType && 242 | duration == other.duration && 243 | captionLanguages == other.captionLanguages && 244 | currentPosition == other.currentPosition && 245 | size == other.size && 246 | rotationCorrection == other.rotationCorrection; 247 | } 248 | 249 | @override 250 | int get hashCode => Object.hash( 251 | size, 252 | eventType, 253 | duration, 254 | currentPosition, 255 | captionLanguages, 256 | rotationCorrection, 257 | ); 258 | } 259 | -------------------------------------------------------------------------------- /brightcove_ios/ios/Classes/SwiftBrightcoveIosPlugin.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import BrightcovePlayerSDK 4 | 5 | public class SwiftBrightcoveIosPlugin: NSObject, FlutterPlugin, BrightcoveVideoPlayerApi { 6 | 7 | var registrar: FlutterPluginRegistrar? 8 | private var players: [String:BCovePlayer] = [:] 9 | 10 | public init(with registrar: FlutterPluginRegistrar) { 11 | super.init() 12 | self.registrar = registrar 13 | } 14 | 15 | public static func register(with registrar: FlutterPluginRegistrar) { 16 | let plugin = SwiftBrightcoveIosPlugin(with: registrar) 17 | registrar.addApplicationDelegate(plugin) 18 | BrightcoveVideoPlayerApiSetup.setUp(binaryMessenger: registrar.messenger(), 19 | api: plugin) 20 | } 21 | 22 | func initialize() { 23 | disposeAll() 24 | } 25 | 26 | private func disposeAll() { 27 | for p in players { 28 | p.value.dispose() 29 | } 30 | players.removeAll() 31 | } 32 | 33 | func create(msg: PlayMessage) -> TextureMessage { 34 | let id = String(Date().timeIntervalSince1970) 35 | let player = BCovePlayer() 36 | let channel = FlutterEventChannel(name: "brightcove_videoplayer/videoEvents\(id)", binaryMessenger: registrar!.messenger()) 37 | channel.setStreamHandler(player) 38 | 39 | let factory = PlayerFactory(player: player, msg: msg) 40 | registrar?.register(factory, withId: "brightcove_videoplayer#\(id)") 41 | players[id] = player 42 | return TextureMessage.init(playerId: id) 43 | } 44 | 45 | func dispose(msg: TextureMessage) { 46 | players[msg.playerId]?.dispose() 47 | } 48 | 49 | func setVolume(msg: VolumeMessage) { 50 | 51 | } 52 | 53 | func enterPictureInPictureMode(msg: TextureMessage) { 54 | 55 | } 56 | 57 | func play(msg: TextureMessage) { 58 | players[msg.playerId]?.play() 59 | } 60 | 61 | func pause(msg: TextureMessage) { 62 | players[msg.playerId]?.pause() 63 | } 64 | 65 | func seekTo(msg: PositionMessage) { 66 | players[msg.playerId]?.seekTo(position: CMTimeMake(value: Int64(msg.position), timescale: 1)) 67 | } 68 | 69 | 70 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 71 | result("iOS " + UIDevice.current.systemVersion) 72 | } 73 | } 74 | 75 | 76 | public class PlayerFactory: NSObject, FlutterPlatformViewFactory { 77 | 78 | var player: BCovePlayer? 79 | var msg: PlayMessage? 80 | init(player: BCovePlayer, msg: PlayMessage) { 81 | self.player = player 82 | self.msg = msg 83 | } 84 | 85 | public func create(withFrame frame: CGRect, viewIdentifier viewId: Int64, arguments args: Any?) -> FlutterPlatformView { 86 | player!.initialize(message: msg!) 87 | return player! 88 | } 89 | } 90 | 91 | public class BCovePlayer: FlutterEventChannel, FlutterPlatformView, FlutterStreamHandler { 92 | 93 | private var eventSink: FlutterEventSink? 94 | private var controller: BCOVPlaybackController? 95 | { 96 | didSet { 97 | controller?.delegate = self 98 | } 99 | } 100 | private var playbackService: BCOVPlaybackService! 101 | private var currentVideo: BCOVVideo? 102 | private var isInitted = false 103 | private var didComplete = false 104 | 105 | lazy private var manager: BCOVPlayerSDKManager = { 106 | let _manager = BCOVPlayerSDKManager.shared()! 107 | return _manager 108 | }() 109 | 110 | lazy private var playerView: UIView = { 111 | if let controller = controller { 112 | self.controller = controller 113 | } else { 114 | self.controller = self.manager.createPlaybackController() 115 | } 116 | guard let playerView = BCOVPUIPlayerView(playbackController: controller) else { return BCOVPUIPlayerView(playbackController: controller) } 117 | playerView.controlsContainerView.alpha = 0 118 | return playerView 119 | }() 120 | 121 | public func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? { 122 | self.eventSink = events 123 | // if the video loaded before the onListen is called, then send the initialized event on the stream 124 | // if let _ = self.currentVideo, !isInitted { 125 | // sendInitializedEvent(duration: 30000) 126 | // self.isInitted = true 127 | // } 128 | return nil 129 | } 130 | 131 | public func onCancel(withArguments arguments: Any?) -> FlutterError? { 132 | eventSink = nil 133 | return nil 134 | } 135 | 136 | public override init() { 137 | super.init() 138 | } 139 | 140 | public func view() -> UIView { 141 | return self.playerView 142 | } 143 | 144 | func play() { 145 | controller?.play() 146 | } 147 | 148 | func pause() { 149 | controller?.pause() 150 | } 151 | 152 | func dispose() { 153 | controller?.pause() 154 | playbackService = nil 155 | controller = nil 156 | } 157 | 158 | func seekTo(position: CMTime) { 159 | if #available(iOS 13.0, *) { 160 | Task { 161 | await self.controller?.seek(to: position) 162 | } 163 | } else { 164 | // Fallback on earlier versions 165 | } 166 | } 167 | 168 | func initialize(message: PlayMessage) { 169 | if let controller = controller { 170 | self.controller = controller 171 | } else { 172 | self.controller = self.manager.createPlaybackController() 173 | } 174 | 175 | self.playbackService = BCOVPlaybackService(accountId: message.account, policyKey: message.policy) 176 | 177 | switch message.dataSourceType { 178 | case .playlistById: 179 | self.playbackService.findPlaylist(withPlaylistID: message.dataSource, parameters: nil, completion: { 180 | (list: BCOVPlaylist?, jsonResponse: [AnyHashable:Any]?, error: Error?) in 181 | if let list = list { 182 | self.controller?.isAutoPlay = true 183 | self.controller?.setVideos([list.allPlayableVideos.first] as NSFastEnumeration) 184 | } 185 | }) 186 | case .videoById: 187 | self.playbackService.findVideo(withVideoID: message.dataSource, parameters: nil, completion: { 188 | (video: BCOVVideo?, jsonResponse: [AnyHashable:Any]?, error: Error?) in 189 | if let video = video { 190 | self.currentVideo = video 191 | self.controller?.isAutoPlay = true 192 | self.controller?.setVideos([video] as NSFastEnumeration) 193 | // if let sink = self.eventSink { 194 | // sink([ 195 | // "event": "initialized", 196 | //// "videoHeight": video 197 | // "duration": 30 198 | // ]) 199 | // self.isInitted = true 200 | // } 201 | } 202 | }) 203 | } 204 | } 205 | 206 | /// duration in millisecond 207 | func sendInitializedEvent(duration: Int) { 208 | if (!isInitted) { 209 | self.isInitted = true 210 | self.eventSink?([ 211 | "event": "initialized", 212 | "videoHeight": 0, // self.playerView.frame.height, 213 | "videoWidth": 0, // self.playerView.frame.width, 214 | "duration": duration 215 | ]) 216 | } 217 | } 218 | } 219 | 220 | extension BCovePlayer: BCOVPlaybackControllerDelegate { 221 | public func playbackController(_ controller: BCOVPlaybackController!, playbackSession session: BCOVPlaybackSession!, didProgressTo progress: TimeInterval) { 222 | guard let currentItem = session.player.currentItem else { return } 223 | 224 | if !isInitted && (!currentItem.duration.seconds.isZero && !currentItem.duration.seconds.isNaN) { 225 | self.sendInitializedEvent(duration: Int(currentItem.duration.seconds * 1000)) 226 | } 227 | 228 | self.eventSink?(["event": "playProgress", "position": progress]) 229 | 230 | debugPrint("[swift][\(currentItem.duration.seconds)][\(progress)]") 231 | 232 | if (progress.isInfinite && progress > 0 && !didComplete) {// currentItem.duration.seconds == progress && (currentItem.duration.seconds.isZero && !currentItem.duration.seconds.isNaN) { 233 | self.didComplete = true 234 | self.eventSink?(["event": "completed"]) 235 | 236 | } 237 | } 238 | } 239 | -------------------------------------------------------------------------------- /brightcove_android/android/src/main/kotlin/com/monstarlab/brightcove_android/BrightcoveVideoPlayerFlutter.kt: -------------------------------------------------------------------------------- 1 | package com.monstarlab.brightcove_android 2 | 3 | import android.app.Activity 4 | import android.content.Context 5 | import android.net.Uri 6 | import android.view.View 7 | import com.brightcove.player.captioning.BrightcoveCaptionFormat 8 | import com.brightcove.player.edge.Catalog 9 | import com.brightcove.player.edge.CatalogError 10 | import com.brightcove.player.edge.PlaylistListener 11 | import com.brightcove.player.edge.VideoListener 12 | import com.brightcove.player.event.Event 13 | import com.brightcove.player.event.EventType 14 | import com.brightcove.player.mediacontroller.BrightcoveMediaController 15 | import com.brightcove.player.model.Playlist 16 | import com.brightcove.player.model.Video 17 | import com.brightcove.player.view.BrightcoveExoPlayerVideoView 18 | import io.flutter.plugin.common.EventChannel 19 | import io.flutter.plugin.platform.PlatformView 20 | 21 | 22 | class BrightcoveVideoPlayerFlutter : PlatformView, EventChannel.StreamHandler { 23 | 24 | private lateinit var videoView: BrightcoveExoPlayerVideoView 25 | private lateinit var videoViewCatalog: Catalog 26 | private lateinit var mediaController: BrightcoveMediaController 27 | private var isInitialized = false 28 | private var autoplay = false 29 | private var eventSink: EventChannel.EventSink? = null 30 | 31 | fun initialize(context: Context, msg: Messages.PlayMessage) { 32 | videoView = BrightcoveExoPlayerVideoView(context) 33 | videoView.finishInitialization() 34 | 35 | mediaController = BrightcoveMediaController(videoView) 36 | mediaController.isShowControllerEnable = false // hide default controller actions 37 | videoView.setMediaController(mediaController) 38 | videoView.analytics.account = msg.account 39 | 40 | val baseUrl = 41 | if (msg.catalogBaseUrl == null) Catalog.DEFAULT_EDGE_BASE_URL else msg.catalogBaseUrl 42 | videoViewCatalog = Catalog.Builder(this.videoView.eventEmitter, msg.account) 43 | .setPolicy(msg.policy) 44 | .setBaseURL(baseUrl!!) 45 | .build() 46 | 47 | subscribeToEvents() 48 | 49 | val dataSource = msg.dataSource 50 | when (msg.dataSourceType) { 51 | Messages.DataSourceType.VIDEO_BY_ID -> { 52 | videoViewCatalog.findVideoByID(dataSource, object : VideoListener() { 53 | override fun onVideo(p0: Video) { 54 | videoView.add(p0) 55 | isInitialized = true 56 | sendInitializedEvent(p0) 57 | if (autoplay) { 58 | videoView.start() 59 | } 60 | } 61 | 62 | override fun onError(errors: MutableList) { 63 | super.onError(errors) 64 | eventSink?.error( 65 | "BrightcoveVideoPlayerError", 66 | "Brightcove had a error: ${errors.first()}", null 67 | ) 68 | } 69 | }) 70 | } 71 | Messages.DataSourceType.PLAYLIST_BY_ID -> { 72 | videoViewCatalog.findPlaylistByID(dataSource, object : PlaylistListener() { 73 | override fun onPlaylist(p0: Playlist?) { 74 | if (p0 != null) { 75 | videoView.addAll(p0.videos) 76 | isInitialized = true 77 | sendInitializedEvent(p0.videos.first()) 78 | if (autoplay) { 79 | videoView.start() 80 | } 81 | } 82 | } 83 | 84 | override fun onError(errors: MutableList) { 85 | super.onError(errors) 86 | eventSink?.error( 87 | "BrightcoveVideoPlayerError", 88 | "Brightcove had a error: ${errors.first()}", null 89 | ) 90 | } 91 | }) 92 | } 93 | } 94 | } 95 | 96 | fun sendInitializedEvent(video: Video) { 97 | val props = video.properties 98 | videoView.setClosedCaptioningEnabled(true) 99 | 100 | val event: MutableMap = HashMap() 101 | event["event"] = "initialized" 102 | event["duration"] = video.durationLong 103 | event["videoWidth"] = videoView.videoWidth 104 | event["videoHeight"] = videoView.videoHeight 105 | eventSink?.success(event) 106 | } 107 | 108 | private fun subscribeToEvents() { 109 | videoView.eventEmitter.on(EventType.BUFFERING_STARTED) { 110 | val event: MutableMap = HashMap() 111 | event["event"] = "bufferingStart" 112 | eventSink?.success(event) 113 | } 114 | videoView.eventEmitter.on(EventType.BUFFERING_COMPLETED) { 115 | val event: MutableMap = HashMap() 116 | event["event"] = "bufferingCompleted" 117 | eventSink?.success(event) 118 | } 119 | videoView.eventEmitter.on(EventType.BUFFERED_UPDATE) { 120 | val event: MutableMap = HashMap() 121 | event["event"] = "bufferedUpdate" 122 | eventSink?.success(event) 123 | } 124 | videoView.eventEmitter.on(EventType.PROGRESS) { 125 | val event: MutableMap = HashMap() 126 | event["event"] = "playProgress" 127 | event["position"] = videoView.videoDisplay.playerCurrentPosition 128 | eventSink!!.success(event) 129 | } 130 | videoView.eventEmitter.on(EventType.COMPLETED) { 131 | val event: MutableMap = HashMap() 132 | event["event"] = "completed" 133 | eventSink?.success(event) 134 | } 135 | videoView.eventEmitter.on(EventType.CAPTIONS_LANGUAGES) { 136 | // You could find the desired language in the LANGUAGES list. 137 | // List languages = event.getProperty(Event.LANGUAGES, List.class); 138 | selectCaption(videoView.currentVideo, "en") 139 | 140 | val event: MutableMap = HashMap() 141 | event["event"] = "captionsAvailable" 142 | 143 | val languages = it.properties[Event.LANGUAGES] 144 | if (languages != null) { 145 | print("CAPTION-LANGUAGES: $languages") 146 | event["languages"] = languages 147 | } 148 | eventSink!!.success(event) 149 | } 150 | } 151 | 152 | fun play() { 153 | if (!isInitialized) { 154 | autoplay = true 155 | return 156 | } 157 | videoView.start() 158 | } 159 | 160 | fun pause() = videoView.pause() 161 | 162 | fun seekTo(position: Long) { 163 | videoView.seekTo(position) 164 | } 165 | 166 | fun enterPiPMode(activity: Activity?) { 167 | if (activity == null) return 168 | /* 169 | val pipManager = videoView.pictureInPictureManager 170 | pipManager.registerActivity(activity, videoView) 171 | pipManager.enterPictureInPictureMode()*/ 172 | // TODO: complete PiP support 173 | } 174 | 175 | @Suppress("UNCHECKED_CAST") 176 | private fun getCaptionsForLanguageCode( 177 | video: Video?, 178 | languageCode: String 179 | ): Pair? { 180 | val payload = video?.properties?.get(Video.Fields.CAPTION_SOURCES) 181 | if (payload is List<*>) { 182 | val pairs: List> = 183 | payload as List> 184 | for (pair in pairs) { 185 | if (pair.second.language().equals(languageCode)) { 186 | return pair 187 | } 188 | } 189 | } 190 | return null 191 | } 192 | 193 | private fun selectCaption(video: Video, language: String) { 194 | val pair = getCaptionsForLanguageCode(video, language) 195 | if (pair != null && pair.first!! != Uri.EMPTY) { 196 | // BrightcoveCaptionFormat.BRIGHTCOVE_SCHEME indicates that is not a URL we need to load with the LoadCaptionsService, but instead we'll be enabled through a different component. 197 | if (!pair.first.toString().startsWith(BrightcoveCaptionFormat.BRIGHTCOVE_SCHEME)) { 198 | videoView.closedCaptioningController.loadCaptionsService 199 | .loadCaptions(pair.first, pair.second!!.type()) 200 | } 201 | val properties: MutableMap = HashMap() 202 | properties[Event.CAPTION_FORMAT] = pair.second 203 | properties[Event.CAPTION_URI] = pair.first 204 | videoView.eventEmitter 205 | .emit(EventType.SELECT_CLOSED_CAPTION_TRACK, properties) 206 | } 207 | } 208 | 209 | fun setVolume(volume: Long) { 210 | val properties: MutableMap = HashMap() 211 | properties[Event.VOLUME] = volume.toFloat() 212 | videoView.eventEmitter.emit(EventType.SET_VOLUME, properties) 213 | } 214 | 215 | override fun getView(): View { 216 | return videoView 217 | } 218 | 219 | // Dispose view 220 | override fun dispose() { 221 | videoView.clear() 222 | eventSink?.endOfStream() 223 | eventSink = null 224 | } 225 | 226 | override fun onListen(arguments: Any?, events: EventChannel.EventSink?) { 227 | eventSink = events 228 | } 229 | 230 | override fun onCancel(arguments: Any?) { 231 | eventSink?.endOfStream() 232 | eventSink = null 233 | } 234 | } 235 | --------------------------------------------------------------------------------